diff options
Diffstat (limited to 'test/sconsign/script')
| -rw-r--r-- | test/sconsign/script/Configure.py | 102 | ||||
| -rw-r--r-- | test/sconsign/script/SConsignFile.py | 471 | ||||
| -rw-r--r-- | test/sconsign/script/Signatures.py | 180 | ||||
| -rw-r--r-- | test/sconsign/script/bad.py | 67 | ||||
| -rw-r--r-- | test/sconsign/script/dblite.py | 173 | ||||
| -rw-r--r-- | test/sconsign/script/no-SConsignFile.py | 304 |
6 files changed, 1297 insertions, 0 deletions
diff --git a/test/sconsign/script/Configure.py b/test/sconsign/script/Configure.py new file mode 100644 index 0000000..679f084 --- /dev/null +++ b/test/sconsign/script/Configure.py @@ -0,0 +1,102 @@ +#!/usr/bin/env python +# +# __COPYRIGHT__ +# +# Permission is hereby granted, free of charge, to any person obtaining +# a copy of this software and associated documentation files (the +# "Software"), to deal in the Software without restriction, including +# without limitation the rights to use, copy, modify, merge, publish, +# distribute, sublicense, and/or sell copies of the Software, and to +# permit persons to whom the Software is furnished to do so, subject to +# the following conditions: +# +# The above copyright notice and this permission notice shall be included +# in all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY +# KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE +# WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +# + +__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__" + +""" +Verify that we can print .sconsign files with Configure context +info in them (which have different BuildInfo entries). +""" + +import os +import re + +import TestSCons +import TestSConsign + +_obj = TestSCons._obj + +test = TestSConsign.TestSConsign(match = TestSConsign.match_re, + diff = TestSConsign.diff_re) + +# Note: Here we pass the full search PATH of our current system to +# the detect() method. This way we try to ensure that we find the same +# compiler executable as the SConstruct below, which uses +# os.environ['PATH'] too. +CC = test.detect('CC', ENV={'PATH' : os.environ.get('PATH','')}, norm=1) +CC_dir, CC_file = os.path.split(CC) + +CC = re.escape(CC) +CC_dir = re.escape(os.path.normcase(CC_dir)) +CC_file = re.escape(CC_file) + +# 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. + +_sconf_temp_conftest_0_c = '.sconf_temp/conftest_0.c' + +test.write('SConstruct', """ +import os +env = Environment(ENV={'PATH' : os.environ.get('PATH','')}) +conf = Configure(env) +r1 = conf.CheckCHeader( 'math.h' ) +env = conf.Finish() +""") + +test.run(arguments = '.') + +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' + +# Note: There's a space at the end of the '.*': line, because the +# Value node being printed actually begins with a newline. It would +# probably be good to change that to a repr() of the contents. +expect = r"""=== .: +SConstruct: None \d+ \d+ +=== .sconf_temp: +conftest_0.c: + '.*': +#include "math.h" + + + %(sig_re)s \[.*\] +conftest_0%(_obj)s: + %(_sconf_temp_conftest_0_c)s: %(sig_re)s \d+ \d+ + %(CC)s: %(sig_re)s \d+ \d+ + %(sig_re)s \[.*\] +=== %(CC_dir)s: +%(CC_file)s: %(sig_re)s \d+ \d+ +""" % locals() + +test.run_sconsign(arguments = ".sconsign", + stdout = expect) + +test.pass_test() + +# Local Variables: +# tab-width:4 +# indent-tabs-mode:nil +# End: +# vim: set expandtab tabstop=4 shiftwidth=4: diff --git a/test/sconsign/script/SConsignFile.py b/test/sconsign/script/SConsignFile.py new file mode 100644 index 0000000..74fb1f0 --- /dev/null +++ b/test/sconsign/script/SConsignFile.py @@ -0,0 +1,471 @@ +#!/usr/bin/env python +# +# __COPYRIGHT__ +# +# Permission is hereby granted, free of charge, to any person obtaining +# a copy of this software and associated documentation files (the +# "Software"), to deal in the Software without restriction, including +# without limitation the rights to use, copy, modify, merge, publish, +# distribute, sublicense, and/or sell copies of the Software, and to +# permit persons to whom the Software is furnished to do so, subject to +# the following conditions: +# +# The above copyright notice and this permission notice shall be included +# in all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY +# KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE +# WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +# + +__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__" + +""" +Verify that the sconsign script works with files generated when +using the signatures in an SConsignFile(). +""" + +import re + +import TestSCons +import TestSConsign + +test = TestSConsign.TestSConsign(match = TestSConsign.match_re) + +test.subdir('sub1', 'sub2') + +fake_cc_py = test.workpath('fake_cc.py') +fake_link_py = test.workpath('fake_link.py') + +test.write(fake_cc_py, r"""#!/usr/bin/env python +import os +import re +import sys + +path = sys.argv[1].split() +output = open(sys.argv[2], 'wb') +input = open(sys.argv[3], 'rb') + +output.write('fake_cc.py: %s\n' % sys.argv) + +def find_file(f): + for dir in path: + p = dir + os.sep + f + if os.path.exists(p): + return open(p, 'rb') + return None + +def process(infp, outfp): + for line in infp.readlines(): + m = re.match('#include <(.*)>', line) + if m: + file = m.group(1) + process(find_file(file), outfp) + else: + outfp.write(line) + +process(input, output) + +sys.exit(0) +""") + +test.write(fake_link_py, r"""#!/usr/bin/env python +import sys + +output = open(sys.argv[1], 'wb') +input = open(sys.argv[2], 'rb') + +output.write('fake_link.py: %s\n' % sys.argv) + +output.write(input.read()) + +sys.exit(0) +""") + +test.chmod(fake_cc_py, 0755) +test.chmod(fake_link_py, 0755) + +# 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' +sub2_hello_c = 'sub2/hello.c' +sub2_hello_obj = 'sub2/hello.obj' +sub2_inc1_h = 'sub2/inc1.h' +sub2_inc2_h = 'sub2/inc2.h' + +test.write(['SConstruct'], """\ +SConsignFile() +env1 = Environment(PROGSUFFIX = '.exe', + OBJSUFFIX = '.obj', + CCCOM = [[r'%(fake_cc_py)s', 'sub2', '$TARGET', '$SOURCE']], + LINKCOM = [[r'%(fake_link_py)s', '$TARGET', '$SOURCE']]) +env1.PrependENVPath('PATHEXT', '.PY') +env1.Program('sub1/hello.c') +env2 = env1.Clone(CPPPATH = ['sub2']) +env2.Program('sub2/hello.c') +""" % locals()) + +test.write(['sub1', 'hello.c'], r""" +sub1/hello.c +""") + +test.write(['sub2', 'hello.c'], r""" +#include <inc1.h> +#include <inc2.h> +int +main(int argc, char *argv[]) +{ + argv[argc++] = "--"; + printf("sub2/goodbye.c\n"); + exit (0); +} +""") + +test.write(['sub2', 'inc1.h'], r"""\ +#define STRING1 "inc1.h" +""") + +test.write(['sub2', 'inc2.h'], r"""\ +#define STRING2 "inc2.h" +""") + +test.run(arguments = '--implicit-cache .') + +sig_re = r'[0-9a-fA-F]{32}' + +test.run_sconsign(arguments = ".sconsign", + stdout = r"""=== .: +SConstruct: None \d+ \d+ +fake_cc\.py: %(sig_re)s \d+ \d+ +fake_link\.py: %(sig_re)s \d+ \d+ +=== sub1: +hello.c: %(sig_re)s \d+ \d+ +hello.exe: %(sig_re)s \d+ \d+ + %(sub1_hello_obj)s: %(sig_re)s \d+ \d+ + fake_link\.py: %(sig_re)s \d+ \d+ + %(sig_re)s \[.*\] +hello.obj: %(sig_re)s \d+ \d+ + %(sub1_hello_c)s: %(sig_re)s \d+ \d+ + fake_cc\.py: %(sig_re)s \d+ \d+ + %(sig_re)s \[.*\] +=== sub2: +hello.c: %(sig_re)s \d+ \d+ +hello.exe: %(sig_re)s \d+ \d+ + %(sub2_hello_obj)s: %(sig_re)s \d+ \d+ + fake_link\.py: %(sig_re)s \d+ \d+ + %(sig_re)s \[.*\] +hello.obj: %(sig_re)s \d+ \d+ + %(sub2_hello_c)s: %(sig_re)s \d+ \d+ + %(sub2_inc1_h)s: %(sig_re)s \d+ \d+ + %(sub2_inc2_h)s: %(sig_re)s \d+ \d+ + fake_cc\.py: %(sig_re)s \d+ \d+ + %(sig_re)s \[.*\] +inc1.h: %(sig_re)s \d+ \d+ +inc2.h: %(sig_re)s \d+ \d+ +""" % locals()) + +test.run_sconsign(arguments = "--raw .sconsign", + stdout = r"""=== .: +SConstruct: {'csig': None, 'timestamp': \d+L?, 'size': \d+L?, '_version_id': 2} +fake_cc\.py: {'csig': '%(sig_re)s', 'timestamp': \d+L?, 'size': \d+L?, '_version_id': 2} +fake_link\.py: {'csig': '%(sig_re)s', 'timestamp': \d+L?, 'size': \d+L?, '_version_id': 2} +=== sub1: +hello.c: {'csig': '%(sig_re)s', 'timestamp': \d+L?, 'size': \d+L?, '_version_id': 2} +hello.exe: {'csig': '%(sig_re)s', 'timestamp': \d+L?, 'size': \d+L?, '_version_id': 2} + %(sub1_hello_obj)s: {'csig': '%(sig_re)s', 'timestamp': \d+L?, 'size': \d+L?, '_version_id': 2} + fake_link\.py: {'csig': '%(sig_re)s', 'timestamp': \d+L?, 'size': \d+L?, '_version_id': 2} + %(sig_re)s \[.*\] +hello.obj: {'csig': '%(sig_re)s', 'timestamp': \d+L?, 'size': \d+L?, '_version_id': 2} + %(sub1_hello_c)s: {'csig': '%(sig_re)s', 'timestamp': \d+L?, 'size': \d+L?, '_version_id': 2} + fake_cc\.py: {'csig': '%(sig_re)s', 'timestamp': \d+L?, 'size': \d+L?, '_version_id': 2} + %(sig_re)s \[.*\] +=== sub2: +hello.c: {'csig': '%(sig_re)s', 'timestamp': \d+L?, 'size': \d+L?, '_version_id': 2} +hello.exe: {'csig': '%(sig_re)s', 'timestamp': \d+L?, 'size': \d+L?, '_version_id': 2} + %(sub2_hello_obj)s: {'csig': '%(sig_re)s', 'timestamp': \d+L?, 'size': \d+L?, '_version_id': 2} + fake_link\.py: {'csig': '%(sig_re)s', 'timestamp': \d+L?, 'size': \d+L?, '_version_id': 2} + %(sig_re)s \[.*\] +hello.obj: {'csig': '%(sig_re)s', 'timestamp': \d+L?, 'size': \d+L?, '_version_id': 2} + %(sub2_hello_c)s: {'csig': '%(sig_re)s', 'timestamp': \d+L?, 'size': \d+L?, '_version_id': 2} + %(sub2_inc1_h)s: {'csig': '%(sig_re)s', 'timestamp': \d+L?, 'size': \d+L?, '_version_id': 2} + %(sub2_inc2_h)s: {'csig': '%(sig_re)s', 'timestamp': \d+L?, 'size': \d+L?, '_version_id': 2} + fake_cc\.py: {'csig': '%(sig_re)s', 'timestamp': \d+L?, 'size': \d+L?, '_version_id': 2} + %(sig_re)s \[.*\] +inc1.h: {'csig': '%(sig_re)s', 'timestamp': \d+L?, 'size': \d+L?, '_version_id': 2} +inc2.h: {'csig': '%(sig_re)s', 'timestamp': \d+L?, 'size': \d+L?, '_version_id': 2} +""" % locals()) + +expect = r"""=== .: +SConstruct: + csig: None + timestamp: \d+ + size: \d+ +fake_cc\.py: + csig: %(sig_re)s + timestamp: \d+ + size: \d+ +fake_link\.py: + csig: %(sig_re)s + timestamp: \d+ + size: \d+ +=== sub1: +hello.c: + csig: %(sig_re)s + timestamp: \d+ + size: \d+ +hello.exe: + csig: %(sig_re)s + timestamp: \d+ + size: \d+ + implicit: + %(sub1_hello_obj)s: + csig: %(sig_re)s + timestamp: \d+ + size: \d+ + fake_link\.py: + csig: %(sig_re)s + timestamp: \d+ + size: \d+ + action: %(sig_re)s \[.*\] +hello.obj: + csig: %(sig_re)s + timestamp: \d+ + size: \d+ + implicit: + %(sub1_hello_c)s: + csig: %(sig_re)s + timestamp: \d+ + size: \d+ + fake_cc\.py: + csig: %(sig_re)s + timestamp: \d+ + size: \d+ + action: %(sig_re)s \[.*\] +=== sub2: +hello.c: + csig: %(sig_re)s + timestamp: \d+ + size: \d+ +hello.exe: + csig: %(sig_re)s + timestamp: \d+ + size: \d+ + implicit: + %(sub2_hello_obj)s: + csig: %(sig_re)s + timestamp: \d+ + size: \d+ + fake_link\.py: + csig: %(sig_re)s + timestamp: \d+ + size: \d+ + action: %(sig_re)s \[.*\] +hello.obj: + csig: %(sig_re)s + timestamp: \d+ + size: \d+ + implicit: + %(sub2_hello_c)s: + csig: %(sig_re)s + timestamp: \d+ + size: \d+ + %(sub2_inc1_h)s: + csig: %(sig_re)s + timestamp: \d+ + size: \d+ + %(sub2_inc2_h)s: + csig: %(sig_re)s + timestamp: \d+ + size: \d+ + fake_cc\.py: + csig: %(sig_re)s + timestamp: \d+ + size: \d+ + action: %(sig_re)s \[.*\] +inc1.h: + csig: %(sig_re)s + timestamp: \d+ + size: \d+ +inc2.h: + csig: %(sig_re)s + timestamp: \d+ + size: \d+ +""" % locals() + +test.run_sconsign(arguments = "-v .sconsign", stdout=expect) + +test.run_sconsign(arguments = "-c -v .sconsign", + stdout = r"""=== .: +SConstruct: + csig: None +fake_cc\.py: + csig: %(sig_re)s +fake_link\.py: + csig: %(sig_re)s +=== sub1: +hello.c: + csig: %(sig_re)s +hello.exe: + csig: %(sig_re)s +hello.obj: + csig: %(sig_re)s +=== sub2: +hello.c: + csig: %(sig_re)s +hello.exe: + csig: %(sig_re)s +hello.obj: + csig: %(sig_re)s +inc1.h: + csig: %(sig_re)s +inc2.h: + csig: %(sig_re)s +""" % locals()) + +test.run_sconsign(arguments = "-s -v .sconsign", + stdout = r"""=== .: +SConstruct: + size: \d+ +fake_cc\.py: + size: \d+ +fake_link\.py: + size: \d+ +=== sub1: +hello.c: + size: \d+ +hello.exe: + size: \d+ +hello.obj: + size: \d+ +=== sub2: +hello.c: + size: \d+ +hello.exe: + size: \d+ +hello.obj: + size: \d+ +inc1.h: + size: \d+ +inc2.h: + size: \d+ +""" % locals()) + +test.run_sconsign(arguments = "-t -v .sconsign", + stdout = r"""=== .: +SConstruct: + timestamp: \d+ +fake_cc\.py: + timestamp: \d+ +fake_link\.py: + timestamp: \d+ +=== sub1: +hello.c: + timestamp: \d+ +hello.exe: + timestamp: \d+ +hello.obj: + timestamp: \d+ +=== sub2: +hello.c: + timestamp: \d+ +hello.exe: + timestamp: \d+ +hello.obj: + timestamp: \d+ +inc1.h: + timestamp: \d+ +inc2.h: + timestamp: \d+ +""" % locals()) + +test.run_sconsign(arguments = "-e hello.obj .sconsign", + stdout = r"""=== .: +=== sub1: +hello.obj: %(sig_re)s \d+ \d+ + %(sub1_hello_c)s: %(sig_re)s \d+ \d+ + fake_cc\.py: %(sig_re)s \d+ \d+ + %(sig_re)s \[.*\] +=== sub2: +hello.obj: %(sig_re)s \d+ \d+ + %(sub2_hello_c)s: %(sig_re)s \d+ \d+ + %(sub2_inc1_h)s: %(sig_re)s \d+ \d+ + %(sub2_inc2_h)s: %(sig_re)s \d+ \d+ + fake_cc\.py: %(sig_re)s \d+ \d+ + %(sig_re)s \[.*\] +""" % locals(), + stderr = r"""sconsign: no entry `hello\.obj' in `\.' +""" % locals()) + +test.run_sconsign(arguments = "-e hello.obj -e hello.exe -e hello.obj .sconsign", + stdout = r"""=== .: +=== sub1: +hello.obj: %(sig_re)s \d+ \d+ + %(sub1_hello_c)s: %(sig_re)s \d+ \d+ + fake_cc\.py: %(sig_re)s \d+ \d+ + %(sig_re)s \[.*\] +hello.exe: %(sig_re)s \d+ \d+ + %(sub1_hello_obj)s: %(sig_re)s \d+ \d+ + fake_link\.py: %(sig_re)s \d+ \d+ + %(sig_re)s \[.*\] +hello.obj: %(sig_re)s \d+ \d+ + %(sub1_hello_c)s: %(sig_re)s \d+ \d+ + fake_cc\.py: %(sig_re)s \d+ \d+ + %(sig_re)s \[.*\] +=== sub2: +hello.obj: %(sig_re)s \d+ \d+ + %(sub2_hello_c)s: %(sig_re)s \d+ \d+ + %(sub2_inc1_h)s: %(sig_re)s \d+ \d+ + %(sub2_inc2_h)s: %(sig_re)s \d+ \d+ + fake_cc\.py: %(sig_re)s \d+ \d+ + %(sig_re)s \[.*\] +hello.exe: %(sig_re)s \d+ \d+ + %(sub2_hello_obj)s: %(sig_re)s \d+ \d+ + fake_link\.py: %(sig_re)s \d+ \d+ + %(sig_re)s \[.*\] +hello.obj: %(sig_re)s \d+ \d+ + %(sub2_hello_c)s: %(sig_re)s \d+ \d+ + %(sub2_inc1_h)s: %(sig_re)s \d+ \d+ + %(sub2_inc2_h)s: %(sig_re)s \d+ \d+ + fake_cc\.py: %(sig_re)s \d+ \d+ + %(sig_re)s \[.*\] +""" % locals(), + stderr = r"""sconsign: no entry `hello\.obj' in `\.' +sconsign: no entry `hello\.exe' in `\.' +sconsign: no entry `hello\.obj' in `\.' +""" % locals()) + +#test.run_sconsign(arguments = "-i -v .sconsign", +# stdout = r"""=== sub1: +#hello.exe: +# implicit: +# hello.obj: %(sig_re)s +#hello.obj: +# implicit: +# hello.c: %(sig_re)s +#=== sub2: +#hello.exe: +# implicit: +# hello.obj: %(sig_re)s +#hello.obj: +# implicit: +# hello.c: %(sig_re)s +# inc1.h: %(sig_re)s +# inc2.h: %(sig_re)s +#inc1.h: %(sig_re)s +#inc2.h: %(sig_re)s +#""" % locals()) + +test.pass_test() + +# Local Variables: +# tab-width:4 +# indent-tabs-mode:nil +# End: +# vim: set expandtab tabstop=4 shiftwidth=4: diff --git a/test/sconsign/script/Signatures.py b/test/sconsign/script/Signatures.py new file mode 100644 index 0000000..cfd2a7f --- /dev/null +++ b/test/sconsign/script/Signatures.py @@ -0,0 +1,180 @@ +#!/usr/bin/env python +# +# __COPYRIGHT__ +# +# Permission is hereby granted, free of charge, to any person obtaining +# a copy of this software and associated documentation files (the +# "Software"), to deal in the Software without restriction, including +# without limitation the rights to use, copy, modify, merge, publish, +# distribute, sublicense, and/or sell copies of the Software, and to +# permit persons to whom the Software is furnished to do so, subject to +# the following conditions: +# +# The above copyright notice and this permission notice shall be included +# in all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY +# KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE +# WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +# + +__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__" + +""" +Verify that the sconsign script works when using a .sconsign file in +each subdirectory (SConsignFile(None)) written with the non-default +value of Decider('timestamp-newer'). + +This used to test the non-default combination of +SourceSignatures('timestamp') with TargetSignatures('content'). +""" + +import TestSCons +import TestSConsign + +test = TestSConsign.TestSConsign(match = TestSConsign.match_re) + +# 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' + +test.subdir('sub1', 'sub2') + +# Because this test sets SConsignFile(None), we execute our fake +# scripts directly, not by feeding them to the Python executable. +# That is, we chmod 0755 and us a "#!/usr/bin/env python" first +# line for POSIX systems, and add .PY to the %PATHEXT% variable on +# Windows. If we didn't do this, then running this script with +# suitable prileveges would create a .sconsign file in the directory +# where the Python executable lives. This can happen out of the +# box on Mac OS X, with the result that the .sconsign statefulness +# can mess up other tests. + +fake_cc_py = test.workpath('fake_cc.py') +fake_link_py = test.workpath('fake_link.py') + +test.write(fake_cc_py, r"""#!/usr/bin/env python +import os +import re +import sys + +path = sys.argv[1].split() +output = open(sys.argv[2], 'wb') +input = open(sys.argv[3], 'rb') + +output.write('fake_cc.py: %s\n' % sys.argv) + +def find_file(f): + for dir in path: + p = dir + os.sep + f + if os.path.exists(p): + return open(p, 'rb') + return None + +def process(infp, outfp): + for line in infp.readlines(): + m = re.match('#include <(.*)>', line) + if m: + file = m.group(1) + process(find_file(file), outfp) + else: + outfp.write(line) + +process(input, output) + +sys.exit(0) +""") + +test.write(fake_link_py, r"""#!/usr/bin/env python +import sys + +output = open(sys.argv[1], 'wb') +input = open(sys.argv[2], 'rb') + +output.write('fake_link.py: %s\n' % sys.argv) + +output.write(input.read()) + +sys.exit(0) +""") + +test.chmod(fake_cc_py, 0755) +test.chmod(fake_link_py, 0755) + +test.write('SConstruct', """ +SConsignFile(None) +Decider('timestamp-newer') +env1 = Environment(PROGSUFFIX = '.exe', + OBJSUFFIX = '.obj', + # Specify the command lines with lists-of-lists so + # finding the implicit dependencies works even with + # spaces in the fake_*_py path names. + CCCOM = [[r'%(fake_cc_py)s', 'sub2', '$TARGET', '$SOURCE']], + LINKCOM = [[r'%(fake_link_py)s', '$TARGET', '$SOURCE']]) +env1.PrependENVPath('PATHEXT', '.PY') +env1.Program('sub1/hello.c') +env2 = env1.Clone(CPPPATH = ['sub2']) +env2.Program('sub2/hello.c') +""" % locals()) + +test.write(['sub1', 'hello.c'], r"""\ +sub1/hello.c +""") + +test.write(['sub2', 'hello.c'], r"""\ +#include <inc1.h> +#include <inc2.h> +sub2/hello.c +""") + +test.write(['sub2', 'inc1.h'], r"""\ +#define STRING1 "inc1.h" +""") + +test.write(['sub2', 'inc2.h'], r"""\ +#define STRING2 "inc2.h" +""") + +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 = r"""hello.exe: %(sig_re)s \d+ \d+ + %(sub1_hello_obj)s: %(sig_re)s \d+ \d+ + fake_link\.py: None \d+ \d+ + %(sig_re)s \[.*\] +hello.obj: %(sig_re)s \d+ \d+ + %(sub1_hello_c)s: None \d+ \d+ + fake_cc\.py: None \d+ \d+ + %(sig_re)s \[.*\] +""" % locals()) + +test.run_sconsign(arguments = "-e hello.exe -e hello.obj -r sub1/.sconsign", + stdout = r"""hello.exe: %(sig_re)s '%(date_re)s' \d+ + %(sub1_hello_obj)s: %(sig_re)s '%(date_re)s' \d+ + fake_link\.py: 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+ + fake_cc\.py: None '%(date_re)s' \d+ + %(sig_re)s \[.*\] +""" % locals()) + +test.pass_test() + +# Local Variables: +# tab-width:4 +# indent-tabs-mode:nil +# End: +# vim: set expandtab tabstop=4 shiftwidth=4: diff --git a/test/sconsign/script/bad.py b/test/sconsign/script/bad.py new file mode 100644 index 0000000..fc21577 --- /dev/null +++ b/test/sconsign/script/bad.py @@ -0,0 +1,67 @@ +#!/usr/bin/env python +# +# __COPYRIGHT__ +# +# Permission is hereby granted, free of charge, to any person obtaining +# a copy of this software and associated documentation files (the +# "Software"), to deal in the Software without restriction, including +# without limitation the rights to use, copy, modify, merge, publish, +# distribute, sublicense, and/or sell copies of the Software, and to +# permit persons to whom the Software is furnished to do so, subject to +# the following conditions: +# +# The above copyright notice and this permission notice shall be included +# in all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY +# KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE +# WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +# + +__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__" + +""" +Verify that the sconsign script generates appropriate error messages when +passed various non-existent or bad sconsign files as arguments. +""" + +import TestSConsign + +test = TestSConsign.TestSConsign(match = TestSConsign.match_re) + +test.write('bad1', "bad1\n") +test.write('bad2.dblite', "bad2.dblite\n") +test.write('bad3', "bad3\n") + +test.run_sconsign(arguments = "-f dblite no_sconsign", + stderr = "sconsign: \[Errno 2\] No such file or directory: 'no_sconsign'\n") + +test.run_sconsign(arguments = "-f dblite bad1", + stderr = "sconsign: \[Errno 2\] No such file or directory: 'bad1.dblite'\n") + +test.run_sconsign(arguments = "-f dblite bad1.dblite", + stderr = "sconsign: \[Errno 2\] No such file or directory: 'bad1.dblite'\n") + +test.run_sconsign(arguments = "-f dblite bad2", + stderr = "sconsign: ignoring invalid `dblite' file `bad2'\n") + +test.run_sconsign(arguments = "-f dblite bad2.dblite", + stderr = "sconsign: ignoring invalid `dblite' file `bad2.dblite'\n") + +test.run_sconsign(arguments = "-f sconsign no_sconsign", + stderr = "sconsign: \[Errno 2\] No such file or directory: 'no_sconsign'\n") + +test.run_sconsign(arguments = "-f sconsign bad3", + stderr = "sconsign: ignoring invalid .sconsign file `bad3'\n") + +test.pass_test() + +# Local Variables: +# tab-width:4 +# indent-tabs-mode:nil +# End: +# vim: set expandtab tabstop=4 shiftwidth=4: diff --git a/test/sconsign/script/dblite.py b/test/sconsign/script/dblite.py new file mode 100644 index 0000000..0daf8bf --- /dev/null +++ b/test/sconsign/script/dblite.py @@ -0,0 +1,173 @@ +#!/usr/bin/env python +# +# __COPYRIGHT__ +# +# Permission is hereby granted, free of charge, to any person obtaining +# a copy of this software and associated documentation files (the +# "Software"), to deal in the Software without restriction, including +# without limitation the rights to use, copy, modify, merge, publish, +# distribute, sublicense, and/or sell copies of the Software, and to +# permit persons to whom the Software is furnished to do so, subject to +# the following conditions: +# +# The above copyright notice and this permission notice shall be included +# in all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY +# KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE +# WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +# + +__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__" + +""" +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,sys + +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 + +def escape_drive_case(s): + """Turn c\: into [cC]\:""" + if re.match(r'^(.)[\\]?:', s): + drive=s[0] + return '['+drive.lower()+drive.upper()+']'+s[1:] + else: + return s + +CC = escape_drive_case(re.escape(CC)) +LINK = escape_drive_case(re.escape(LINK)) + +test.subdir('sub1', 'sub2') + +# 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%s' % _obj + +test.write('SConstruct', """ +SConsignFile('my_sconsign') +Decider('timestamp-newer') +env1 = Environment() +env1.Program('sub1/hello.c') +env2 = env1.Clone(CPPPATH = ['sub2']) +env2.Program('sub2/hello.c') +""") + +test.write(['sub1', 'hello.c'], r"""\ +#include <stdio.h> +#include <stdlib.h> +int +main(int argc, char *argv[]) +{ + argv[argc++] = "--"; + printf("sub1/hello.c\n"); + exit (0); +} +""") + +test.write(['sub2', 'hello.c'], r"""\ +#include <stdio.h> +#include <stdlib.h> +#include <inc1.h> +#include <inc2.h> +int +main(int argc, char *argv[]) +{ + argv[argc++] = "--"; + printf("sub2/goodbye.c\n"); + exit (0); +} +""") + +test.write(['sub2', 'inc1.h'], r"""\ +#define STRING1 "inc1.h" +""") + +test.write(['sub2', 'inc2.h'], r"""\ +#define STRING2 "inc2.h" +""") + +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' + +if sys.platform == 'win32': + 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)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)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)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)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)s -e hello%(_obj)s -d sub1' % locals() + +test.run_sconsign(arguments = "%s my_sconsign" % common_flags, + stdout = expect) + +test.run_sconsign(arguments = "%s my_sconsign.dblite" % common_flags, + stdout = expect) + +test.run_sconsign(arguments = "%s -f dblite my_sconsign" % common_flags, + stdout = expect) + +test.run_sconsign(arguments = "%s -f dblite my_sconsign.dblite" % common_flags, + stdout = expect) + +test.run_sconsign(arguments = "%s -r -f dblite my_sconsign" % common_flags, + stdout = expect_r) + +test.run_sconsign(arguments = "%s -r -f dblite my_sconsign.dblite" % common_flags, + stdout = expect_r) + +test.pass_test() + +# Local Variables: +# tab-width:4 +# indent-tabs-mode:nil +# End: +# vim: set expandtab tabstop=4 shiftwidth=4: diff --git a/test/sconsign/script/no-SConsignFile.py b/test/sconsign/script/no-SConsignFile.py new file mode 100644 index 0000000..09ecfa2 --- /dev/null +++ b/test/sconsign/script/no-SConsignFile.py @@ -0,0 +1,304 @@ +#!/usr/bin/env python +# +# __COPYRIGHT__ +# +# Permission is hereby granted, free of charge, to any person obtaining +# a copy of this software and associated documentation files (the +# "Software"), to deal in the Software without restriction, including +# without limitation the rights to use, copy, modify, merge, publish, +# distribute, sublicense, and/or sell copies of the Software, and to +# permit persons to whom the Software is furnished to do so, subject to +# the following conditions: +# +# The above copyright notice and this permission notice shall be included +# in all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY +# KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE +# WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +# + +__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__" + +""" +Verify that the sconsign script works when using an individual +.sconsign file in each directory (SConsignFile(None)). +""" + +import TestSCons +import TestSConsign + +test = TestSConsign.TestSConsign(match = TestSConsign.match_re) + +test.subdir('sub1', 'sub2') + +# Because this test sets SConsignFile(None), we execute our fake +# scripts directly, not by feeding them to the Python executable. +# That is, we chmod 0755 and us a "#!/usr/bin/env python" first +# line for POSIX systems, and add .PY to the %PATHEXT% variable on +# Windows. If we didn't do this, then running this script with +# suitable prileveges would create a .sconsign file in the directory +# where the Python executable lives. This can happen out of the +# box on Mac OS X, with the result that the .sconsign statefulness +# can mess up other tests. + +fake_cc_py = test.workpath('fake_cc.py') +fake_link_py = test.workpath('fake_link.py') + +test.write(fake_cc_py, r"""#!/usr/bin/env python +import os +import re +import sys + +path = sys.argv[1].split() +output = open(sys.argv[2], 'wb') +input = open(sys.argv[3], 'rb') + +output.write('fake_cc.py: %s\n' % sys.argv) + +def find_file(f): + for dir in path: + p = dir + os.sep + f + if os.path.exists(p): + return open(p, 'rb') + return None + +def process(infp, outfp): + for line in infp.readlines(): + m = re.match('#include <(.*)>', line) + if m: + file = m.group(1) + process(find_file(file), outfp) + else: + outfp.write(line) + +process(input, output) + +sys.exit(0) +""") + +test.write(fake_link_py, r"""#!/usr/bin/env python +import sys + +output = open(sys.argv[1], 'wb') +input = open(sys.argv[2], 'rb') + +output.write('fake_link.py: %s\n' % sys.argv) + +output.write(input.read()) + +sys.exit(0) +""") + +test.chmod(fake_cc_py, 0755) +test.chmod(fake_link_py, 0755) + +# 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' +sub2_hello_c = 'sub2/hello.c' +sub2_hello_obj = 'sub2/hello.obj' +sub2_inc1_h = 'sub2/inc1.h' +sub2_inc2_h = 'sub2/inc2.h' + +test.write(['SConstruct'], """ +SConsignFile(None) +env1 = Environment(PROGSUFFIX = '.exe', + OBJSUFFIX = '.obj', + # Specify the command lines with lists-of-lists so + # finding the implicit dependencies works even with + # spaces in the fake_*_py path names. + CCCOM = [[r'%(fake_cc_py)s', 'sub2', '$TARGET', '$SOURCE']], + LINKCOM = [[r'%(fake_link_py)s', '$TARGET', '$SOURCE']]) +env1.PrependENVPath('PATHEXT', '.PY') +env1.Program('sub1/hello.c') +env2 = env1.Clone(CPPPATH = ['sub2']) +env2.Program('sub2/hello.c') +""" % locals()) + +test.write(['sub1', 'hello.c'], r"""\ +sub1/hello.c +""") + +test.write(['sub2', 'hello.c'], r"""\ +#include <inc1.h> +#include <inc2.h> +sub2/hello.c +""") + +test.write(['sub2', 'inc1.h'], r"""\ +#define STRING1 "inc1.h" +""") + +test.write(['sub2', 'inc2.h'], r"""\ +#define STRING2 "inc2.h" +""") + +test.run(arguments = '--implicit-cache --tree=prune .') + +sig_re = r'[0-9a-fA-F]{32}' + +expect = r"""hello.c: %(sig_re)s \d+ \d+ +hello.exe: %(sig_re)s \d+ \d+ + %(sub1_hello_obj)s: %(sig_re)s \d+ \d+ + fake_link\.py: %(sig_re)s \d+ \d+ + %(sig_re)s \[.*\] +hello.obj: %(sig_re)s \d+ \d+ + %(sub1_hello_c)s: %(sig_re)s \d+ \d+ + fake_cc\.py: %(sig_re)s \d+ \d+ + %(sig_re)s \[.*\] +""" % locals() + +test.run_sconsign(arguments = "sub1/.sconsign", stdout=expect) + +test.run_sconsign(arguments = "--raw sub1/.sconsign", + stdout = r"""hello.c: {'csig': '%(sig_re)s', 'timestamp': \d+L?, 'size': \d+L?, '_version_id': 2} +hello.exe: {'csig': '%(sig_re)s', 'timestamp': \d+L?, 'size': \d+L?, '_version_id': 2} + %(sub1_hello_obj)s: {'csig': '%(sig_re)s', 'timestamp': \d+L?, 'size': \d+L?, '_version_id': 2} + fake_link\.py: {'csig': '%(sig_re)s', 'timestamp': \d+L?, 'size': \d+L?, '_version_id': 2} + %(sig_re)s \[.*\] +hello.obj: {'csig': '%(sig_re)s', 'timestamp': \d+L?, 'size': \d+L?, '_version_id': 2} + %(sub1_hello_c)s: {'csig': '%(sig_re)s', 'timestamp': \d+L?, 'size': \d+L?, '_version_id': 2} + fake_cc\.py: {'csig': '%(sig_re)s', 'timestamp': \d+L?, 'size': \d+L?, '_version_id': 2} + %(sig_re)s \[.*\] +""" % locals()) + +test.run_sconsign(arguments = "-v sub1/.sconsign", + stdout = r"""hello.c: + csig: %(sig_re)s + timestamp: \d+ + size: \d+ +hello.exe: + csig: %(sig_re)s + timestamp: \d+ + size: \d+ + implicit: + %(sub1_hello_obj)s: + csig: %(sig_re)s + timestamp: \d+ + size: \d+ + fake_link\.py: + csig: %(sig_re)s + timestamp: \d+ + size: \d+ + action: %(sig_re)s \[.*\] +hello.obj: + csig: %(sig_re)s + timestamp: \d+ + size: \d+ + implicit: + %(sub1_hello_c)s: + csig: %(sig_re)s + timestamp: \d+ + size: \d+ + fake_cc\.py: + csig: %(sig_re)s + timestamp: \d+ + size: \d+ + action: %(sig_re)s \[.*\] +""" % locals()) + +test.run_sconsign(arguments = "-c -v sub1/.sconsign", + stdout = r"""hello.c: + csig: %(sig_re)s +hello.exe: + csig: %(sig_re)s +hello.obj: + csig: %(sig_re)s +""" % locals()) + +test.run_sconsign(arguments = "-s -v sub1/.sconsign", + stdout = r"""hello.c: + size: \d+ +hello.exe: + size: \d+ +hello.obj: + size: \d+ +""" % locals()) + +test.run_sconsign(arguments = "-t -v sub1/.sconsign", + stdout = r"""hello.c: + timestamp: \d+ +hello.exe: + timestamp: \d+ +hello.obj: + timestamp: \d+ +""" % locals()) + +test.run_sconsign(arguments = "-e hello.obj sub1/.sconsign", + stdout = r"""hello.obj: %(sig_re)s \d+ \d+ + %(sub1_hello_c)s: %(sig_re)s \d+ \d+ + fake_cc\.py: %(sig_re)s \d+ \d+ + %(sig_re)s \[.*\] +""" % locals()) + +test.run_sconsign(arguments = "-e hello.obj -e hello.exe -e hello.obj sub1/.sconsign", + stdout = r"""hello.obj: %(sig_re)s \d+ \d+ + %(sub1_hello_c)s: %(sig_re)s \d+ \d+ + fake_cc\.py: %(sig_re)s \d+ \d+ + %(sig_re)s \[.*\] +hello.exe: %(sig_re)s \d+ \d+ + %(sub1_hello_obj)s: %(sig_re)s \d+ \d+ + fake_link\.py: %(sig_re)s \d+ \d+ + %(sig_re)s \[.*\] +hello.obj: %(sig_re)s \d+ \d+ + %(sub1_hello_c)s: %(sig_re)s \d+ \d+ + fake_cc\.py: %(sig_re)s \d+ \d+ + %(sig_re)s \[.*\] +""" % locals()) + +test.run_sconsign(arguments = "sub2/.sconsign", + stdout = r"""hello.c: %(sig_re)s \d+ \d+ +hello.exe: %(sig_re)s \d+ \d+ + %(sub2_hello_obj)s: %(sig_re)s \d+ \d+ + fake_link\.py: %(sig_re)s \d+ \d+ + %(sig_re)s \[.*\] +hello.obj: %(sig_re)s \d+ \d+ + %(sub2_hello_c)s: %(sig_re)s \d+ \d+ + %(sub2_inc1_h)s: %(sig_re)s \d+ \d+ + %(sub2_inc2_h)s: %(sig_re)s \d+ \d+ + fake_cc\.py: %(sig_re)s \d+ \d+ + %(sig_re)s \[.*\] +inc1.h: %(sig_re)s \d+ \d+ +inc2.h: %(sig_re)s \d+ \d+ +""" % locals()) + +#test.run_sconsign(arguments = "-i -v sub2/.sconsign", +# stdout = r"""hello.c: %(sig_re)s \d+ \d+ +#hello.exe: %(sig_re)s \d+ \d+ +# implicit: +# hello.obj: %(sig_re)s \d+ \d+ +#hello.obj: %(sig_re)s \d+ \d+ +# implicit: +# hello.c: %(sig_re)s \d+ \d+ +# inc1.h: %(sig_re)s \d+ \d+ +# inc2.h: %(sig_re)s \d+ \d+ +#""" % locals()) + +test.run_sconsign(arguments = "-e hello.obj sub2/.sconsign sub1/.sconsign", + stdout = r"""hello.obj: %(sig_re)s \d+ \d+ + %(sub2_hello_c)s: %(sig_re)s \d+ \d+ + %(sub2_inc1_h)s: %(sig_re)s \d+ \d+ + %(sub2_inc2_h)s: %(sig_re)s \d+ \d+ + fake_cc\.py: %(sig_re)s \d+ \d+ + %(sig_re)s \[.*\] +hello.obj: %(sig_re)s \d+ \d+ + %(sub1_hello_c)s: %(sig_re)s \d+ \d+ + fake_cc\.py: %(sig_re)s \d+ \d+ + %(sig_re)s \[.*\] +""" % locals()) + +test.pass_test() + +# Local Variables: +# tab-width:4 +# indent-tabs-mode:nil +# End: +# vim: set expandtab tabstop=4 shiftwidth=4: |
