summaryrefslogtreecommitdiffstats
path: root/test/sconsign
diff options
context:
space:
mode:
authorGary Oberbrunner <garyo@oberbrunner.com>2011-05-15 15:17:57 (GMT)
committerGary Oberbrunner <garyo@oberbrunner.com>2011-05-15 15:17:57 (GMT)
commitbe4d85f186c0a3155d1f90b886ca720ee7efe43e (patch)
treef1c1a38300b862596d79051a1ffc39786f7cd02d /test/sconsign
parentb104e3be7f6a4b5c0716e58086460dd3941151f1 (diff)
downloadSCons-be4d85f186c0a3155d1f90b886ca720ee7efe43e.zip
SCons-be4d85f186c0a3155d1f90b886ca720ee7efe43e.tar.gz
SCons-be4d85f186c0a3155d1f90b886ca720ee7efe43e.tar.bz2
Fix test/sconsign/script/dblite.py test on Windows (adjusted expected result to match actual). Also made failing match_re more verbose for easier test debugging.
Diffstat (limited to 'test/sconsign')
-rw-r--r--test/sconsign/script/dblite.py22
1 files changed, 17 insertions, 5 deletions
diff --git a/test/sconsign/script/dblite.py b/test/sconsign/script/dblite.py
index 2a53b2e..1359dd5 100644
--- a/test/sconsign/script/dblite.py
+++ b/test/sconsign/script/dblite.py
@@ -29,7 +29,7 @@ Verify that various ways of getting at a an sconsign file written with
the default dblite module and default .dblite suffix work correctly.
"""
-import re
+import re,sys
import TestSConsign
@@ -39,8 +39,14 @@ CC = test.detect('CC', norm=1)
LINK = test.detect('LINK', norm=1)
if LINK is None: LINK = CC
-CC = re.escape(CC)
-LINK = re.escape(LINK)
+def escape_drive_case(s):
+ """Turn c\: into [cC]\:"""
+ if re.match(r'^(.)[\\]?:', s):
+ drive=s[0]
+ return '['+drive.lower()+drive.upper()+']'+s[1:]
+
+CC = escape_drive_case(re.escape(CC))
+LINK = escape_drive_case(re.escape(LINK))
test.subdir('sub1', 'sub2')
@@ -101,11 +107,17 @@ test.run(arguments = '. --max-drift=1')
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"""
+embedManifestExeCheck\(target, source, env\)"""
+else:
+ manifest = ''
+
expect = r"""=== sub1:
hello.exe: %(sig_re)s \d+ \d+
%(sub1_hello_obj)s: %(sig_re)s \d+ \d+
%(LINK)s: None \d+ \d+
- %(sig_re)s \[.*\]
+ %(sig_re)s \[.*%(manifest)s\]
hello.obj: %(sig_re)s \d+ \d+
%(sub1_hello_c)s: None \d+ \d+
%(CC)s: None \d+ \d+
@@ -116,7 +128,7 @@ expect_r = """=== sub1:
hello.exe: %(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 \[.*\]
+ %(sig_re)s \[.*%(manifest)s\]
hello.obj: %(sig_re)s '%(date_re)s' \d+
%(sub1_hello_c)s: None '%(date_re)s' \d+
%(CC)s: None '%(date_re)s' \d+