summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2010-09-03 18:40:10 (GMT)
committerRemko Tronçon <git@el-tramo.be>2010-09-03 18:40:49 (GMT)
commitbc3b2a2e7a70e597390a464ed19a564512f96e69 (patch)
tree2e32d6df4c729fd6433cdd8df8f417ff4c3a8f51
parenteb50ea03ab7fc41610a8945002fe19dd30ffb5d7 (diff)
downloadswift-contrib-bc3b2a2e7a70e597390a464ed19a564512f96e69.zip
swift-contrib-bc3b2a2e7a70e597390a464ed19a564512f96e69.tar.bz2
Added SCons flag to ignore test result.
-rw-r--r--BuildTools/SCons/SConstruct1
-rw-r--r--BuildTools/SCons/Tools/Test.py7
2 files changed, 6 insertions, 2 deletions
diff --git a/BuildTools/SCons/SConstruct b/BuildTools/SCons/SConstruct
index db9c039..feb50d0 100644
--- a/BuildTools/SCons/SConstruct
+++ b/BuildTools/SCons/SConstruct
@@ -165,6 +165,7 @@ env["checker_report"] = ARGUMENTS.get("checker_report", False)
env["TEST"] = (env["TEST_TYPE"] != "none") or env.GetOption("clean")
if env.get("valgrind", 0) :
env["TEST_RUNNER"] = "valgrind --suppressions=QA/valgrind.supp -q --leak-check=full --track-origins=yes "
+env["TEST_IGNORE_RESULT"] = "ignore_test_result" in ARGUMENTS
# Packaging
env["DIST"] = "dist" in ARGUMENTS or env.GetOption("clean")
diff --git a/BuildTools/SCons/Tools/Test.py b/BuildTools/SCons/Tools/Test.py
index 978e0d2..883da45 100644
--- a/BuildTools/SCons/Tools/Test.py
+++ b/BuildTools/SCons/Tools/Test.py
@@ -9,9 +9,12 @@ def generate(env) :
# Special support for unittest checker
if is_checker and env.get("checker_report", False) :
params = " --xml > " + os.path.join(target[0].dir.path, "checker-report.xml")
-
+
+ ignore_prefix = ""
+ if env.get("TEST_IGNORE_RESULT", False) :
+ ignore_prefix = "-"
env.Command("**dummy**", target,
- SCons.Action.Action(env.get("TEST_RUNNER", "") + cmd + " " + params, cmdstr = "$TESTCOMSTR"))
+ SCons.Action.Action(ignore_prefix + env.get("TEST_RUNNER", "") + cmd + " " + params, cmdstr = "$TESTCOMSTR"))
env.AddMethod(registerTest, "Test")