[Git][NTPsec/ntpsec][master] Amend: Make `waf bin_test` work with `--enable-pylib=none`
Hal Murray (@hal.murray)
gitlab at mg.gitlab.com
Mon Feb 3 01:49:07 UTC 2025
Hal Murray pushed to branch master at NTPsec / ntpsec
Commits:
7c17c7da by James Browning at 2025-02-03T01:45:50+00:00
Amend: Make `waf bin_test` work with `--enable-pylib=none`
- - - - -
5 changed files:
- pylib/wscript
- tests/option-tester.sh
- tests/wscript
- wafhelpers/bin_test.py
- wscript
Changes:
=====================================
pylib/wscript
=====================================
@@ -11,9 +11,9 @@ def options(opt):
def configure(conf):
conf.load('python')
+ conf.check_python_version((2, 6, 0)) # even when not using it.
if 'none' == conf.env['ntpc']:
return
- conf.check_python_version((2, 6, 0)) # Check ver even in cross
if 'ext' == conf.env['ntpc']: # Extension-only, no embedded
conf.check_python_headers(features='pyext')
try:
=====================================
tests/option-tester.sh
=====================================
@@ -94,7 +94,7 @@ doit ()
# no --disable-manpage on default and all
doit default "--disable-debug-gdb"
-doit minimal "--disable-droproot --disable-mdns-registration --disable-doc --disable-manpage --disable-debug-gdb"
+doit minimal "--disable-droproot --disable-mdns-registration --disable-doc --disable-manpage --disable-debug-gdb --enable-pylib=none"
# This also tests refclocks without DEBUG
doit classic "--enable-classic-mode --refclock=all --disable-doc --disable-manpage --enable-pylib=ffi --disable-debug-gdb"
=====================================
tests/wscript
=====================================
@@ -119,6 +119,9 @@ def build(ctx):
testpylib.get_bld().mkdir()
+ if 'none' == ctx.env['ntpc']:
+ return
+
pypath = pylib.get_bld()
targdir = "tests/pylib"
linkpath = ctx.bldnode.make_node(targdir + "/ntp").abspath()
=====================================
wafhelpers/bin_test.py
=====================================
@@ -101,9 +101,10 @@ def cmd_bin_test(ctx):
if not run(cmd, cmd_map[cmd] % version):
fails += 1
- for cmd in sorted(cmd_map_python):
- if not run(cmd, cmd_map_python[cmd] % version, ctx.env['PYTHON']):
- fails += 1
+ if 'none' != ctx.env['ntpc']:
+ for cmd in sorted(cmd_map_python):
+ if not run(cmd, cmd_map_python[cmd] % version, ctx.env['PYTHON']):
+ fails += 1
if 1 == fails:
bin_test_summary(ctx)
=====================================
wscript
=====================================
@@ -1026,7 +1026,8 @@ def afterparty(ctx):
os.remove(path_source.abspath())
except OSError:
pass
- os.symlink(relpath, path_source.abspath())
+ if 'none' != ctx.env['ntpc']:
+ os.symlink(relpath, path_source.abspath())
python_scripts = set([
View it on GitLab: https://gitlab.com/NTPsec/ntpsec/-/commit/7c17c7da6e956362dc81a06cf5ab7b336ad806eb
--
View it on GitLab: https://gitlab.com/NTPsec/ntpsec/-/commit/7c17c7da6e956362dc81a06cf5ab7b336ad806eb
You're receiving this email because of your account on gitlab.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ntpsec.org/pipermail/vc/attachments/20250203/3478910e/attachment-0001.htm>
More information about the vc
mailing list