diff options
-rw-r--r-- | BuildTools/SCons/Tools/Test.py | 5 | ||||
-rw-r--r-- | Sluift/README | 1 | ||||
-rw-r--r-- | Sluift/SConscript | 2 | ||||
-rw-r--r-- | Swiften/QA/SConscript | 1 | ||||
-rw-r--r-- | Swiften/QA/ScriptedTests/MultipleClients.lua (renamed from Sluift/multiple_client_test.lua) | 6 | ||||
-rw-r--r-- | Swiften/QA/ScriptedTests/SConscript | 7 | ||||
-rw-r--r-- | Swiften/QA/ScriptedTests/SendMessage.lua (renamed from Sluift/client_test.lua) | 6 |
7 files changed, 27 insertions, 1 deletions
diff --git a/BuildTools/SCons/Tools/Test.py b/BuildTools/SCons/Tools/Test.py index 883da45..40eaeb1 100644 --- a/BuildTools/SCons/Tools/Test.py +++ b/BuildTools/SCons/Tools/Test.py @@ -16,7 +16,12 @@ def generate(env) : env.Command("**dummy**", target, SCons.Action.Action(ignore_prefix + env.get("TEST_RUNNER", "") + cmd + " " + params, cmdstr = "$TESTCOMSTR")) + def registerScriptTests(env, scripts, name, type) : + if env["TEST_TYPE"] == "all" or env["TEST_TYPE"] == type : + pass + env.AddMethod(registerTest, "Test") + env.AddMethod(registerScriptTests, "ScriptTests") def exists(env) : return True diff --git a/Sluift/README b/Sluift/README new file mode 100644 index 0000000..2d9c2e2 --- /dev/null +++ b/Sluift/README @@ -0,0 +1 @@ +For example scripts, see Swiften/QA/ScriptedTests diff --git a/Sluift/SConscript b/Sluift/SConscript index 49d6de3..e00d32e 100644 --- a/Sluift/SConscript +++ b/Sluift/SConscript @@ -21,7 +21,7 @@ if env["SCONS_STAGE"] == "build" : if sluift_bin_env.get("HAVE_READLINE", False) : sluift_bin_env.Append(CPPDEFINES = ["LUA_USE_READLINE"]) sluift_bin_env.MergeFlags(sluift_bin_env["READLINE_FLAGS"]) - sluift_bin_env.Program("sluift", [ + env["SLUIFT"] = sluift_bin_env.Program("sluift", [ "sluift.cpp", "lua.c", "linit.c", diff --git a/Swiften/QA/SConscript b/Swiften/QA/SConscript index 4638d6c..25ba814 100644 --- a/Swiften/QA/SConscript +++ b/Swiften/QA/SConscript @@ -7,4 +7,5 @@ SConscript(dirs = [ # "DNSSDTest", "StorageTest", "TLSTest", + "ScriptedTests", ]) diff --git a/Sluift/multiple_client_test.lua b/Swiften/QA/ScriptedTests/MultipleClients.lua index d2b2cd7..76eba74 100644 --- a/Sluift/multiple_client_test.lua +++ b/Swiften/QA/ScriptedTests/MultipleClients.lua @@ -1,3 +1,9 @@ +-- +-- Copyright (c) 2010 Remko Tronçon +-- Licensed under the GNU General Public License v3. +-- See Documentation/Licenses/GPLv3.txt for more information. +-- + require "sluift" -- sluift.debug = true diff --git a/Swiften/QA/ScriptedTests/SConscript b/Swiften/QA/ScriptedTests/SConscript new file mode 100644 index 0000000..298c455 --- /dev/null +++ b/Swiften/QA/ScriptedTests/SConscript @@ -0,0 +1,7 @@ +Import("env") + +if env["TEST"] : + env.ScriptTests([ + "SendMessage.lua", + "MultipleClients.lua", + ], "Swiften.QA.ScriptedTests", "system") diff --git a/Sluift/client_test.lua b/Swiften/QA/ScriptedTests/SendMessage.lua index 1652083..a3f1917 100644 --- a/Sluift/client_test.lua +++ b/Swiften/QA/ScriptedTests/SendMessage.lua @@ -1,3 +1,9 @@ +-- +-- Copyright (c) 2010 Remko Tronçon +-- Licensed under the GNU General Public License v3. +-- See Documentation/Licenses/GPLv3.txt for more information. +-- + require "sluift" -- sluift.debug = true |