[Git][NTPsec/ntpsec][master] Add --disable-unit-tests to accommodate slow systems.
Eric S. Raymond
gitlab at mg.gitlab.com
Sun Nov 13 00:43:29 UTC 2016
Eric S. Raymond pushed to branch master at NTPsec / ntpsec
Commits:
d2a28ecd by Eric S. Raymond at 2016-11-12T19:42:48-05:00
Add --disable-unit-tests to accommodate slow systems.
- - - - -
3 changed files:
- wafhelpers/configure.py
- wafhelpers/options.py
- wscript
Changes:
=====================================
wafhelpers/configure.py
=====================================
--- a/wafhelpers/configure.py
+++ b/wafhelpers/configure.py
@@ -140,6 +140,8 @@ def cmd_configure(ctx, config):
for opt in opt_map:
ctx.env[opt] = opt_map[opt]
+ ctx.env.DISABLE_UNIT_TESTS = ctx.options.disable_unit_tests
+
if ctx.options.cross_compiler:
ctx.env.ENABLE_CROSS = True
=====================================
wafhelpers/options.py
=====================================
--- a/wafhelpers/options.py
+++ b/wafhelpers/options.py
@@ -20,6 +20,7 @@ def options_cmd(ctx, config):
grp.add_option('--disable-mdns-registration', action='store_true', default=False, help="Disable MDNS registration.")
grp.add_option('--enable-classic-mode', action='store_true', default=False, help="Strict configuration and log-format compatibility with NTP Classic")
grp.add_option('--enable-debug-timing', action='store_true', default=False, help="Collect timing statistics for debugging.")
+ grp.add_option('--disable-unit-tests', action='store_true', default=False, help="Suppress running unit tests at end of build.")
grp = ctx.add_option_group("NTP cross compile options")
grp.add_option('--cross-compiler', type='string', help="Path to cross compiler CC. (enables cross-compiling)")
=====================================
wscript
=====================================
--- a/wscript
+++ b/wscript
@@ -184,7 +184,6 @@ def build(ctx):
ctx.recurse("ntptime")
ctx.recurse("pylib")
ctx.recurse("attic")
- ctx.recurse("tests")
scripts = [
"ntpleapfetch/ntpleapfetch",
@@ -211,8 +210,9 @@ def build(ctx):
ctx.manpage(8, "ntpwait/ntpwait-man.txt")
ctx.manpage(1, "ntpsweep/ntpsweep-man.txt")
- # Skip running unit tests on a cross compile build
- if not ctx.env.ENABLE_CROSS:
+ # Skip running unit tests on a cross compile build or if requested
+ if not ctx.env.DISABLE_UNIT_TESTS and not ctx.env.ENABLE_CROSS:
+ ctx.recurse("tests")
# Force re-running of tests. Same as 'waf --alltests'
if ctx.cmd == "check":
ctx.options.all_tests = True
@@ -227,7 +227,7 @@ def build(ctx):
# Print a summary at the end
ctx.add_post_fun(waf_unit_test.summary)
else:
- pprint("YELLOW", "Unit test runner skipped on a cross-compiled build.")
+ pprint("YELLOW", "Unit test runner skipped.")
from waflib import Options
Options.options.no_tests = True
View it on GitLab: https://gitlab.com/NTPsec/ntpsec/commit/d2a28ecd2c21ad9b315ba28a9ae7917191929171
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ntpsec.org/pipermail/vc/attachments/20161113/3bf12976/attachment.html>
More information about the vc
mailing list