build: only run symbol checking if running all tests
authorAndrew Tridgell <tridge@samba.org>
Wed, 9 Nov 2011 02:08:37 +0000 (13:08 +1100)
committerAndrew Tridgell <tridge@samba.org>
Thu, 10 Nov 2011 03:24:21 +0000 (14:24 +1100)
this makes it much faster to run 1 test

Pair-Programmed-With: Amitay Isaacs <amitay@gmail.com>

Makefile
selftest/wscript

index 055205233210169fc6d906cf9610e6df6f27a4d8..3b40c73d9578505499def9bedb9e0ee1f6cff597 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -13,20 +13,20 @@ uninstall:
        $(WAF) uninstall
 
 test:
-       $(WAF) test --dup-symbol-check $(TEST_OPTIONS)
+       $(WAF) test $(TEST_OPTIONS)
 
 help:
        @echo NOTE: to run extended waf options use $(WAF_BINARY) or modify your PATH
        $(WAF) --help
 
 subunit-test:
-       $(WAF) test --dup-symbol-check --filtered-subunit $(TEST_OPTIONS)
+       $(WAF) test --filtered-subunit $(TEST_OPTIONS)
 
 testenv:
-       $(WAF) test --dup-symbol-check --testenv $(TEST_OPTIONS)
+       $(WAF) test --testenv $(TEST_OPTIONS)
 
 quicktest:
-       $(WAF) test --dup-symbol-check --quick $(TEST_OPTIONS)
+       $(WAF) test --quick $(TEST_OPTIONS)
 
 dist:
        touch .tmplock
index 4d3d8f2841ff1fade633c4765a80326084492737..b469709a8a7af0bcb6105f24ec9a0473b1927d1d 100644 (file)
@@ -205,5 +205,12 @@ def cmd_testonly(opt):
 # main test entry point
 def cmd_test(opt):
     '''Run the test suite (see test options below)'''
+
+    # if running all tests, then force a symbol check
+    env = LOAD_ENVIRONMENT()
+    CHECK_MAKEFLAGS(env)
+    if not Options.options.TESTS:
+        Options.options.DUP_SYMBOLCHECK = True
+
     Scripting.commands.append('build')
     Scripting.commands.append('testonly')