summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorSteven Knight <knight@baldmt.com>2005-08-17 03:40:34 (GMT)
committerSteven Knight <knight@baldmt.com>2005-08-17 03:40:34 (GMT)
commitc5eb97dd2c58dc4b93bbe6682631d57febdd96bc (patch)
treeb3d4066c6b17cde2ae0c5a45d9f45f2c5eca2d67 /test
parent2c8bdd2a8cfa630e66e5b66fce0d24a3fe796c14 (diff)
downloadSCons-c5eb97dd2c58dc4b93bbe6682631d57febdd96bc.zip
SCons-c5eb97dd2c58dc4b93bbe6682631d57febdd96bc.tar.gz
SCons-c5eb97dd2c58dc4b93bbe6682631d57febdd96bc.tar.bz2
Fix the -U behavior (broken when we made BUILD_TARGETS modifiable).
Diffstat (limited to 'test')
-rw-r--r--test/option--U.py72
1 files changed, 36 insertions, 36 deletions
diff --git a/test/option--U.py b/test/option--U.py
index 45ba97c..db6532e 100644
--- a/test/option--U.py
+++ b/test/option--U.py
@@ -75,12 +75,12 @@ test.write('xxx.in', "xxx.in\n")
test.write('SConscript', """assert GetLaunchDir() == r'%s'\n"""%test.workpath('sub1'))
test.run(arguments = '-U foo.out', chdir = 'sub1')
-test.fail_test(not os.path.exists(test.workpath('sub1', 'foo.out')))
-test.fail_test(os.path.exists(test.workpath('sub2', 'bar.out')))
-test.fail_test(os.path.exists(test.workpath('sub2b', 'bar.out')))
-test.fail_test(os.path.exists(test.workpath('sub3', 'baz.out')))
-test.fail_test(os.path.exists(test.workpath('bar.out')))
-test.fail_test(os.path.exists(test.workpath('sub2/xxx.out')))
+test.must_exist(test.workpath('sub1', 'foo.out'))
+test.must_not_exist(test.workpath('sub2', 'bar.out'))
+test.must_not_exist(test.workpath('sub2b', 'bar.out'))
+test.must_not_exist(test.workpath('sub3', 'baz.out'))
+test.must_not_exist(test.workpath('bar.out'))
+test.must_not_exist(test.workpath('sub2/xxx.out'))
test.unlink(['sub1', 'foo.out'])
@@ -92,26 +92,26 @@ test.run(arguments = '-U',
chdir = 'sub1',
stderr = "scons: *** No targets specified and no Default() targets found. Stop.\n",
status = 2)
-test.fail_test(os.path.exists(test.workpath('sub1', 'foo.out')))
-test.fail_test(os.path.exists(test.workpath('sub2', 'bar.out')))
-test.fail_test(os.path.exists(test.workpath('sub2b', 'bar.out')))
-test.fail_test(os.path.exists(test.workpath('sub3', 'baz.out')))
-test.fail_test(os.path.exists(test.workpath('bar.out')))
-test.fail_test(os.path.exists(test.workpath('sub2/xxx.out')))
+test.must_not_exist(test.workpath('sub1', 'foo.out'))
+test.must_not_exist(test.workpath('sub2', 'bar.out'))
+test.must_not_exist(test.workpath('sub2b', 'bar.out'))
+test.must_not_exist(test.workpath('sub3', 'baz.out'))
+test.must_not_exist(test.workpath('bar.out'))
+test.must_not_exist(test.workpath('sub2/xxx.out'))
if sys.platform == 'win32':
- test.write('SConscript', """assert GetLaunchDir() == r'%s'"""%test.workpath('SUB2'))
- test.run(chdir = 'SUB2', arguments = '-U')
+ sub2 = 'SUB2'
else:
- test.write('SConscript', """assert GetLaunchDir() == r'%s'"""%test.workpath('sub2'))
- test.run(chdir = 'sub2', arguments = '-U')
-test.fail_test(os.path.exists(test.workpath('sub1', 'foo.out')))
-test.fail_test(not os.path.exists(test.workpath('sub2', 'bar.out')))
-test.fail_test(not os.path.exists(test.workpath('sub2b', 'bar.out')))
-test.fail_test(os.path.exists(test.workpath('sub3', 'baz.out')))
-test.fail_test(not os.path.exists(test.workpath('bar.out')))
-test.fail_test(os.path.exists(test.workpath('sub2/xxx.out')))
+ sub2 = 'sub2'
+test.write('SConscript', """assert GetLaunchDir() == r'%s'"""%test.workpath(sub2))
+test.run(chdir = sub2, arguments = '-U')
+test.must_not_exist(test.workpath('sub1', 'foo.out'))
+test.must_exist(test.workpath('sub2', 'bar.out'))
+test.must_exist(test.workpath('sub2b', 'bar.out'))
+test.must_not_exist(test.workpath('sub3', 'baz.out'))
+test.must_exist(test.workpath('bar.out'))
+test.must_not_exist(test.workpath('sub2/xxx.out'))
test.unlink(['sub2', 'bar.out'])
test.unlink(['sub2b', 'bar.out'])
@@ -119,12 +119,12 @@ test.unlink('bar.out')
test.write('SConscript', """assert GetLaunchDir() == r'%s'"""%test.workpath())
test.run(arguments='-U')
-test.fail_test(not os.path.exists(test.workpath('sub1', 'foo.out')))
-test.fail_test(os.path.exists(test.workpath('sub2', 'bar.out')))
-test.fail_test(os.path.exists(test.workpath('sub2b', 'bar.out')))
-test.fail_test(not os.path.exists(test.workpath('sub3', 'baz.out')))
-test.fail_test(os.path.exists(test.workpath('bar.out')))
-test.fail_test(not os.path.exists(test.workpath('sub2/xxx.out')))
+test.must_exist(test.workpath('sub1', 'foo.out'))
+test.must_not_exist(test.workpath('sub2', 'bar.out'))
+test.must_not_exist(test.workpath('sub2b', 'bar.out'))
+test.must_exist(test.workpath('sub3', 'baz.out'))
+test.must_not_exist(test.workpath('bar.out'))
+test.must_exist(test.workpath('sub2/xxx.out'))
test.unlink(['sub1', 'foo.out'])
test.unlink(['sub3', 'baz.out'])
@@ -132,12 +132,12 @@ test.unlink(['sub2', 'xxx.out'])
test.write('SConscript', """assert GetLaunchDir() == r'%s'"""%test.workpath('sub3'))
test.run(chdir = 'sub3', arguments='-U bar')
-test.fail_test(os.path.exists(test.workpath('sub1', 'foo.out')))
-test.fail_test(not os.path.exists(test.workpath('sub2', 'bar.out')))
-test.fail_test(not os.path.exists(test.workpath('sub2b', 'bar.out')))
-test.fail_test(os.path.exists(test.workpath('sub3', 'baz.out')))
-test.fail_test(os.path.exists(test.workpath('bar.out')))
-test.fail_test(os.path.exists(test.workpath('sub2/xxx.out')))
+test.must_not_exist(test.workpath('sub1', 'foo.out'))
+test.must_exist(test.workpath('sub2', 'bar.out'))
+test.must_exist(test.workpath('sub2b', 'bar.out'))
+test.must_not_exist(test.workpath('sub3', 'baz.out'))
+test.must_not_exist(test.workpath('bar.out'))
+test.must_not_exist(test.workpath('sub2/xxx.out'))
# Make sure that a Default() directory doesn't cause an exception.
test.subdir('sub4')
@@ -195,7 +195,7 @@ test.write(['sub6', 'dir', 'bar.in'], "bar.in\n")
test.run(chdir = 'sub6/dir', arguments = '-U ../foo.out')
-test.fail_test(not os.path.exists(test.workpath('sub6', 'foo.out')))
-test.fail_test(os.path.exists(test.workpath('sub6', 'dir', 'bar.out')))
+test.must_exist(test.workpath('sub6', 'foo.out'))
+test.must_not_exist(test.workpath('sub6', 'dir', 'bar.out'))
test.pass_test()