From bc3b2a2e7a70e597390a464ed19a564512f96e69 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Remko=20Tron=C3=A7on?= <git@el-tramo.be>
Date: Fri, 3 Sep 2010 20:40:10 +0200
Subject: Added SCons flag to ignore test result.


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")
 
-- 
cgit v0.10.2-6-g49f6