Run duplicate symbol check as just another test, rather than as part of "waf test".
authorJelmer Vernooij <jelmer@samba.org>
Mon, 13 Oct 2014 00:48:10 +0000 (17:48 -0700)
committerAndrew Bartlett <abartlet@samba.org>
Tue, 14 Oct 2014 04:44:07 +0000 (06:44 +0200)
This allows it to be scheduled independently as part of a parallel test
run, and reduces the overhead of "waf test".

Change-Id: I780fd2c4dd711ed27df73f56de98e7f1ffd53aaf
Signed-Off-By: Jelmer Vernooij <jelmer@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Bug: https://bugzilla.samba.org/show_bug.cgi?id=10875

buildtools/wafsamba/test_duplicate_symbol.sh [new file with mode: 0755]
selftest/tests.py
selftest/wscript

diff --git a/buildtools/wafsamba/test_duplicate_symbol.sh b/buildtools/wafsamba/test_duplicate_symbol.sh
new file mode 100755 (executable)
index 0000000..712c7e6
--- /dev/null
@@ -0,0 +1,12 @@
+#!/bin/sh
+# Run the waf duplicate symbol check, wrapped in subunit.
+
+. lib/subunit/shell/share/subunit.sh
+
+subunit_start_test duplicate_symbols
+
+if ./buildtools/bin/waf build --dup-symbol-check; then
+       subunit_pass_test duplicate_symbols
+else
+       echo | subunit_fail_test duplicate_symbols
+fi
index a6a5186e82322afc4309aeb6e484b9dc47eb941b..7191fabbab21f457cb7cf08634ca572f81268dcf 100644 (file)
@@ -92,3 +92,4 @@ planpythontestsuite("none", "samba.tests.upgradeprovision")
 planpythontestsuite("none", "samba.tests.xattr")
 planpythontestsuite("none", "samba.tests.ntacls")
 planpythontestsuite("none", "samba.tests.policy")
+plantestsuite("wafsamba.duplicate_symbols", "none", [os.path.join(srcdir(), "buildtools/wafsamba/test_duplicate_symbol.sh")])
index a57f7c17bcf39910b55ec540922cc29112c41c33..f2520c3293ac094877bd6d21192519ea87dbd519 100644 (file)
@@ -243,8 +243,5 @@ def cmd_test(opt):
     # if running all tests, then force a symbol check
     env = LOAD_ENVIRONMENT()
     CHECK_MAKEFLAGS(env)
-    if not Options.options.TESTS and not Options.options.TESTENV:
-        Options.options.DUP_SYMBOLCHECK = True
-
     Scripting.commands.append('build')
     Scripting.commands.append('testonly')