diff options
author | Steven Knight <knight@baldmt.com> | 2009-12-22 16:43:30 (GMT) |
---|---|---|
committer | Steven Knight <knight@baldmt.com> | 2009-12-22 16:43:30 (GMT) |
commit | 1c92a2a8830379b710cb6749db570850fe15da12 (patch) | |
tree | 7e76681b4bc93e368f833cc60c6f25e56e755513 /bin/calibrate.py | |
parent | dc2ff2f73669c58be2a4deef584ec557b2f0f1f8 (diff) | |
download | SCons-1c92a2a8830379b710cb6749db570850fe15da12.zip SCons-1c92a2a8830379b710cb6749db570850fe15da12.tar.gz SCons-1c92a2a8830379b710cb6749db570850fe15da12.tar.bz2 |
Add a -p option to support calibrating against build SCons packages.
Diffstat (limited to 'bin/calibrate.py')
-rw-r--r-- | bin/calibrate.py | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/bin/calibrate.py b/bin/calibrate.py index c1b4f11..c5d45ce 100644 --- a/bin/calibrate.py +++ b/bin/calibrate.py @@ -34,11 +34,13 @@ def main(argv=None): if argv is None: argv = sys.argv - parser = optparse.OptionParser(usage="calibrate.py [-h] [--min time] [--max time] timings/*/*-run.py") + parser = optparse.OptionParser(usage="calibrate.py [-h] [-p PACKAGE], [--min time] [--max time] timings/*/*-run.py") parser.add_option('--min', type='float', default=9.5, help="minimum acceptable execution time (default 9.5)") parser.add_option('--max', type='float', default=10.00, help="maximum acceptable execution time (default 10.00)") + parser.add_option('-p', '--package', type="string", + help="package type") opts, args = parser.parse_args(argv[1:]) os.environ['TIMESCONS_CALIBRATE'] = '1' @@ -47,7 +49,10 @@ def main(argv=None): if len(args) > 1: print arg + ':' - command = [sys.executable, 'runtest.py', '--noqmtest', arg] + command = [sys.executable, 'runtest.py', '--noqmtest'] + if opts.package: + command.extend(['-p', opts.package]) + command.append(arg) run = 1 good = 0 |