From c2cd6c591196740fd1e7c385288d7fd4f6121850 Mon Sep 17 00:00:00 2001 From: stevenknight Date: Tue, 22 Dec 2009 16:43:30 +0000 Subject: [PATCH] Add a -p option to support calibrating against build SCons packages. git-svn-id: http://scons.tigris.org/svn/scons/trunk@4575 fdb21ef1-2011-0410-befe-b5e4ea1792b1 --- bin/calibrate.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/bin/calibrate.py b/bin/calibrate.py index c1b4f115..c5d45ce6 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 -- 2.26.2