diff options
author | Steven Knight <knight@baldmt.com> | 2004-03-30 15:14:35 (GMT) |
---|---|---|
committer | Steven Knight <knight@baldmt.com> | 2004-03-30 15:14:35 (GMT) |
commit | 9700bc6b12a6320ead9f325a209f29c588f11b02 (patch) | |
tree | c5639ef50c3c4014b2875ba9d77c4c6301b162b9 /test/SConsignFile.py | |
parent | 9d0a5d2fb054d3dd31db8b20258d1a1243b45fb8 (diff) | |
download | SCons-9700bc6b12a6320ead9f325a209f29c588f11b02.zip SCons-9700bc6b12a6320ead9f325a209f29c588f11b02.tar.gz SCons-9700bc6b12a6320ead9f325a209f29c588f11b02.tar.bz2 |
Use python1.5 in default Aegis builds. Fix testing infrastructure for Python 1.5.
Diffstat (limited to 'test/SConsignFile.py')
-rw-r--r-- | test/SConsignFile.py | 51 |
1 files changed, 28 insertions, 23 deletions
diff --git a/test/SConsignFile.py b/test/SConsignFile.py index 606f20b..c919c79 100644 --- a/test/SConsignFile.py +++ b/test/SConsignFile.py @@ -60,20 +60,25 @@ test.write(['work1', 'subdir', 'f4.in'], "work1/subdir/f4.in\n") test.run(chdir = 'work1') -test.fail_test(not os.path.exists(test.workpath('work1', '.sconsign.dbm'))) -test.fail_test(os.path.exists(test.workpath('work1', '.sconsign'))) -test.fail_test(os.path.exists(test.workpath('work1', 'subdir', '.sconsign'))) - -test.fail_test(test.read(['work1', 'f1.out']) != "work1/f1.in\n") -test.fail_test(test.read(['work1', 'f2.out']) != "work1/f2.in\n") -test.fail_test(test.read(['work1', 'subdir', 'f3.out']) != "work1/subdir/f3.in\n") -test.fail_test(test.read(['work1', 'subdir', 'f4.out']) != "work1/subdir/f4.in\n") +def any_dbm_file(prefix): + return os.path.exists(prefix) \ + or os.path.exists(prefix + '.dat') \ + or os.path.exists(prefix + '.dir') + +test.fail_test(not any_dbm_file(test.workpath('work1', '.sconsign.dbm'))) +test.must_not_exist(test.workpath('work1', '.sconsign')) +test.must_not_exist(test.workpath('work1', 'subdir', '.sconsign')) + +test.must_match(['work1', 'f1.out'], "work1/f1.in\n") +test.must_match(['work1', 'f2.out'], "work1/f2.in\n") +test.must_match(['work1', 'subdir', 'f3.out'], "work1/subdir/f3.in\n") +test.must_match(['work1', 'subdir', 'f4.out'], "work1/subdir/f4.in\n") test.up_to_date(chdir = 'work1', arguments = '.') -test.fail_test(not os.path.exists(test.workpath('work1', '.sconsign.dbm'))) -test.fail_test(os.path.exists(test.workpath('work1', '.sconsign'))) -test.fail_test(os.path.exists(test.workpath('work1', 'subdir', '.sconsign'))) +test.fail_test(not any_dbm_file(test.workpath('work1', '.sconsign.dbm'))) +test.must_not_exist(test.workpath('work1', '.sconsign')) +test.must_not_exist(test.workpath('work1', 'subdir', '.sconsign')) # test.write(['work2', 'SConstruct'], """ @@ -94,21 +99,21 @@ test.write(['work2', 'subdir', 'f8.in'], "work2/subdir/f8.in\n") test.run(chdir = 'work2') -test.fail_test(not os.path.exists(test.workpath('work2', 'my_sconsign'))) -test.fail_test(os.path.exists(test.workpath('work2', '.sconsign.dbm'))) -test.fail_test(os.path.exists(test.workpath('work2', '.sconsign'))) -test.fail_test(os.path.exists(test.workpath('work2', 'subdir', '.sconsign'))) +test.fail_test(not any_dbm_file(test.workpath('work2', 'my_sconsign'))) +test.fail_test(any_dbm_file(test.workpath('work2', '.sconsign.dbm'))) +test.must_not_exist(test.workpath('work2', '.sconsign')) +test.must_not_exist(test.workpath('work2', 'subdir', '.sconsign')) -test.fail_test(test.read(['work2', 'f5.out']) != "work2/f5.in\n") -test.fail_test(test.read(['work2', 'f6.out']) != "work2/f6.in\n") -test.fail_test(test.read(['work2', 'subdir', 'f7.out']) != "work2/subdir/f7.in\n") -test.fail_test(test.read(['work2', 'subdir', 'f8.out']) != "work2/subdir/f8.in\n") +test.must_match(['work2', 'f5.out'], "work2/f5.in\n") +test.must_match(['work2', 'f6.out'], "work2/f6.in\n") +test.must_match(['work2', 'subdir', 'f7.out'], "work2/subdir/f7.in\n") +test.must_match(['work2', 'subdir', 'f8.out'], "work2/subdir/f8.in\n") test.up_to_date(chdir = 'work2', arguments = '.') -test.fail_test(not os.path.exists(test.workpath('work2', 'my_sconsign'))) -test.fail_test(os.path.exists(test.workpath('work2', '.sconsign.dbm'))) -test.fail_test(os.path.exists(test.workpath('work2', '.sconsign'))) -test.fail_test(os.path.exists(test.workpath('work2', 'subdir', '.sconsign'))) +test.fail_test(not any_dbm_file(test.workpath('work2', 'my_sconsign'))) +test.fail_test(any_dbm_file(test.workpath('work2', '.sconsign.dbm'))) +test.must_not_exist(test.workpath('work2', '.sconsign')) +test.must_not_exist(test.workpath('work2', 'subdir', '.sconsign')) test.pass_test() |