diff options
author | Steven Knight <knight@baldmt.com> | 2001-09-21 11:39:19 (GMT) |
---|---|---|
committer | Steven Knight <knight@baldmt.com> | 2001-09-21 11:39:19 (GMT) |
commit | f407037c97df685b54882142784d2f353aaac6b6 (patch) | |
tree | 3841c4d5ace0dbfd17e48f6f8c85c9a2f3a720d7 /test/option-j.py | |
parent | 635256859678b6b862b89d4c5ce890b4923e8394 (diff) | |
download | SCons-f407037c97df685b54882142784d2f353aaac6b6.zip SCons-f407037c97df685b54882142784d2f353aaac6b6.tar.gz SCons-f407037c97df685b54882142784d2f353aaac6b6.tar.bz2 |
rebuild in response to changed .c file
Diffstat (limited to 'test/option-j.py')
-rw-r--r-- | test/option-j.py | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/test/option-j.py b/test/option-j.py index 90d036d..cc8efa4 100644 --- a/test/option-j.py +++ b/test/option-j.py @@ -36,9 +36,10 @@ env.MyBuild(target = 'f1', source = 'f1.in') env.MyBuild(target = 'f2', source = 'f2.in') """) -def RunTest(args): - test.write('f1.in', 'f1.in') - test.write('f2.in', 'f2.in') +def RunTest(args, extra): + """extra is used to make scons rebuild the output file""" + test.write('f1.in', 'f1.in'+extra) + test.write('f2.in', 'f2.in'+extra) test.run(arguments = args) @@ -50,13 +51,21 @@ def RunTest(args): return start2, finish1 -start2, finish1 = RunTest('-j 2 f1 f2') +start2, finish1 = RunTest('-j 2 f1 f2', "first") # fail if the second file was not started # before the first one was finished test.fail_test(not (start2 < finish1)) -start2, finish1 = RunTest('f1 f2') +s2, f1 = RunTest('-j 2 f1 f2', "first") + +# re-run the test with the same input, fail if we don't +# get back the same times, which would indicate that +# SCons rebuilt the files even though nothing changed +test.fail_test(start2 != s2) +test.fail_test(finish1 != f1) + +start2, finish1 = RunTest('f1 f2', "second") # fail if the second file was started # before the first one was finished |