From: stevenknight Date: Fri, 24 Sep 2004 10:52:48 +0000 (+0000) Subject: Better failure detection in test/BuildDir.py. (Kevin Quick) X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=0e86bd100cbfa45af12aaa309028abd9af016aaf;p=scons.git Better failure detection in test/BuildDir.py. (Kevin Quick) git-svn-id: http://scons.tigris.org/svn/scons/trunk@1096 fdb21ef1-2011-0410-befe-b5e4ea1792b1 --- diff --git a/test/BuildDir.py b/test/BuildDir.py index 0877995d..181d8aa2 100644 --- a/test/BuildDir.py +++ b/test/BuildDir.py @@ -268,28 +268,28 @@ def equal_stats(x,y): # Make sure we did duplicate the source files in build/var2, # and that their stats are the same: -test.fail_test(not os.path.exists(test.workpath('work1', 'build', 'var2', 'f1.c'))) -test.fail_test(not os.path.exists(test.workpath('work1', 'build', 'var2', 'f2.in'))) +test.must_exist(['work1', 'build', 'var2', 'f1.c']) +test.must_exist(['work1', 'build', 'var2', 'f2.in']) test.fail_test(not equal_stats(test.workpath('work1', 'build', 'var2', 'f1.c'), test.workpath('work1', 'src', 'f1.c'))) test.fail_test(not equal_stats(test.workpath('work1', 'build', 'var2', 'f2.in'), test.workpath('work1', 'src', 'f2.in'))) # Make sure we didn't duplicate the source files in build/var3. -test.fail_test(os.path.exists(test.workpath('work1', 'build', 'var3', 'f1.c'))) -test.fail_test(os.path.exists(test.workpath('work1', 'build', 'var3', 'f2.in'))) -test.fail_test(os.path.exists(test.workpath('work1', 'build', 'var3', 'b1.f'))) -test.fail_test(os.path.exists(test.workpath('work1', 'build', 'var3', 'b2.in'))) +test.must_not_exist(['work1', 'build', 'var3', 'f1.c']) +test.must_not_exist(['work1', 'build', 'var3', 'f2.in']) +test.must_not_exist(['work1', 'build', 'var3', 'b1.f']) +test.must_not_exist(['work1', 'build', 'var3', 'b2.in']) # Make sure we didn't duplicate the source files in build/var4. -test.fail_test(os.path.exists(test.workpath('work1', 'build', 'var4', 'f1.c'))) -test.fail_test(os.path.exists(test.workpath('work1', 'build', 'var4', 'f2.in'))) -test.fail_test(os.path.exists(test.workpath('work1', 'build', 'var4', 'b1.f'))) -test.fail_test(os.path.exists(test.workpath('work1', 'build', 'var4', 'b2.in'))) +test.must_not_exist(['work1', 'build', 'var4', 'f1.c']) +test.must_not_exist(['work1', 'build', 'var4', 'f2.in']) +test.must_not_exist(['work1', 'build', 'var4', 'b1.f']) +test.must_not_exist(['work1', 'build', 'var4', 'b2.in']) # Make sure we didn't duplicate the source files in build/var5. -test.fail_test(os.path.exists(test.workpath('build', 'var5', 'f1.c'))) -test.fail_test(os.path.exists(test.workpath('build', 'var5', 'f2.in'))) -test.fail_test(os.path.exists(test.workpath('build', 'var5', 'b1.f'))) -test.fail_test(os.path.exists(test.workpath('build', 'var5', 'b2.in'))) +test.must_not_exist(['build', 'var5', 'f1.c']) +test.must_not_exist(['build', 'var5', 'f2.in']) +test.must_not_exist(['build', 'var5', 'b1.f']) +test.must_not_exist(['build', 'var5', 'b2.in']) # verify that header files in the source directory are scanned properly: test.write(['work1', 'src', 'f1.h'], r"""