From 604c4c7e621ef996797b4fd4b3371b3271fbb908 Mon Sep 17 00:00:00 2001 From: Steven Knight Date: Thu, 10 Dec 2009 03:42:30 +0000 Subject: Infrastructure to support calibration runs of TimeSCons tests, which only run a full build and report back the values of any variables affecting the configuration, and the elapsed time of the full build. --- timings/CPPPATH/TimeSCons-run.py | 8 +++----- timings/JTimer/TimeSCons-run.py | 6 ++++-- timings/hundred/TimeSCons-run.py | 8 +++----- 3 files changed, 10 insertions(+), 12 deletions(-) (limited to 'timings') diff --git a/timings/CPPPATH/TimeSCons-run.py b/timings/CPPPATH/TimeSCons-run.py index d88042e6..dcee7c5c 100644 --- a/timings/CPPPATH/TimeSCons-run.py +++ b/timings/CPPPATH/TimeSCons-run.py @@ -32,13 +32,11 @@ file #includes the .h file to be found in the last directory in the list. import TestSCons -test = TestSCons.TimeSCons() +test = TestSCons.TimeSCons(variables={'DIR_COUNT':5000}) -dir_count = 5000 - -for d in xrange(dir_count): +for d in xrange(test.variables['DIR_COUNT']): test.subdir('inc_%04d' % d) -test.main(options='DIR_COUNT=%s' % dir_count) +test.main() test.pass_test() diff --git a/timings/JTimer/TimeSCons-run.py b/timings/JTimer/TimeSCons-run.py index 36b016f1..05ffbfb9 100644 --- a/timings/JTimer/TimeSCons-run.py +++ b/timings/JTimer/TimeSCons-run.py @@ -38,6 +38,8 @@ to the Taskmaster so it could be smarter about not re-evaluating Nodes. import TestSCons -target_count = 500 +test = TestSCons.TimeSCons(variables={'TARGET_COUNT':500}) -TestSCons.TimeSCons().main(options='TARGET_COUNT=%d' % target_count) +test.main() + +test.pass_test() diff --git a/timings/hundred/TimeSCons-run.py b/timings/hundred/TimeSCons-run.py index d21db8a5..915c1319 100644 --- a/timings/hundred/TimeSCons-run.py +++ b/timings/hundred/TimeSCons-run.py @@ -33,13 +33,11 @@ equivalent of "echo contents > $TARGET". import TestSCons -test = TestSCons.TimeSCons() +test = TestSCons.TimeSCons(variables={'TARGET_COUNT':500}) -target_count = 500 - -for t in xrange(target_count): +for t in xrange(test.variables['TARGET_COUNT']): open('source_%04d' % t, 'wb' ).write('contents\n') -test.main(options='TARGET_COUNT=%s' % target_count) +test.main() test.pass_test() -- cgit v1.2.1