diff options
Diffstat (limited to 'test/Program.py')
-rw-r--r-- | test/Program.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test/Program.py b/test/Program.py index d517808..4189c46 100644 --- a/test/Program.py +++ b/test/Program.py @@ -3,6 +3,8 @@ __revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__" import TestSCons +import os.path +import time #XXX Future: be able to interpolate @@ -121,4 +123,12 @@ test.run(program = test.workpath('foo2'), stdout = "f2a.c\nf2b.c\nf2c.c\n") #XXXtest.up_to_date(arguments = '.') +# make sure the programs don't get rebuilt, because nothing changed: +oldtime1 = os.path.getmtime(test.workpath('foo1')) +oldtime2 = os.path.getmtime(test.workpath('foo2')) +time.sleep(1) # introduce a small delay, to make the test valid +test.run(arguments = 'foo1 foo2') +test.fail_test(not (oldtime1 == os.path.getmtime(test.workpath('foo1')))) +test.fail_test(not (oldtime2 == os.path.getmtime(test.workpath('foo2')))) + test.pass_test() |