summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'BuildTools/SCons/Tools')
-rw-r--r--BuildTools/SCons/Tools/Test.py12
1 files changed, 9 insertions, 3 deletions
diff --git a/BuildTools/SCons/Tools/Test.py b/BuildTools/SCons/Tools/Test.py
index aaed222..978e0d2 100644
--- a/BuildTools/SCons/Tools/Test.py
+++ b/BuildTools/SCons/Tools/Test.py
@@ -1,11 +1,17 @@
-import SCons.Util
+import SCons.Util, os
def generate(env) :
- def registerTest(env, target, type = "unit") :
+ def registerTest(env, target, type = "unit", is_checker = False) :
if env["TEST_TYPE"] == "all" or env["TEST_TYPE"] == type :
cmd = target[0].abspath if SCons.Util.is_List(target) else target.abspath
+ params = ""
+
+ # 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")
+
env.Command("**dummy**", target,
- SCons.Action.Action(env.get("TEST_RUNNER", "") + cmd, cmdstr = "$TESTCOMSTR"))
+ SCons.Action.Action(env.get("TEST_RUNNER", "") + cmd + " " + params, cmdstr = "$TESTCOMSTR"))
env.AddMethod(registerTest, "Test")