diff options
author | Dirk Baechle <dl9obn@darc.de> | 2012-12-18 20:27:01 (GMT) |
---|---|---|
committer | Dirk Baechle <dl9obn@darc.de> | 2012-12-18 20:27:01 (GMT) |
commit | 66e6ceeca3bfa6af0a367bf57dccb8a591e2a82f (patch) | |
tree | 572754fc81a9a5239eee054407aa455ca8de5af4 /test/AS/as-live.py | |
parent | 02cae725ed116ae6cd996fe3bf5888f7f8f61b97 (diff) | |
download | SCons-66e6ceeca3bfa6af0a367bf57dccb8a591e2a82f.zip SCons-66e6ceeca3bfa6af0a367bf57dccb8a591e2a82f.tar.gz SCons-66e6ceeca3bfa6af0a367bf57dccb8a591e2a82f.tar.bz2 |
- fixes for MinGW under Windows, mainly skipping MSVS-specific tests
Diffstat (limited to 'test/AS/as-live.py')
-rw-r--r-- | test/AS/as-live.py | 49 |
1 files changed, 27 insertions, 22 deletions
diff --git a/test/AS/as-live.py b/test/AS/as-live.py index 0f7ec38..801eeca 100644 --- a/test/AS/as-live.py +++ b/test/AS/as-live.py @@ -47,8 +47,14 @@ x86 = (sys.platform == 'win32' or sys.platform.find('linux') != -1) if not x86: test.skip_test("skipping as test on non-x86 platform '%s'\n" % sys.platform) - - +namelbl = "name" +testccc = """ccc = aaa.Clone(CPPPATH=['.']) +ccc.Program(target = 'ccc', source = ['ccc.S', 'ccc_main.c']) +""" +if sys.platform == "win32": + namelbl = "_name" + testccc = "" + test.write("wrapper.py", """\ import os import sys @@ -59,32 +65,31 @@ os.system(cmd) test.write('SConstruct', """\ aaa = Environment() -bbb = aaa.Clone(AS = r'%(_python_)s wrapper.py ' + WhereIs('as')) -ccc = aaa.Clone(CPPPATH=['.']) aaa.Program(target = 'aaa', source = ['aaa.s', 'aaa_main.c']) +bbb = aaa.Clone(AS = r'%(_python_)s wrapper.py ' + WhereIs('as')) bbb.Program(target = 'bbb', source = ['bbb.s', 'bbb_main.c']) -ccc.Program(target = 'ccc', source = ['ccc.S', 'ccc_main.c']) +%(testccc)s """ % locals()) test.write('aaa.s', """ .file "aaa.s" .data .align 4 -.globl name -name: +.globl %(namelbl)s +%(namelbl)s: .ascii "aaa.s" .byte 0 -""") +""" % locals()) test.write('bbb.s', """\ .file "bbb.s" .data .align 4 -.globl name -name: +.globl %(namelbl)s +%(namelbl)s: .ascii "bbb.s" .byte 0 -""") +""" % locals()) test.write('ccc.h', """\ #define STRING "ccc.S" @@ -162,21 +167,21 @@ test.run() test.run(program = test.workpath('aaa'), stdout = "aaa_main.c aaa.s\n") test.run(program = test.workpath('bbb'), stdout = "bbb_main.c bbb.s\n") -test.run(program = test.workpath('ccc'), stdout = "ccc_main.c ccc.S\n") - -test.must_match('wrapper.out', "wrapper.py: bbb.s\n") -test.write("ccc.h", """\ -#define STRING "ccc.S 2" -""") - -test.run() -test.run(program = test.workpath('ccc'), stdout = "ccc_main.c ccc.S 2\n") +if sys.platform != "win32": + test.run(program = test.workpath('ccc'), stdout = "ccc_main.c ccc.S\n") + + test.must_match('wrapper.out', "wrapper.py: bbb.s\n") + + test.write("ccc.h", """\ + #define STRING "ccc.S 2" + """) + + test.run() + test.run(program = test.workpath('ccc'), stdout = "ccc_main.c ccc.S 2\n") test.unlink('wrapper.out') - - test.pass_test() # Local Variables: |