diff options
author | Steven Knight <knight@baldmt.com> | 2002-05-31 23:52:14 (GMT) |
---|---|---|
committer | Steven Knight <knight@baldmt.com> | 2002-05-31 23:52:14 (GMT) |
commit | 78d38667226c4e01ea8d3b1026b2d6db5492d75b (patch) | |
tree | 9185720a12ec97d6d360aad1e2d26cb6dae77b86 /test | |
parent | b87d8ee0fbcb2e9cbc804e29021a1202112f63c7 (diff) | |
download | SCons-78d38667226c4e01ea8d3b1026b2d6db5492d75b.zip SCons-78d38667226c4e01ea8d3b1026b2d6db5492d75b.tar.gz SCons-78d38667226c4e01ea8d3b1026b2d6db5492d75b.tar.bz2 |
Windows NT portability.
Diffstat (limited to 'test')
-rw-r--r-- | test/SharedLibrary.py | 2 | ||||
-rw-r--r-- | test/option--debug.py | 22 | ||||
-rw-r--r-- | test/timestamp-fallback.py | 16 |
3 files changed, 27 insertions, 13 deletions
diff --git a/test/SharedLibrary.py b/test/SharedLibrary.py index 8675c4b..e1b832c 100644 --- a/test/SharedLibrary.py +++ b/test/SharedLibrary.py @@ -182,7 +182,7 @@ test.run(program = test.workpath('prog'), stdout = "f1.c\nf2a.c\nf2b.c\nf2c.c\nf3a.c\nf3b.c\nf3c.c\nprog.c\n") test.run(arguments = '-f SConstructFoo', status=2, stderr=''' -SCons error: Source file: foo.o must be built with shared=1 in order to be compatible with the selected target. +SCons error: Source file: foo\..* must be built with shared=1 in order to be compatible with the selected target. File ".*", line .*, in .* ''' ) diff --git a/test/option--debug.py b/test/option--debug.py index a4cf39a..95a3a9c 100644 --- a/test/option--debug.py +++ b/test/option--debug.py @@ -158,15 +158,19 @@ test.run(arguments = "--debug=time .") expected_total_time = time.time() - start_time - overhead line = string.split(test.stdout(), '\n') -expected_command_time = num(r'Command execution time: (\d+\.\d+) seconds', line[1]) -expected_command_time = expected_command_time + num(r'Command execution time: (\d+\.\d+) seconds', line[3]) -expected_command_time = expected_command_time + num(r'Command execution time: (\d+\.\d+) seconds', line[5]) -expected_command_time = expected_command_time + num(r'Command execution time: (\d+\.\d+) seconds', line[6]) - -total_time = num(r'Total build time: (\d+\.\d+) seconds', line[7]) -sconscript_time = num(r'Total SConscript file execution time: (\d+\.\d+) seconds', line[8]) -scons_time = num(r'Total SCons execution time: (\d+\.\d+) seconds', line[9]) -command_time = num(r'Total command execution time: (\d+\.\d+) seconds', line[10]) +cmdline = filter(lambda x: x[:23] == "Command execution time:", line) + +expected_command_time = num(r'Command execution time: (\d+\.\d+) seconds', cmdline[0]) +expected_command_time = expected_command_time + num(r'Command execution time: (\d+\.\d+) seconds', cmdline[1]) +expected_command_time = expected_command_time + num(r'Command execution time: (\d+\.\d+) seconds', cmdline[2]) +expected_command_time = expected_command_time + num(r'Command execution time: (\d+\.\d+) seconds', cmdline[3]) + +totalline = filter(lambda x: x[:6] == "Total ", line) + +total_time = num(r'Total build time: (\d+\.\d+) seconds', totalline[0]) +sconscript_time = num(r'Total SConscript file execution time: (\d+\.\d+) seconds', totalline[1]) +scons_time = num(r'Total SCons execution time: (\d+\.\d+) seconds', totalline[2]) +command_time = num(r'Total command execution time: (\d+\.\d+) seconds', totalline[3]) def check(expected, actual, tolerance): return abs((expected-actual)/actual) <= tolerance diff --git a/test/timestamp-fallback.py b/test/timestamp-fallback.py index bfa4600..8f5e262 100644 --- a/test/timestamp-fallback.py +++ b/test/timestamp-fallback.py @@ -24,14 +24,24 @@ __revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__" -import os.path +import imp import os -import string -import sys +import os.path + import TestSCons test = TestSCons.TestSCons() +try: + file, name, desc = imp.find_module('md5') +except ImportError: + pass +else: + if desc[2] == imp.C_BUILTIN: + print "The 'md5' module is built in to this version of Python." + print "Cannot test falling back to timestamps." + test.no_result(1); + test.write('md5.py', r""" raise ImportError """) |