diff options
Diffstat (limited to 'test/sconsign/script/dblite.py')
-rw-r--r-- | test/sconsign/script/dblite.py | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/test/sconsign/script/dblite.py b/test/sconsign/script/dblite.py index 289c78b..0daf8bf 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) |