summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2009-10-31 13:22:07 (GMT)
committerRemko Tronçon <git@el-tramo.be>2009-11-01 11:19:59 (GMT)
commitb353fac98e08d8f225781b95e55b80aa67171262 (patch)
tree6c16fb1af8c98ecfefe48eae4cbcce6dd600d975 /BuildTools
parent27751e9b1a176e1169e1aa1cfc16180c559e061f (diff)
downloadswift-b353fac98e08d8f225781b95e55b80aa67171262.zip
swift-b353fac98e08d8f225781b95e55b80aa67171262.tar.bz2
Added SCons test framework.
Diffstat (limited to 'BuildTools')
-rw-r--r--BuildTools/SCons/Tools/Test.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/BuildTools/SCons/Tools/Test.py b/BuildTools/SCons/Tools/Test.py
new file mode 100644
index 0000000..aaed222
--- /dev/null
+++ b/BuildTools/SCons/Tools/Test.py
@@ -0,0 +1,13 @@
+import SCons.Util
+
+def generate(env) :
+ def registerTest(env, target, type = "unit") :
+ if env["TEST_TYPE"] == "all" or env["TEST_TYPE"] == type :
+ cmd = target[0].abspath if SCons.Util.is_List(target) else target.abspath
+ env.Command("**dummy**", target,
+ SCons.Action.Action(env.get("TEST_RUNNER", "") + cmd, cmdstr = "$TESTCOMSTR"))
+
+ env.AddMethod(registerTest, "Test")
+
+def exists(env) :
+ return True