summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2010-09-02 20:14:09 (GMT)
committerRemko Tronçon <git@el-tramo.be>2010-09-02 21:22:32 (GMT)
commit276d7f82ba42cdbc65ec5c9f35873a265a69bd73 (patch)
tree9a6b5ee0808a33d7b257f255d23ee3af851fec08 /BuildTools/SCons/Tools
parentda72c368654cb3e9d8c223cef1bece9056a29c4e (diff)
downloadswift-276d7f82ba42cdbc65ec5c9f35873a265a69bd73.zip
swift-276d7f82ba42cdbc65ec5c9f35873a265a69bd73.tar.bz2
Added check_output SCons flag to generate an XML report.
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")