diff options
Diffstat (limited to 'test/sconsign/script/Signatures.py')
-rw-r--r-- | test/sconsign/script/Signatures.py | 44 |
1 files changed, 32 insertions, 12 deletions
diff --git a/test/sconsign/script/Signatures.py b/test/sconsign/script/Signatures.py index 9a3ce62..fc85133 100644 --- a/test/sconsign/script/Signatures.py +++ b/test/sconsign/script/Signatures.py @@ -35,6 +35,17 @@ import TestSConsign test = TestSConsign.TestSConsign(match = TestSConsign.match_re) +CC = test.detect('CC', norm=1) +LINK = test.detect('LINK', norm=1) +if LINK is None: LINK = CC + +# Note: We don't use os.path.join() representations of the file names +# in the expected output because paths in the .sconsign files are +# canonicalized to use / as the separator. + +sub1_hello_c = 'sub1/hello.c' +sub1_hello_obj = 'sub1/hello.obj' + def re_sep(*args): import os.path import re @@ -90,20 +101,29 @@ test.sleep() 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' + test.run_sconsign(arguments = "-e hello.exe -e hello.obj sub1/.sconsign", - stdout = """\ -hello.exe: \S+ None \d+ \d+ - hello.obj: \S+ -hello.obj: \S+ None \d+ \d+ - hello.c: \S+ -""") + stdout = r"""hello.exe: %(sig_re)s \d+ \d+ + %(sub1_hello_obj)s: %(sig_re)s \d+ \d+ + %(LINK)s: None \d+ \d+ + %(sig_re)s \[.*\] +hello.obj: %(sig_re)s \d+ \d+ + %(sub1_hello_c)s: None \d+ \d+ + %(CC)s: None \d+ \d+ + %(sig_re)s \[.*\] +""" % locals()) test.run_sconsign(arguments = "-e hello.exe -e hello.obj -r sub1/.sconsign", - stdout = """\ -hello.exe: \S+ None '\S+ \S+ [ \d]\d \d\d:\d\d:\d\d \d\d\d\d' \d+ - hello.obj: \S+ -hello.obj: \S+ None '\S+ \S+ [ \d]\d \d\d:\d\d:\d\d \d\d\d\d' \d+ - hello.c: \S+ -""") + stdout = r"""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 \[.*\] +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+ + %(sig_re)s \[.*\] +""" % locals()) test.pass_test() |