diff options
Diffstat (limited to 'test/option/debug-time.py')
-rw-r--r-- | test/option/debug-time.py | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/test/option/debug-time.py b/test/option/debug-time.py index bf18b97d..e8873cfb 100644 --- a/test/option/debug-time.py +++ b/test/option/debug-time.py @@ -117,6 +117,7 @@ scons_time = get_scons_time(stdout) command_time = get_command_time(stdout) failures = [] +warnings = [] if not within_tolerance(expected_command_time, command_time, 0.01): failures.append("""\ @@ -134,15 +135,21 @@ outside of the 1%% tolerance. """ % locals()) if not within_tolerance(total_time, expected_total_time, 0.15): - failures.append("""\ -SCons -j1 reported total build time of %(total_time)s, + # This tolerance check seems empirically to work fine if there's + # a light load on the system, but on a heavily loaded system the + # timings get screwy and it can fail frequently. Some obvious + # attempts to work around the problem didn't, so just treat it as + # a warning for now. + warnings.append("""\ +Warning: SCons -j1 reported total build time of %(total_time)s, but the actual measured build time was %(expected_total_time)s (end-to-end time of %(complete_time)s less Python overhead of %(overhead)s), outside of the 15%% tolerance. """ % locals()) +if failures or warnings: + print string.join([test.stdout()] + failures + warnings, '\n') if failures: - print string.join([test.stdout()] + failures, '\n') test.fail_test(1) test.run(arguments = "--debug=time . SLEEP=0") |