summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'BuildTools/SCons/Tools')
-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