summaryrefslogtreecommitdiff
path: root/test/AS
diff options
context:
space:
mode:
authorDirk Baechle <dl9obn@darc.de>2012-12-18 21:27:01 +0100
committerDirk Baechle <dl9obn@darc.de>2012-12-18 21:27:01 +0100
commit6cede4390b5abb1424e9b79f159cb9567f28bd9c (patch)
tree572754fc81a9a5239eee054407aa455ca8de5af4 /test/AS
parent84d3d7f420f14bf33bea7f4cfc583118731da93f (diff)
downloadscons-6cede4390b5abb1424e9b79f159cb9567f28bd9c.tar.gz
- fixes for MinGW under Windows, mainly skipping MSVS-specific tests
Diffstat (limited to 'test/AS')
-rw-r--r--test/AS/ASFLAGS.py7
-rw-r--r--test/AS/ASPPFLAGS.py4
-rw-r--r--test/AS/as-live.py49
3 files changed, 34 insertions, 26 deletions
diff --git a/test/AS/ASFLAGS.py b/test/AS/ASFLAGS.py
index 024cea31..2cc99e33 100644
--- a/test/AS/ASFLAGS.py
+++ b/test/AS/ASFLAGS.py
@@ -35,10 +35,12 @@ _exe = TestSCons._exe
if sys.platform == 'win32':
-
+ import SCons.Tool.MSCommon as msc
+
o = ' -x'
-
o_c = ' -x'
+ if not msc.msvc_exists():
+ o_c = ' -x -c'
test.write('mylink.py', r"""
import sys
@@ -95,7 +97,6 @@ sys.exit(0)
else:
o = ' -x'
-
o_c = ' -x -c'
test.write('mylink.py', r"""
diff --git a/test/AS/ASPPFLAGS.py b/test/AS/ASPPFLAGS.py
index f8e70a93..731413e7 100644
--- a/test/AS/ASPPFLAGS.py
+++ b/test/AS/ASPPFLAGS.py
@@ -35,10 +35,12 @@ _exe = TestSCons._exe
if sys.platform == 'win32':
+ import SCons.Tool.MSCommon as msc
o = ' -x'
-
o_c = ' -x'
+ if not msc.msvc_exists():
+ o_c = ' -x -c'
test.write('mylink.py', r"""
import sys
diff --git a/test/AS/as-live.py b/test/AS/as-live.py
index 0f7ec380..801eecad 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: