From a48e26fd330a1f5d4e8655e44d407fc53b672587 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sat, 16 Mar 2019 12:36:54 +0100 Subject: Automatically detect if wscript has a test hook --- extras/autowaf.py | 4 ++-- 1 file 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') -- cgit v1.2.1