diff options
author | Steven Knight <knight@baldmt.com> | 2001-10-01 04:01:09 (GMT) |
---|---|---|
committer | Steven Knight <knight@baldmt.com> | 2001-10-01 04:01:09 (GMT) |
commit | 97446895b5e0d92057123a962f45856009ff6bb9 (patch) | |
tree | 7d3bc4f0cf06888788b9c97839fcf7aee258cff3 /test/up-to-date.py | |
parent | 5029b0d71e078e84d0513987860fdea1b72e40cc (diff) | |
download | SCons-97446895b5e0d92057123a962f45856009ff6bb9.zip SCons-97446895b5e0d92057123a962f45856009ff6bb9.tar.gz SCons-97446895b5e0d92057123a962f45856009ff6bb9.tar.bz2 |
Pass in the signature Calculator to the Taskmaster.
Diffstat (limited to 'test/up-to-date.py')
-rw-r--r-- | test/up-to-date.py | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/test/up-to-date.py b/test/up-to-date.py new file mode 100644 index 0000000..e4a265a --- /dev/null +++ b/test/up-to-date.py @@ -0,0 +1,44 @@ +#!/usr/bin/env python + +__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__" + +import TestSCons +import os.path +import string +import sys + +test = TestSCons.TestSCons() + +test.write('build.py', r""" +import sys +contents = open(sys.argv[2], 'r').read() +file = open(sys.argv[1], 'w') +file.write(contents) +file.close() +""") + +test.write('SConstruct', """ +B = Builder(name = "B", action = "python build.py %(target)s %(source)s") +env = Environment(BUILDERS = [B]) +env.B(target = 'f1.out', source = 'f1.in') +env.B(target = 'f2.out', source = 'f2.in') +env.B(target = 'f3.out', source = 'f3.in') +env.B(target = 'f4.out', source = 'f4.in') +""") + +test.write('f1.in', "f1.in\n") +test.write('f2.in', "f2.in\n") +test.write('f3.in', "f3.in\n") +test.write('f4.in', "f4.in\n") + +test.run(arguments = 'f1.out f3.out') + +test.run(arguments = 'f1.out f2.out f3.out f4.out', stdout = +"""scons: "f1.out" is up to date. +python build.py f2.out f2.in +scons: "f3.out" is up to date. +python build.py f4.out f4.in +""") + +test.pass_test() + |