summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2019-03-16 12:36:54 +0100
committerDavid Robillard <d@drobilla.net>2019-03-17 00:31:46 +0100
commita48e26fd330a1f5d4e8655e44d407fc53b672587 (patch)
tree4a22e8753f6408ec55331614346fec1f20584def
parentef66724def8b14cc93da6c41e5c391e755d4bbd1 (diff)
downloadautowaf-a48e26fd330a1f5d4e8655e44d407fc53b672587.tar.gz
autowaf-a48e26fd330a1f5d4e8655e44d407fc53b672587.tar.bz2
autowaf-a48e26fd330a1f5d4e8655e44d407fc53b672587.zip
Automatically detect if wscript has a test hook
-rw-r--r--extras/autowaf.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/extras/autowaf.py b/extras/autowaf.py
index e539cd4..b241d8f 100644
--- a/extras/autowaf.py
+++ b/extras/autowaf.py
@@ -33,7 +33,7 @@ else:
def include_config_h(self):
self.env.append_value('INCPATHS', self.bld.bldnode.abspath())
-def set_options(opt, debug_by_default=False, test=False):
+def set_options(opt, debug_by_default=False):
"Add standard autowaf options if they havn't been added yet"
global g_step
if g_step > 0:
@@ -78,7 +78,7 @@ def set_options(opt, debug_by_default=False, test=False):
help="build documentation (requires doxygen)")
# Test options
- if test:
+ if hasattr(Context.g_module, 'test'):
test_opts = opt.add_option_group('Test options', '')
opts.add_option('-T', '--test', action='store_true', dest='build_tests',
help='build unit tests')