Fix python cross tests
This fixes #670 (closed).
To test, make sure python
is Python 2 and you have a python3
. Then run:
# It is probably a good idea to start from a clean build tree:
# rm -rf build
./waf configure --python=python3
./waf build
On git master, you will get something like this:
File "/home/rlaager/src/ntpsec/ntpsec/wscript", line 902, in bin_test
from wafhelpers.bin_test import cmd_bin_test
File "/home/rlaager/src/ntpsec/ntpsec/wafhelpers/bin_test.py", line 10, in <module>
import ntp.util
File "/home/rlaager/src/ntpsec/ntpsec/build/main/tests/pylib/ntp/util.py", line 16, in <module>
import ntp.ntpc
ImportError: No module named ntpc
With this MR, the tests pass.
The first commit can be squashed into the second, if desired.
The third commit can be squashed into the fourth, too. I kept them separate to ease review.
Edited by Richard Laager