diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/MSVC/embed-manifest.py | 6 | ||||
-rw-r--r-- | test/MSVC/generate-rc.py | 10 | ||||
-rw-r--r-- | test/MSVC/msvc.py | 3 |
3 files changed, 11 insertions, 8 deletions
diff --git a/test/MSVC/embed-manifest.py b/test/MSVC/embed-manifest.py index 13f1def..c0f8408 100644 --- a/test/MSVC/embed-manifest.py +++ b/test/MSVC/embed-manifest.py @@ -76,14 +76,14 @@ testdll(int argc, char *argv) }
""")
-test.run(arguments = '.')
+test.run(arguments='.')
test.must_exist('test%s' % _exe)
test.must_exist('test%s.manifest' % _exe)
-test.must_contain('exe-extracted.manifest', '</assembly>')
+test.must_contain('exe-extracted.manifest', '</assembly>', mode='r')
test.must_exist('testdll%s' % _dll)
test.must_exist('testdll%s.manifest' % _dll)
-test.must_contain('dll-extracted.manifest', '</assembly>')
+test.must_contain('dll-extracted.manifest', '</assembly>', mode='r')
test.pass_test()
diff --git a/test/MSVC/generate-rc.py b/test/MSVC/generate-rc.py index 40ef95e..00e9090 100644 --- a/test/MSVC/generate-rc.py +++ b/test/MSVC/generate-rc.py @@ -39,15 +39,15 @@ fake_rc = test.workpath('fake_rc.py') test.write(fake_rc, """\ import sys -contents = open(sys.argv[2], 'rb').read() -open(sys.argv[1], 'wb').write("fake_rc.py\\n" + contents) +contents = open(sys.argv[2], 'r').read() +open(sys.argv[1], 'w').write("fake_rc.py\\n" + contents) """) test.write('SConstruct', """ def generate_rc(target, source, env): t = str(target[0]) s = str(source[0]) - tfp = open(t, 'wb') + tfp = open(t, 'w') tfp.write('generate_rc\\n' + open(s, 'r').read()) env = Environment(tools=['msvc'], @@ -64,8 +64,8 @@ test.write('my.in', "my.in\n") test.run(arguments = '.') -test.must_match('my.rc', "generate_rc\nmy.in\n") -test.must_match('my.res', "fake_rc.py\ngenerate_rc\nmy.in\n") +test.must_match('my.rc', "generate_rc\nmy.in\n", mode='r') +test.must_match('my.res', "fake_rc.py\ngenerate_rc\nmy.in\n", mode='r') test.pass_test() diff --git a/test/MSVC/msvc.py b/test/MSVC/msvc.py index a70ed67..838922c 100644 --- a/test/MSVC/msvc.py +++ b/test/MSVC/msvc.py @@ -43,6 +43,7 @@ test.skip_if_not_msvc() test.write('SConstruct',""" import os +DefaultEnvironment(tools=[]) # TODO: this is order-dependent (putting 'mssdk' second or third breaks), # and ideally we shouldn't need to specify the tools= list anyway. env = Environment(tools=['mssdk', 'msvc', 'mslink']) @@ -179,6 +180,8 @@ start = time.time() test.run(arguments='slow.obj', stderr=None) slow = time.time() - start + +# TODO: Reevaluate if having this part of the test makes sense any longer # using precompiled headers should be faster limit = slow*0.90 if fast >= limit: |