summaryrefslogtreecommitdiff
path: root/SConstruct
diff options
context:
space:
mode:
authorGary E. Miller <gem@rellim.com>2018-09-21 18:41:02 -0700
committerGary E. Miller <gem@rellim.com>2018-09-21 18:41:02 -0700
commite6d209947d200e835cc8e94cf9273bc0f0b5c462 (patch)
tree7205810b6119a3d92949d4ce2ec7edb871046b3e /SConstruct
parent9423470dc70375d766a88aea14f88af4c94c79c8 (diff)
downloadgpsd-e6d209947d200e835cc8e94cf9273bc0f0b5c462.tar.gz
SContruct: check nows runs each python program to check version.
This ensures each program can actually run. A basic first test.
Diffstat (limited to 'SConstruct')
-rw-r--r--SConstruct13
1 files changed, 12 insertions, 1 deletions
diff --git a/SConstruct b/SConstruct
index 71dd86e2..df3c48a6 100644
--- a/SConstruct
+++ b/SConstruct
@@ -1862,7 +1862,7 @@ if len(python_progs) > 0:
'''gps/*.py *.py ''' + " ".join(checkable)])
# Additional Python readability style checks
-if len(python_progs) > 0:
+if python_progs:
pep8 = Utility("pep8",
["jsongen.py", "maskaudit.py", python_built_extensions],
['pycodestyle --ignore=W602,E122,E241 {0} SConstruct '
@@ -1873,6 +1873,16 @@ if len(python_progs) > 0:
['flake8 --ignore=E501,W602,E122,E241,E401 {0} '
'gps/[a-zA-Z]*.py *.py'.format(" ".join(python_progs))])
+ # get version from each python prog
+ # this ensures they can run and gps_versions match
+ vchk = ''
+ for prog in python_progs:
+ vchk += '$SRCDIR/%s -V\n' % prog
+ python_versions = Utility('python-versions', [python_progs], vchk)
+
+else:
+ python_versions = None
+
# Check the documentation for bogons, too
Utility("xmllint", glob.glob("*.xml"),
@@ -2171,6 +2181,7 @@ test_nondaemon = [
method_regress,
packet_regress,
python_compilation_regress,
+ python_versions,
rtcm_regress,
time_regress,
timespec_regress,