summaryrefslogtreecommitdiff
path: root/test/sconsign
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/sconsign
parent84d3d7f420f14bf33bea7f4cfc583118731da93f (diff)
downloadscons-6cede4390b5abb1424e9b79f159cb9567f28bd9c.tar.gz
- fixes for MinGW under Windows, mainly skipping MSVS-specific tests
Diffstat (limited to 'test/sconsign')
-rw-r--r--test/sconsign/script/dblite.py23
1 files changed, 15 insertions, 8 deletions
diff --git a/test/sconsign/script/dblite.py b/test/sconsign/script/dblite.py
index 289c78be..0daf8bf3 100644
--- a/test/sconsign/script/dblite.py
+++ b/test/sconsign/script/dblite.py
@@ -35,6 +35,9 @@ import TestSConsign
test = TestSConsign.TestSConsign(match = TestSConsign.match_re)
+_exe = TestSConsign._exe
+_obj = TestSConsign._obj
+
CC = test.detect('CC', norm=1)
LINK = test.detect('LINK', norm=1)
if LINK is None: LINK = CC
@@ -57,12 +60,12 @@ test.subdir('sub1', 'sub2')
# canonicalized to use / as the separator.
sub1_hello_c = 'sub1/hello.c'
-sub1_hello_obj = 'sub1/hello.obj'
+sub1_hello_obj = 'sub1/hello%s' % _obj
test.write('SConstruct', """
SConsignFile('my_sconsign')
Decider('timestamp-newer')
-env1 = Environment(PROGSUFFIX = '.exe', OBJSUFFIX = '.obj')
+env1 = Environment()
env1.Program('sub1/hello.c')
env2 = env1.Clone(CPPPATH = ['sub2'])
env2.Program('sub2/hello.c')
@@ -110,34 +113,38 @@ sig_re = r'[0-9a-fA-F]{32}'
date_re = r'\S+ \S+ [ \d]\d \d\d:\d\d:\d\d \d\d\d\d'
if sys.platform == 'win32':
- manifest = r"""
+ import SCons.Tool.MSCommon as msc
+ if msc.msvc_exists():
+ manifest = r"""
embedManifestExeCheck\(target, source, env\)"""
+ else:
+ manifest = ''
else:
manifest = ''
expect = r"""=== sub1:
-hello.exe: %(sig_re)s \d+ \d+
+hello%(_exe)s: %(sig_re)s \d+ \d+
%(sub1_hello_obj)s: %(sig_re)s \d+ \d+
%(LINK)s: None \d+ \d+
%(sig_re)s \[.*%(manifest)s\]
-hello.obj: %(sig_re)s \d+ \d+
+hello%(_obj)s: %(sig_re)s \d+ \d+
%(sub1_hello_c)s: None \d+ \d+
%(CC)s: None \d+ \d+
%(sig_re)s \[.*\]
""" % locals()
expect_r = """=== sub1:
-hello.exe: %(sig_re)s '%(date_re)s' \d+
+hello%(_exe)s: %(sig_re)s '%(date_re)s' \d+
%(sub1_hello_obj)s: %(sig_re)s '%(date_re)s' \d+
%(LINK)s: None '%(date_re)s' \d+
%(sig_re)s \[.*%(manifest)s\]
-hello.obj: %(sig_re)s '%(date_re)s' \d+
+hello%(_obj)s: %(sig_re)s '%(date_re)s' \d+
%(sub1_hello_c)s: None '%(date_re)s' \d+
%(CC)s: None '%(date_re)s' \d+
%(sig_re)s \[.*\]
""" % locals()
-common_flags = '-e hello.exe -e hello.obj -d sub1'
+common_flags = '-e hello%(_exe)s -e hello%(_obj)s -d sub1' % locals()
test.run_sconsign(arguments = "%s my_sconsign" % common_flags,
stdout = expect)