summaryrefslogtreecommitdiff
path: root/devtools
diff options
context:
space:
mode:
authorFred Wright <fw@fwright.net>2016-03-25 18:25:51 -0700
committerEric S. Raymond <esr@thyrsus.com>2016-03-26 15:34:40 -0400
commit6d0f17901b1736619ae7d74067fae58f1cbd747a (patch)
tree8f63958228b04ff45fbebd3b581d2c3fe8999104 /devtools
parent90d0149266c4056692f1ea99a47e1cce044e1e71 (diff)
downloadgpsd-6d0f17901b1736619ae7d74067fae58f1cbd747a.tar.gz
A few fixes and improvements for the broken-build checker.
1) Adds the recently added 'gpsd' and 'gpsdclients' to the test list. 2) Uses 'build-all' rather than 'build', for more complete testing. 3) Fixes a potential ordering issue with the pre-clean. 4) Makes the removal of scons temporaries more complete. 5) Derives the number of jobs from the number of CPUs, rather than hard-coding it. 6) Applies parallelism to "check' as well as 'build-all'. 7) Makes the error-list file names more descriptive. TESTED: Runs and gets a couple of failures, which don't appear to be new problems.
Diffstat (limited to 'devtools')
-rwxr-xr-xdevtools/identify_failing_build_options.py29
1 files changed, 23 insertions, 6 deletions
diff --git a/devtools/identify_failing_build_options.py b/devtools/identify_failing_build_options.py
index 9a53498f..99dedc8d 100755
--- a/devtools/identify_failing_build_options.py
+++ b/devtools/identify_failing_build_options.py
@@ -39,6 +39,8 @@ knobs = [
'garmintxt',
'geostar',
'gpsclock',
+ 'gpsd',
+ 'gpsdclients',
'itrax',
'libgpsmm',
'mtk3301',
@@ -79,8 +81,13 @@ knobs = [
def main(starting_number_of_options=0):
import itertools
+ import multiprocessing
+ import shutil
import subprocess
+ num_cpus = multiprocessing.cpu_count()
+ job_arg = '-j%d' % num_cpus
+
failed_configurations = []
dev_null = open('/dev/null', 'w')
@@ -89,7 +96,7 @@ def main(starting_number_of_options=0):
return True
failed_configurations.append(command)
print command
- with open(phase + '_build_configs.txt', 'a') as failed_configs:
+ with open('failed_%s_configs.txt' % phase, 'a') as failed_configs:
failed_configs.write(' '.join(command) + '\n')
return False
@@ -105,12 +112,22 @@ def main(starting_number_of_options=0):
# print {'on_params': row, 'scons_params': params}
- if os.path.exists('.scons-option-cache'):
- os.remove('.scons-option-cache')
+ # Clean before clearing cached options, in case options
+ # affect what's cleaned.
subprocess.call(['scons', '-c'], stdout=dev_null)
-
- if _run(['scons', '-j9'] + params, 'build'):
- _run(['scons', 'check'] + params, 'check')
+ # Now remove all the scons temporaries
+ try:
+ shutil.rmtree('.sconf_temp')
+ except OSError:
+ pass
+ for f in ['.sconsign.dblite', '.scons-option-cache']:
+ try:
+ os.remove(f)
+ except OSError:
+ pass
+
+ if _run(['scons', job_arg, 'build-all'] + params, 'build'):
+ _run(['scons', job_arg, 'check'] + params, 'check')
return failed_configurations