summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorSteven Knight <knight@baldmt.com>2004-08-05 20:00:20 (GMT)
committerSteven Knight <knight@baldmt.com>2004-08-05 20:00:20 (GMT)
commitb7dc7fc461b3a9170b14d8a026d69c0a28c2883d (patch)
treef96bca18fdb063488c45f340ecf9a8d02902071f /test
parent5a33f7f18934e378efaae41fbc28ae5c6f75e610 (diff)
downloadSCons-b7dc7fc461b3a9170b14d8a026d69c0a28c2883d.zip
SCons-b7dc7fc461b3a9170b14d8a026d69c0a28c2883d.tar.gz
SCons-b7dc7fc461b3a9170b14d8a026d69c0a28c2883d.tar.bz2
Return lists of Nodes from all builders, not single Nodes when there's only one.
Diffstat (limited to 'test')
-rw-r--r--test/BitKeeper.py58
-rw-r--r--test/CVS.py42
-rw-r--r--test/CacheDir.py66
-rw-r--r--test/Chmod.py6
-rw-r--r--test/Copy.py6
-rw-r--r--test/Delete.py6
-rw-r--r--test/Depends.py71
-rw-r--r--test/Environment.py1
-rw-r--r--test/Exit.py4
-rw-r--r--test/Ignore.py30
-rw-r--r--test/Mkdir.py6
-rw-r--r--test/Move.py6
-rw-r--r--test/Program.py19
-rw-r--r--test/RCS.py40
-rw-r--r--test/SCCS.py36
-rw-r--r--test/Scanner.py2
-rw-r--r--test/SetBuildSignatureType.py12
-rw-r--r--test/SetContentSignatureType.py12
-rw-r--r--test/SideEffect.py48
-rw-r--r--test/SourceCode.py26
-rw-r--r--test/SourceSignatures.py63
-rw-r--r--test/TargetSignatures.py24
-rw-r--r--test/Touch.py6
-rw-r--r--test/Value.py41
-rw-r--r--test/chained-build.py16
-rw-r--r--test/multi.py14
-rw-r--r--test/option--cd.py32
-rw-r--r--test/option--cs.py30
-rw-r--r--test/option--debug.py10
-rw-r--r--test/option--warn.py6
-rw-r--r--test/option-u.py68
-rw-r--r--test/overrides.py4
-rw-r--r--test/sconsign.py2
-rw-r--r--test/strfunction.py4
34 files changed, 378 insertions, 439 deletions
diff --git a/test/BitKeeper.py b/test/BitKeeper.py
index 4d703ab..73cd47f 100644
--- a/test/BitKeeper.py
+++ b/test/BitKeeper.py
@@ -123,17 +123,17 @@ bk get -e sub/SConscript
""",
build_str = """\
bk get -e aaa.in
-cat("aaa.out", "aaa.in")
-cat("bbb.out", "bbb.in")
+cat(["aaa.out"], ["aaa.in"])
+cat(["bbb.out"], ["bbb.in"])
bk get -e ccc.in
-cat("ccc.out", "ccc.in")
-cat("all", ["aaa.out", "bbb.out", "ccc.out"])
+cat(["ccc.out"], ["ccc.in"])
+cat(["all"], ["aaa.out", "bbb.out", "ccc.out"])
bk get -e sub/ddd.in
-cat("sub/ddd.out", "sub/ddd.in")
-cat("sub/eee.out", "sub/eee.in")
+cat(["sub/ddd.out"], ["sub/ddd.in"])
+cat(["sub/eee.out"], ["sub/eee.in"])
bk get -e sub/fff.in
-cat("sub/fff.out", "sub/fff.in")
-cat("sub/all", ["sub/ddd.out", "sub/eee.out", "sub/fff.out"])
+cat(["sub/fff.out"], ["sub/fff.in"])
+cat(["sub/all"], ["sub/ddd.out", "sub/eee.out", "sub/fff.out"])
"""),
stderr = """\
sub/SConscript 1.1 -> 1.2: 5 lines
@@ -143,7 +143,7 @@ sub/ddd.in 1.1 -> 1.2: 1 lines
sub/fff.in 1.1 -> 1.2: 1 lines
""")
- test.fail_test(test.read(['work1', 'all']) != "work1/aaa.in\nchecked-out work1/bbb.in\nwork1/ccc.in\n")
+ test.must_match(['work1', 'all'], "work1/aaa.in\nchecked-out work1/bbb.in\nwork1/ccc.in\n")
test.fail_test(not is_writable(test.workpath('work1', 'sub', 'SConscript')))
test.fail_test(not is_writable(test.workpath('work1', 'aaa.in')))
@@ -224,22 +224,22 @@ bk co -q sub/SConscript
""",
build_str = """\
bk co -q aaa.in
-cat("aaa.out", "aaa.in")
-cat("bbb.out", "bbb.in")
+cat(["aaa.out"], ["aaa.in"])
+cat(["bbb.out"], ["bbb.in"])
bk co -q ccc.in
-cat("ccc.out", "ccc.in")
-cat("all", ["aaa.out", "bbb.out", "ccc.out"])
+cat(["ccc.out"], ["ccc.in"])
+cat(["all"], ["aaa.out", "bbb.out", "ccc.out"])
bk co -q sub/ddd.in
-cat("sub/ddd.out", "sub/ddd.in")
-cat("sub/eee.out", "sub/eee.in")
+cat(["sub/ddd.out"], ["sub/ddd.in"])
+cat(["sub/eee.out"], ["sub/eee.in"])
bk co -q sub/fff.in
-cat("sub/fff.out", "sub/fff.in")
-cat("sub/all", ["sub/ddd.out", "sub/eee.out", "sub/fff.out"])
+cat(["sub/fff.out"], ["sub/fff.in"])
+cat(["sub/all"], ["sub/ddd.out", "sub/eee.out", "sub/fff.out"])
"""))
- test.fail_test(test.read(['work2', 'all']) != "work2/aaa.in\nchecked-out work2/bbb.in\nwork2/ccc.in\n")
+ test.must_match(['work2', 'all'], "work2/aaa.in\nchecked-out work2/bbb.in\nwork2/ccc.in\n")
- test.fail_test(test.read(['work2', 'sub', 'all']) != "work2/sub/ddd.in\nchecked-out work2/sub/eee.in\nwork2/sub/fff.in\n")
+ test.must_match(['work2', 'sub', 'all'], "work2/sub/ddd.in\nchecked-out work2/sub/eee.in\nwork2/sub/fff.in\n")
test.fail_test(is_writable(test.workpath('work2', 'sub', 'SConscript')))
test.fail_test(is_writable(test.workpath('work2', 'aaa.in')))
@@ -319,17 +319,17 @@ test.run(chdir = 'work3',
""" % bk,
build_str = """\
%s get aaa.in
-cat("aaa.out", "aaa.in")
-cat("bbb.out", "bbb.in")
+cat(["aaa.out"], ["aaa.in"])
+cat(["bbb.out"], ["bbb.in"])
%s get ccc.in
-cat("ccc.out", "ccc.in")
-cat("all", ["aaa.out", "bbb.out", "ccc.out"])
+cat(["ccc.out"], ["ccc.in"])
+cat(["all"], ["aaa.out", "bbb.out", "ccc.out"])
%s get sub/ddd.in
-cat("sub/ddd.out", "sub/ddd.in")
-cat("sub/eee.out", "sub/eee.in")
+cat(["sub/ddd.out"], ["sub/ddd.in"])
+cat(["sub/eee.out"], ["sub/eee.in"])
%s get sub/fff.in
-cat("sub/fff.out", "sub/fff.in")
-cat("sub/all", ["sub/ddd.out", "sub/eee.out", "sub/fff.out"])
+cat(["sub/fff.out"], ["sub/fff.in"])
+cat(["sub/all"], ["sub/ddd.out", "sub/eee.out", "sub/fff.out"])
""" % (bk, bk, bk, bk)),
stderr = """\
sub/SConscript 1.1: 5 lines
@@ -339,9 +339,9 @@ sub/ddd.in 1.1: 1 lines
sub/fff.in 1.1: 1 lines
""")
-test.fail_test(test.read(['work3', 'all']) != "import/aaa.in\nwork3/bbb.in\nimport/ccc.in\n")
+test.must_match(['work3', 'all'], "import/aaa.in\nwork3/bbb.in\nimport/ccc.in\n")
-test.fail_test(test.read(['work3', 'sub', 'all']) != "import/sub/ddd.in\nwork3/sub/eee.in\nimport/sub/fff.in\n")
+test.must_match(['work3', 'sub', 'all'], "import/sub/ddd.in\nwork3/sub/eee.in\nimport/sub/fff.in\n")
test.fail_test(is_writable(test.workpath('work3', 'sub', 'SConscript')))
test.fail_test(is_writable(test.workpath('work3', 'aaa.in')))
diff --git a/test/CVS.py b/test/CVS.py
index 25d87e5..0e9decc 100644
--- a/test/CVS.py
+++ b/test/CVS.py
@@ -127,17 +127,17 @@ cvs -Q -d %s co foo/sub/SConscript
""" % (cvsroot),
build_str = """\
cvs -Q -d %s co foo/aaa.in
-cat("aaa.out", "%s")
-cat("bbb.out", "%s")
+cat(["aaa.out"], ["%s"])
+cat(["bbb.out"], ["%s"])
cvs -Q -d %s co foo/ccc.in
-cat("ccc.out", "%s")
-cat("all", ["aaa.out", "bbb.out", "ccc.out"])
+cat(["ccc.out"], ["%s"])
+cat(["all"], ["aaa.out", "bbb.out", "ccc.out"])
cvs -Q -d %s co foo/sub/ddd.in
-cat("%s", "%s")
-cat("%s", "%s")
+cat(["%s"], ["%s"])
+cat(["%s"], ["%s"])
cvs -Q -d %s co foo/sub/fff.in
-cat("%s", "%s")
-cat("%s", ["%s", "%s", "%s"])
+cat(["%s"], ["%s"])
+cat(["%s"], ["%s", "%s", "%s"])
""" % (cvsroot,
foo_aaa_in,
foo_bbb_in,
@@ -198,20 +198,20 @@ U sub/SConscript
build_str = """\
cvs -q -d %s co -d . foo/aaa.in
U ./aaa.in
-cat("aaa.out", "aaa.in")
-cat("bbb.out", "bbb.in")
+cat(["aaa.out"], ["aaa.in"])
+cat(["bbb.out"], ["bbb.in"])
cvs -q -d %s co -d . foo/ccc.in
U ./ccc.in
-cat("ccc.out", "ccc.in")
-cat("all", ["aaa.out", "bbb.out", "ccc.out"])
+cat(["ccc.out"], ["ccc.in"])
+cat(["all"], ["aaa.out", "bbb.out", "ccc.out"])
cvs -q -d %s co -d sub foo/sub/ddd.in
U sub/ddd.in
-cat("%s", "%s")
-cat("%s", "%s")
+cat(["%s"], ["%s"])
+cat(["%s"], ["%s"])
cvs -q -d %s co -d sub foo/sub/fff.in
U sub/fff.in
-cat("%s", "%s")
-cat("%s", ["%s", "%s", "%s"])
+cat(["%s"], ["%s"])
+cat(["%s"], ["%s", "%s", "%s"])
""" % (cvsroot,
cvsroot,
cvsroot,
@@ -267,14 +267,14 @@ test.run(chdir = 'work3',
stdout = test.wrap_stdout(build_str = """\
cvs -q -d %s co -d . foo/aaa.in
U ./aaa.in
-cat("aaa.out", "aaa.in")
+cat(["aaa.out"], ["aaa.in"])
cvs -q -d %s co -d . foo/bbb.in
U ./bbb.in
-cat("bbb.out", "bbb.in")
+cat(["bbb.out"], ["bbb.in"])
cvs -q -d %s co -d . foo/ccc.in
U ./ccc.in
-cat("ccc.out", "ccc.in")
-cat("all", ["aaa.out", "bbb.out", "ccc.out"])
+cat(["ccc.out"], ["ccc.in"])
+cat(["all"], ["aaa.out", "bbb.out", "ccc.out"])
""" % (cvsroot,
cvsroot,
cvsroot)))
@@ -301,7 +301,7 @@ env.Install('install', 'scons/SConstruct')
test.run(chdir = 'work4', arguments = '.')
-test.fail_test(not os.path.exists(test.workpath('work4', 'install', 'SConstruct')))
+test.must_exist(test.workpath('work4', 'install', 'SConstruct'))
test.pass_test()
diff --git a/test/CacheDir.py b/test/CacheDir.py
index abb4bad..ae3f76e 100644
--- a/test/CacheDir.py
+++ b/test/CacheDir.py
@@ -69,8 +69,8 @@ test.write(['src', 'ccc.in'], "ccc.in\n")
# This should populate the cache with our derived files.
test.run(chdir = 'src', arguments = '.')
-test.fail_test(test.read(['src', 'all']) != "aaa.in\nbbb.in\nccc.in\n")
-test.fail_test(test.read(['src', 'cat.out']) != "aaa.out\nbbb.out\nccc.out\nall\n")
+test.must_match(['src', 'all'], "aaa.in\nbbb.in\nccc.in\n")
+test.must_match(['src', 'cat.out'], "aaa.out\nbbb.out\nccc.out\nall\n")
test.up_to_date(chdir = 'src', arguments = '.')
@@ -86,7 +86,7 @@ Retrieved `ccc.out' from cache
Retrieved `all' from cache
"""))
-test.fail_test(os.path.exists(test.workpath('src', 'cat.out')))
+test.must_not_exist(test.workpath('src', 'cat.out'))
test.up_to_date(chdir = 'src', arguments = '.')
@@ -101,17 +101,17 @@ Retrieved `ccc.out' from cache
Retrieved `all' from cache
"""))
-test.fail_test(os.path.exists(test.workpath('src', 'aaa.out')))
-test.fail_test(os.path.exists(test.workpath('src', 'bbb.out')))
-test.fail_test(os.path.exists(test.workpath('src', 'ccc.out')))
-test.fail_test(os.path.exists(test.workpath('src', 'all')))
+test.must_not_exist(test.workpath('src', 'aaa.out'))
+test.must_not_exist(test.workpath('src', 'bbb.out'))
+test.must_not_exist(test.workpath('src', 'ccc.out'))
+test.must_not_exist(test.workpath('src', 'all'))
# Verify that rebuilding with -s retrieves everything from the cache
# even though it doesn't report anything.
test.run(chdir = 'src', arguments = '-s .', stdout = "")
-test.fail_test(test.read(['src', 'all']) != "aaa.in\nbbb.in\nccc.in\n")
-test.fail_test(os.path.exists(test.workpath('src', 'cat.out')))
+test.must_match(['src', 'all'], "aaa.in\nbbb.in\nccc.in\n")
+test.must_not_exist(test.workpath('src', 'cat.out'))
test.up_to_date(chdir = 'src', arguments = '.')
@@ -123,13 +123,13 @@ test.write(['src', 'bbb.in'], "bbb.in 2\n")
test.run(chdir = 'src', arguments = '.', stdout = test.wrap_stdout("""\
Retrieved `aaa.out' from cache
-cat("bbb.out", "bbb.in")
+cat(["bbb.out"], ["bbb.in"])
Retrieved `ccc.out' from cache
-cat("all", ["aaa.out", "bbb.out", "ccc.out"])
+cat(["all"], ["aaa.out", "bbb.out", "ccc.out"])
"""))
-test.fail_test(test.read(['src', 'all']) != "aaa.in\nbbb.in 2\nccc.in\n")
-test.fail_test(test.read(['src', 'cat.out']) != "bbb.out\nall\n")
+test.must_match(['src', 'all'], "aaa.in\nbbb.in 2\nccc.in\n")
+test.must_match(['src', 'cat.out'], "bbb.out\nall\n")
test.up_to_date(chdir = 'src', arguments = '.')
@@ -162,8 +162,8 @@ SConscript('build/SConscript')
# This should populate the cache with our derived files.
test.run()
-test.fail_test(test.read(['build', 'all']) != "aaa.in\nbbb.in\nccc.in\n")
-test.fail_test(test.read('cat.out') != "%s\n%s\n%s\n%s\n" % (build_aaa_out, build_bbb_out, build_ccc_out, build_all))
+test.must_match(['build', 'all'], "aaa.in\nbbb.in\nccc.in\n")
+test.must_match('cat.out', "%s\n%s\n%s\n%s\n" % (build_aaa_out, build_bbb_out, build_ccc_out, build_all))
test.up_to_date(arguments = '.')
@@ -179,7 +179,7 @@ Retrieved `%s' from cache
Retrieved `%s' from cache
""" % (build_aaa_out, build_bbb_out, build_ccc_out, build_all)))
-test.fail_test(os.path.exists(test.workpath('cat.out')))
+test.must_not_exist(test.workpath('cat.out'))
test.up_to_date(arguments = '.')
@@ -194,17 +194,17 @@ Retrieved `%s' from cache
Retrieved `%s' from cache
""" % (build_aaa_out, build_bbb_out, build_ccc_out, build_all)))
-test.fail_test(os.path.exists(test.workpath('build', 'aaa.out')))
-test.fail_test(os.path.exists(test.workpath('build', 'bbb.out')))
-test.fail_test(os.path.exists(test.workpath('build', 'ccc.out')))
-test.fail_test(os.path.exists(test.workpath('build', 'all')))
+test.must_not_exist(test.workpath('build', 'aaa.out'))
+test.must_not_exist(test.workpath('build', 'bbb.out'))
+test.must_not_exist(test.workpath('build', 'ccc.out'))
+test.must_not_exist(test.workpath('build', 'all'))
# Verify that rebuilding with -s retrieves everything from the cache
# even though it doesn't report anything.
test.run(arguments = '-s .', stdout = "")
-test.fail_test(test.read(['build', 'all']) != "aaa.in\nbbb.in\nccc.in\n")
-test.fail_test(os.path.exists(test.workpath('cat.out')))
+test.must_match(['build', 'all'], "aaa.in\nbbb.in\nccc.in\n")
+test.must_not_exist(test.workpath('cat.out'))
test.up_to_date(arguments = '.')
@@ -216,16 +216,16 @@ test.write(['src', 'bbb.in'], "bbb.in 2\n")
test.run(stdout = test.wrap_stdout("""\
Retrieved `%s' from cache
-cat("%s", "%s")
+cat(["%s"], ["%s"])
Retrieved `%s' from cache
-cat("%s", ["%s", "%s", "%s"])
+cat(["%s"], ["%s", "%s", "%s"])
""" % (build_aaa_out,
build_bbb_out, os.path.join('src', 'bbb.in'),
build_ccc_out,
build_all, build_aaa_out, build_bbb_out, build_ccc_out)))
-test.fail_test(test.read(['build', 'all']) != "aaa.in\nbbb.in 2\nccc.in\n")
-test.fail_test(test.read('cat.out') != "%s\n%s\n" % (build_bbb_out, build_all))
+test.must_match(['build', 'all'], "aaa.in\nbbb.in 2\nccc.in\n")
+test.must_match('cat.out', "%s\n%s\n" % (build_bbb_out, build_all))
test.up_to_date(arguments = '.')
@@ -270,7 +270,7 @@ test.write(['subdir', 'file.ma'], "subdir/file.ma\n")
test.run(chdir = 'subdir')
-test.fail_test(os.path.exists(test.workpath('cache3', 'N', 'None')))
+test.must_not_exist(test.workpath('cache3', 'N', 'None'))
#############################################################################
# Test that multiple target files get retrieved from cache correctly.
@@ -290,18 +290,18 @@ test.write(['multiple', 'input'], "multiple/input\n")
test.run(chdir = 'multiple')
-test.fail_test(not os.path.exists(test.workpath('multiple', 'foo')))
-test.fail_test(not os.path.exists(test.workpath('multiple', 'bar')))
+test.must_exist(test.workpath('multiple', 'foo'))
+test.must_exist(test.workpath('multiple', 'bar'))
test.run(chdir = 'multiple', arguments = '-c')
-test.fail_test(os.path.exists(test.workpath('multiple', 'foo')))
-test.fail_test(os.path.exists(test.workpath('multiple', 'bar')))
+test.must_not_exist(test.workpath('multiple', 'foo'))
+test.must_not_exist(test.workpath('multiple', 'bar'))
test.run(chdir = 'multiple')
-test.fail_test(not os.path.exists(test.workpath('multiple', 'foo')))
-test.fail_test(not os.path.exists(test.workpath('multiple', 'bar')))
+test.must_exist(test.workpath('multiple', 'foo'))
+test.must_exist(test.workpath('multiple', 'bar'))
# All done.
test.pass_test()
diff --git a/test/Chmod.py b/test/Chmod.py
index d0929dc..45245f2 100644
--- a/test/Chmod.py
+++ b/test/Chmod.py
@@ -84,12 +84,12 @@ os.chmod(test.workpath('f7.out-Chmod'), 0444)
expect = test.wrap_stdout(read_str = 'Chmod("f1", 0666)\nChmod("d2", 0777)\n',
build_str = """\
-cat("bar.out", "bar.in")
+cat(["bar.out"], ["bar.in"])
Chmod("f3", 0666)
Chmod("d4", 0777)
Chmod("f5", 0666)
-cat("f6.out", "f6.in")
-cat("f7.out", "f7.in")
+cat(["f6.out"], ["f6.in"])
+cat(["f7.out"], ["f7.in"])
Chmod("Chmod-f7.in", 0666)
Chmod("f7.out-Chmod", 0666)
""")
diff --git a/test/Copy.py b/test/Copy.py
index 00642da..b318e58 100644
--- a/test/Copy.py
+++ b/test/Copy.py
@@ -77,13 +77,13 @@ Copy("d2.out", "d2.in")
Copy("d3.out", "f3.in")
""",
build_str = """\
-cat("bar.out", "bar.in")
+cat(["bar.out"], ["bar.in"])
Copy("f4.out", "f4.in")
Copy("d5.out", "d5.in")
Copy("d6.out", "f6.in")
Copy("f7.out", "f7.in")
-cat("f8.out", "f8.in")
-cat("f9.out", "f9.in")
+cat(["f8.out"], ["f8.in"])
+cat(["f9.out"], ["f9.in"])
Copy("f9.out-Copy", "f9.in")
""")
test.run(options = '-n', arguments = '.', stdout = expect)
diff --git a/test/Delete.py b/test/Delete.py
index ece9aa8..4f69c5f 100644
--- a/test/Delete.py
+++ b/test/Delete.py
@@ -74,13 +74,13 @@ Delete("f1")
Delete("d2")
""",
build_str = """\
-cat("f3.out", "f3.in")
+cat(["f3.out"], ["f3.in"])
Delete("f4")
Delete("d5")
Delete("f6")
Delete("d7")
-cat("f8.out", "f8.in")
-cat("f9.out", "f9.in")
+cat(["f8.out"], ["f8.in"])
+cat(["f9.out"], ["f9.in"])
Delete("Delete-f9.in")
Delete("f9.out-Delete")
""")
diff --git a/test/Depends.py b/test/Depends.py
index a7d1bdf..284d6f7 100644
--- a/test/Depends.py
+++ b/test/Depends.py
@@ -78,13 +78,12 @@ test.write(['subdir', 'bar.dep'], "subdir/bar.dep 1\n")
test.run(arguments = '.')
-test.fail_test(test.read('f1.out') != "f1.in\nsubdir/foo.dep 1\n")
-test.fail_test(test.read('f2.out') != "f2.in\nsubdir/foo.dep 1\n")
-test.fail_test(test.read(['subdir', 'f3.out']) != "f3.in\nsubdir/bar.dep 1\n")
-test.fail_test(test.read(['subdir', 'f4.out']) !=
- "subdir/f4.in\nsubdir/bar.dep 1\n")
-test.fail_test(test.read('f5.out') != "f5.in\nsubdir/foo.dep 1\n")
-test.fail_test(test.read(['sub2', 'f6.out']) != "f6.in\nsubdir/bar.dep 1\n")
+test.must_match('f1.out', "f1.in\nsubdir/foo.dep 1\n")
+test.must_match('f2.out', "f2.in\nsubdir/foo.dep 1\n")
+test.must_match(['subdir', 'f3.out'], "f3.in\nsubdir/bar.dep 1\n")
+test.must_match(['subdir', 'f4.out'], "subdir/f4.in\nsubdir/bar.dep 1\n")
+test.must_match('f5.out', "f5.in\nsubdir/foo.dep 1\n")
+test.must_match(['sub2', 'f6.out'], "f6.in\nsubdir/bar.dep 1\n")
#
test.write(['subdir', 'foo.dep'], "subdir/foo.dep 2\n")
@@ -93,52 +92,48 @@ test.write('f6.in', "f6.in 2\n")
test.run(arguments = '.')
-test.fail_test(test.read('f1.out') != "f1.in\nsubdir/foo.dep 2\n")
-test.fail_test(test.read('f2.out') != "f2.in\nsubdir/foo.dep 2\n")
-test.fail_test(test.read(['subdir', 'f3.out']) != "f3.in\nsubdir/bar.dep 2\n")
-test.fail_test(test.read(['subdir', 'f4.out']) !=
- "subdir/f4.in\nsubdir/bar.dep 2\n")
-test.fail_test(test.read('f5.out') != "f5.in\nsubdir/foo.dep 2\n")
-test.fail_test(test.read(['sub2', 'f6.out']) != "f6.in 2\nsubdir/bar.dep 2\n")
+test.must_match('f1.out', "f1.in\nsubdir/foo.dep 2\n")
+test.must_match('f2.out', "f2.in\nsubdir/foo.dep 2\n")
+test.must_match(['subdir', 'f3.out'], "f3.in\nsubdir/bar.dep 2\n")
+test.must_match(['subdir', 'f4.out'], "subdir/f4.in\nsubdir/bar.dep 2\n")
+test.must_match('f5.out', "f5.in\nsubdir/foo.dep 2\n")
+test.must_match(['sub2', 'f6.out'], "f6.in 2\nsubdir/bar.dep 2\n")
#
test.write(['subdir', 'foo.dep'], "subdir/foo.dep 3\n")
test.run(arguments = '.')
-test.fail_test(test.read('f1.out') != "f1.in\nsubdir/foo.dep 3\n")
-test.fail_test(test.read('f2.out') != "f2.in\nsubdir/foo.dep 3\n")
-test.fail_test(test.read(['subdir', 'f3.out']) != "f3.in\nsubdir/bar.dep 2\n")
-test.fail_test(test.read(['subdir', 'f4.out']) !=
- "subdir/f4.in\nsubdir/bar.dep 2\n")
-test.fail_test(test.read('f5.out') != "f5.in\nsubdir/foo.dep 2\n")
-test.fail_test(test.read(['sub2', 'f6.out']) != "f6.in 2\nsubdir/bar.dep 2\n")
+test.must_match('f1.out', "f1.in\nsubdir/foo.dep 3\n")
+test.must_match('f2.out', "f2.in\nsubdir/foo.dep 3\n")
+test.must_match(['subdir', 'f3.out'], "f3.in\nsubdir/bar.dep 2\n")
+test.must_match(['subdir', 'f4.out'], "subdir/f4.in\nsubdir/bar.dep 2\n")
+test.must_match('f5.out', "f5.in\nsubdir/foo.dep 2\n")
+test.must_match(['sub2', 'f6.out'], "f6.in 2\nsubdir/bar.dep 2\n")
#
test.write(['subdir', 'bar.dep'], "subdir/bar.dep 3\n")
test.run(arguments = '.')
-test.fail_test(test.read('f1.out') != "f1.in\nsubdir/foo.dep 3\n")
-test.fail_test(test.read('f2.out') != "f2.in\nsubdir/foo.dep 3\n")
-test.fail_test(test.read(['subdir', 'f3.out']) != "f3.in\nsubdir/bar.dep 3\n")
-test.fail_test(test.read(['subdir', 'f4.out']) !=
- "subdir/f4.in\nsubdir/bar.dep 3\n")
-test.fail_test(test.read('f5.out') != "f5.in\nsubdir/foo.dep 2\n")
-test.fail_test(test.read(['sub2', 'f6.out']) != "f6.in 2\nsubdir/bar.dep 2\n")
+test.must_match('f1.out', "f1.in\nsubdir/foo.dep 3\n")
+test.must_match('f2.out', "f2.in\nsubdir/foo.dep 3\n")
+test.must_match(['subdir', 'f3.out'], "f3.in\nsubdir/bar.dep 3\n")
+test.must_match(['subdir', 'f4.out'], "subdir/f4.in\nsubdir/bar.dep 3\n")
+test.must_match('f5.out', "f5.in\nsubdir/foo.dep 2\n")
+test.must_match(['sub2', 'f6.out'], "f6.in 2\nsubdir/bar.dep 2\n")
#
test.write('f6.in', "f6.in 3\n")
test.run(arguments = '.')
-test.fail_test(test.read('f1.out') != "f1.in\nsubdir/foo.dep 3\n")
-test.fail_test(test.read('f2.out') != "f2.in\nsubdir/foo.dep 3\n")
-test.fail_test(test.read(['subdir', 'f3.out']) != "f3.in\nsubdir/bar.dep 3\n")
-test.fail_test(test.read(['subdir', 'f4.out']) !=
- "subdir/f4.in\nsubdir/bar.dep 3\n")
-test.fail_test(test.read('f5.out') != "f5.in\nsubdir/foo.dep 3\n")
-test.fail_test(test.read(['sub2', 'f6.out']) != "f6.in 3\nsubdir/bar.dep 3\n")
+test.must_match('f1.out', "f1.in\nsubdir/foo.dep 3\n")
+test.must_match('f2.out', "f2.in\nsubdir/foo.dep 3\n")
+test.must_match(['subdir', 'f3.out'], "f3.in\nsubdir/bar.dep 3\n")
+test.must_match(['subdir', 'f4.out'], "subdir/f4.in\nsubdir/bar.dep 3\n")
+test.must_match('f5.out', "f5.in\nsubdir/foo.dep 3\n")
+test.must_match(['sub2', 'f6.out'], "f6.in 3\nsubdir/bar.dep 3\n")
#
test.write('SConstruct', """\
@@ -148,10 +143,6 @@ file2 = File('file2')
env.Depends(file1, [[file2, 'file3']])
""")
-test.run(status = 2, stderr = """
-scons: *** attempted to add a non-Node dependency to file1:
-\t['file2', 'file3'] is a <type 'list'>, not a Node
-File "SConstruct", line 4, in ?
-""")
+test.up_to_date(arguments = '.')
test.pass_test()
diff --git a/test/Environment.py b/test/Environment.py
index b315c40..9851db7 100644
--- a/test/Environment.py
+++ b/test/Environment.py
@@ -37,6 +37,7 @@ target = env.Command('foo.out',
'foo.in',
r'%s build.py $SOURCE $TARGET ${File(BAR)} ${Dir(BLAT)}')
+target = target[0]
assert target == Dir('.').File('foo.out')
assert Dir('.') == Dir('.').Dir('.')
assert target == target.File('foo.out')
diff --git a/test/Exit.py b/test/Exit.py
index 42ae777..570b6db 100644
--- a/test/Exit.py
+++ b/test/Exit.py
@@ -118,13 +118,13 @@ test.write(['subdir', 'foo.in'], "subdir/foo.in\n")
test.run(status = 27,
stdout = test.wrap_stdout("""\
-exit_builder("%s", "%s")
+exit_builder(["%s"], ["%s"])
""" % (subdir_foo_out, subdir_foo_in), error=1),
stderr = """\
scons: *** [%s] Explicit exit, status 27
""" % (subdir_foo_out))
-test.fail_test(test.read(['subdir', 'foo.out']) != "subdir/foo.in\n")
+test.must_match(['subdir', 'foo.out'], "subdir/foo.in\n")
test.write('SConstruct', """\
def exit_scanner(node, env, target):
diff --git a/test/Ignore.py b/test/Ignore.py
index 06db727..1652f60 100644
--- a/test/Ignore.py
+++ b/test/Ignore.py
@@ -74,11 +74,9 @@ test.write(['subdir', 'f3b.in'], "subdir/f3b.in\n")
test.run(arguments = '.')
-test.fail_test(test.read('f1.out') != "f1a.in\nf1b.in\n")
-test.fail_test(test.read(['subdir', 'f2.out']) !=
- "subdir/f2a.in\nsubdir/f2b.in\n")
-test.fail_test(test.read(['subdir', 'f3.out']) !=
- "subdir/f3a.in\nsubdir/f3b.in\n")
+test.must_match('f1.out', "f1a.in\nf1b.in\n")
+test.must_match(['subdir', 'f2.out'], "subdir/f2a.in\nsubdir/f2b.in\n")
+test.must_match(['subdir', 'f3.out'], "subdir/f3a.in\nsubdir/f3b.in\n")
test.up_to_date(arguments = '.')
@@ -88,11 +86,9 @@ test.write(['subdir', 'f3b.in'], "subdir/f3b.in 2\n")
test.up_to_date(arguments = '.')
-test.fail_test(test.read('f1.out') != "f1a.in\nf1b.in\n")
-test.fail_test(test.read(['subdir', 'f2.out']) !=
- "subdir/f2a.in\nsubdir/f2b.in\n")
-test.fail_test(test.read(['subdir', 'f3.out']) !=
- "subdir/f3a.in\nsubdir/f3b.in\n")
+test.must_match('f1.out', "f1a.in\nf1b.in\n")
+test.must_match(['subdir', 'f2.out'], "subdir/f2a.in\nsubdir/f2b.in\n")
+test.must_match(['subdir', 'f3.out'], "subdir/f3a.in\nsubdir/f3b.in\n")
test.write('f1a.in', "f1a.in 2\n")
test.write(['subdir', 'f2b.in'], "subdir/f2b.in 2\n")
@@ -100,11 +96,9 @@ test.write(['subdir', 'f3a.in'], "subdir/f3a.in 2\n")
test.run(arguments = '.')
-test.fail_test(test.read('f1.out') != "f1a.in 2\nf1b.in 2\n")
-test.fail_test(test.read(['subdir', 'f2.out']) !=
- "subdir/f2a.in 2\nsubdir/f2b.in 2\n")
-test.fail_test(test.read(['subdir', 'f3.out']) !=
- "subdir/f3a.in 2\nsubdir/f3b.in 2\n")
+test.must_match('f1.out', "f1a.in 2\nf1b.in 2\n")
+test.must_match(['subdir', 'f2.out'], "subdir/f2a.in 2\nsubdir/f2b.in 2\n")
+test.must_match(['subdir', 'f3.out'], "subdir/f3a.in 2\nsubdir/f3b.in 2\n")
test.up_to_date(arguments = '.')
@@ -116,10 +110,6 @@ file2 = File('file2')
env.Ignore(file1, [[file2, 'file3']])
""")
-test.run(status = 2, stderr = """
-scons: *** attempted to ignore a non-Node dependency of file1:
-\t['file2', 'file3'] is a <type 'list'>, not a Node
-File "SConstruct", line 4, in ?
-""")
+test.up_to_date(arguments = '.')
test.pass_test()
diff --git a/test/Mkdir.py b/test/Mkdir.py
index e0ac3fd..cdbcd4b 100644
--- a/test/Mkdir.py
+++ b/test/Mkdir.py
@@ -59,11 +59,11 @@ test.write('f6.in', "f6.in\n")
expect = test.wrap_stdout(read_str = 'Mkdir("d1")\n',
build_str = """\
-cat("f2.out", "f2.in")
+cat(["f2.out"], ["f2.in"])
Mkdir("d3")
Mkdir("d4")
-cat("f5.out", "f5.in")
-cat("f6.out", "f6.in")
+cat(["f5.out"], ["f5.in"])
+cat(["f6.out"], ["f6.in"])
Mkdir("Mkdir-f6.in")
Mkdir("f6.out-Mkdir")
""")
diff --git a/test/Move.py b/test/Move.py
index a1d9772..c1cdcfd 100644
--- a/test/Move.py
+++ b/test/Move.py
@@ -59,11 +59,11 @@ test.write('f6.in-Move', "f6.in-Move\n")
expect = test.wrap_stdout(read_str = 'Move("f1.out", "f1.in")\n',
build_str = """\
-cat("f2.out", "f2.in")
+cat(["f2.out"], ["f2.in"])
Move("f3.out", "f3.in")
Move("f4.out", "f4.in")
-cat("f5.out", "f5.in")
-cat("f6.out", "f6.in")
+cat(["f5.out"], ["f5.in"])
+cat(["f6.out"], ["f6.in"])
Move("Move-f6.out", "f6.in-Move")
""")
test.run(options = '-n', arguments = '.', stdout = expect)
diff --git a/test/Program.py b/test/Program.py
index 91f391e..007a35b 100644
--- a/test/Program.py
+++ b/test/Program.py
@@ -44,7 +44,9 @@ test.write('SConstruct', """
env = Environment()
env.Program(target = 'foo1', source = 'f1.c')
env.Program(target = 'foo2', source = Split('f2a.c f2b.c f2c.c'))
-Program(target = 'foo3', source = ['f3a.c', 'f3b.c', 'f3c.c'])
+f3a = File('f3a.c')
+f3b = File('f3b.c')
+Program(target = 'foo3', source = [f3a, [f3b, 'f3c.c']])
env.Program('foo4', 'f4.c')
env.Program('foo5.c')
""")
@@ -327,19 +329,4 @@ test.fail_test(not (oldtime3 == os.path.getmtime(foo3)))
test.fail_test(not (oldtime4 == os.path.getmtime(foo4)))
test.fail_test(not (oldtime5 == os.path.getmtime(foo5)))
-#
-test.write('SConstruct', """\
-file1 = File('file1.c')
-file2 = File('file2.c')
-Program('foo', [file1, [file2, 'file3.c']])
-""")
-
-foo_exe = 'foo'+_exe
-
-test.run(status = 2, stderr = """
-scons: *** attempted to add a non-Node as source of %s:
-\t['file2.c', 'file3.c'] is a <type 'list'>, not a Node
-File "SConstruct", line 3, in ?
-""" % foo_exe)
-
test.pass_test()
diff --git a/test/RCS.py b/test/RCS.py
index 93a985e..15ad0f5 100644
--- a/test/RCS.py
+++ b/test/RCS.py
@@ -116,22 +116,22 @@ co -q sub/SConscript
""",
build_str = """\
co -q aaa.in
-cat("aaa.out", "aaa.in")
-cat("bbb.out", "bbb.in")
+cat(["aaa.out"], ["aaa.in"])
+cat(["bbb.out"], ["bbb.in"])
co -q ccc.in
-cat("ccc.out", "ccc.in")
-cat("all", ["aaa.out", "bbb.out", "ccc.out"])
+cat(["ccc.out"], ["ccc.in"])
+cat(["all"], ["aaa.out", "bbb.out", "ccc.out"])
co -q sub/ddd.in
-cat("sub/ddd.out", "sub/ddd.in")
-cat("sub/eee.out", "sub/eee.in")
+cat(["sub/ddd.out"], ["sub/ddd.in"])
+cat(["sub/eee.out"], ["sub/eee.in"])
co -q sub/fff.in
-cat("sub/fff.out", "sub/fff.in")
-cat("sub/all", ["sub/ddd.out", "sub/eee.out", "sub/fff.out"])
+cat(["sub/fff.out"], ["sub/fff.in"])
+cat(["sub/all"], ["sub/ddd.out", "sub/eee.out", "sub/fff.out"])
"""))
-test.fail_test(test.read(['work1', 'all']) != "work1/aaa.in\nchecked-out work1/bbb.in\nwork1/ccc.in\n")
+test.must_match(['work1', 'all'], "work1/aaa.in\nchecked-out work1/bbb.in\nwork1/ccc.in\n")
-test.fail_test(test.read(['work1', 'sub', 'all']) != "work1/sub/ddd.in\nchecked-out work1/sub/eee.in\nwork1/sub/fff.in\n")
+test.must_match(['work1', 'sub', 'all'], "work1/sub/ddd.in\nchecked-out work1/sub/eee.in\nwork1/sub/fff.in\n")
test.fail_test(is_writable(test.workpath('work1', 'sub', 'SConscript')))
test.fail_test(is_writable(test.workpath('work1', 'aaa.in')))
@@ -205,17 +205,17 @@ co -l sub/SConscript
""",
build_str = """\
co -l aaa.in
-cat("aaa.out", "aaa.in")
-cat("bbb.out", "bbb.in")
+cat(["aaa.out"], ["aaa.in"])
+cat(["bbb.out"], ["bbb.in"])
co -l ccc.in
-cat("ccc.out", "ccc.in")
-cat("all", ["aaa.out", "bbb.out", "ccc.out"])
+cat(["ccc.out"], ["ccc.in"])
+cat(["all"], ["aaa.out", "bbb.out", "ccc.out"])
co -l sub/ddd.in
-cat("sub/ddd.out", "sub/ddd.in")
-cat("sub/eee.out", "sub/eee.in")
+cat(["sub/ddd.out"], ["sub/ddd.in"])
+cat(["sub/eee.out"], ["sub/eee.in"])
co -l sub/fff.in
-cat("sub/fff.out", "sub/fff.in")
-cat("sub/all", ["sub/ddd.out", "sub/eee.out", "sub/fff.out"])
+cat(["sub/fff.out"], ["sub/fff.in"])
+cat(["sub/all"], ["sub/ddd.out", "sub/eee.out", "sub/fff.out"])
"""),
stderr = """\
sub/RCS/SConscript,v --> sub/SConscript
@@ -235,9 +235,9 @@ revision 1.1 (locked)
done
""")
-test.fail_test(test.read(['work2', 'all']) != "work2/aaa.in\nchecked-out work2/bbb.in\nwork2/ccc.in\n")
+test.must_match(['work2', 'all'], "work2/aaa.in\nchecked-out work2/bbb.in\nwork2/ccc.in\n")
-test.fail_test(test.read(['work2', 'sub', 'all']) != "work2/sub/ddd.in\nchecked-out work2/sub/eee.in\nwork2/sub/fff.in\n")
+test.must_match(['work2', 'sub', 'all'], "work2/sub/ddd.in\nchecked-out work2/sub/eee.in\nwork2/sub/fff.in\n")
test.fail_test(not is_writable(test.workpath('work2', 'sub', 'SConscript')))
test.fail_test(not is_writable(test.workpath('work2', 'aaa.in')))
diff --git a/test/SCCS.py b/test/SCCS.py
index b98e9a7..52ee0db 100644
--- a/test/SCCS.py
+++ b/test/SCCS.py
@@ -104,17 +104,17 @@ sccs get -e sub/SConscript
""",
build_str = """\
sccs get -e aaa.in
-cat("aaa.out", "aaa.in")
-cat("bbb.out", "bbb.in")
+cat(["aaa.out"], ["aaa.in"])
+cat(["bbb.out"], ["bbb.in"])
sccs get -e ccc.in
-cat("ccc.out", "ccc.in")
-cat("all", ["aaa.out", "bbb.out", "ccc.out"])
+cat(["ccc.out"], ["ccc.in"])
+cat(["all"], ["aaa.out", "bbb.out", "ccc.out"])
sccs get -e sub/ddd.in
-cat("sub/ddd.out", "sub/ddd.in")
-cat("sub/eee.out", "sub/eee.in")
+cat(["sub/ddd.out"], ["sub/ddd.in"])
+cat(["sub/eee.out"], ["sub/eee.in"])
sccs get -e sub/fff.in
-cat("sub/fff.out", "sub/fff.in")
-cat("sub/all", ["sub/ddd.out", "sub/eee.out", "sub/fff.out"])
+cat(["sub/fff.out"], ["sub/fff.in"])
+cat(["sub/all"], ["sub/ddd.out", "sub/eee.out", "sub/fff.out"])
"""),
stderr = """\
sub/SConscript 1.1 -> 1.2: 5 lines
@@ -124,7 +124,7 @@ sub/ddd.in 1.1 -> 1.2: 1 lines
sub/fff.in 1.1 -> 1.2: 1 lines
""")
-test.fail_test(test.read(['work1', 'all']) != "work1/aaa.in\nchecked-out work1/bbb.in\nwork1/ccc.in\n")
+test.must_match(['work1', 'all'], "work1/aaa.in\nchecked-out work1/bbb.in\nwork1/ccc.in\n")
test.fail_test(not is_writable(test.workpath('work1', 'sub', 'SConscript')))
test.fail_test(not is_writable(test.workpath('work1', 'aaa.in')))
@@ -191,17 +191,17 @@ sccs get sub/SConscript
""",
build_str = """\
sccs get aaa.in
-cat("aaa.out", "aaa.in")
-cat("bbb.out", "bbb.in")
+cat(["aaa.out"], ["aaa.in"])
+cat(["bbb.out"], ["bbb.in"])
sccs get ccc.in
-cat("ccc.out", "ccc.in")
-cat("all", ["aaa.out", "bbb.out", "ccc.out"])
+cat(["ccc.out"], ["ccc.in"])
+cat(["all"], ["aaa.out", "bbb.out", "ccc.out"])
sccs get sub/ddd.in
-cat("sub/ddd.out", "sub/ddd.in")
-cat("sub/eee.out", "sub/eee.in")
+cat(["sub/ddd.out"], ["sub/ddd.in"])
+cat(["sub/eee.out"], ["sub/eee.in"])
sccs get sub/fff.in
-cat("sub/fff.out", "sub/fff.in")
-cat("sub/all", ["sub/ddd.out", "sub/eee.out", "sub/fff.out"])
+cat(["sub/fff.out"], ["sub/fff.in"])
+cat(["sub/all"], ["sub/ddd.out", "sub/eee.out", "sub/fff.out"])
"""),
stderr = """\
sub/SConscript 1.1: 5 lines
@@ -211,7 +211,7 @@ sub/ddd.in 1.1: 1 lines
sub/fff.in 1.1: 1 lines
""")
-test.fail_test(test.read(['work2', 'all']) != "work2/aaa.in\nchecked-out work2/bbb.in\nwork2/ccc.in\n")
+test.must_match(['work2', 'all'], "work2/aaa.in\nchecked-out work2/bbb.in\nwork2/ccc.in\n")
test.fail_test(is_writable(test.workpath('work2', 'sub', 'SConscript')))
test.fail_test(is_writable(test.workpath('work2', 'aaa.in')))
diff --git a/test/Scanner.py b/test/Scanner.py
index 0bb3d8b..e1d5237 100644
--- a/test/Scanner.py
+++ b/test/Scanner.py
@@ -92,7 +92,7 @@ env2.Append(SCANNERS = [k2scan])
env2.Command('junk', 'junk.k2', r'%s build.py $SOURCES $TARGET')
bar = env.Command('bar', 'bar.in', r'%s build.py $SOURCES $TARGET')
-bar.source_scanner = kscan
+bar[0].source_scanner = kscan
""" % (python, python, python))
test.write('foo.k',
diff --git a/test/SetBuildSignatureType.py b/test/SetBuildSignatureType.py
index 3449304..69073b6 100644
--- a/test/SetBuildSignatureType.py
+++ b/test/SetBuildSignatureType.py
@@ -57,8 +57,8 @@ test.write('foo.in', 'foo.in')
test.run(arguments='foo.out.out',
stdout=test.wrap_stdout("""\
-copy2("foo.out", "foo.in")
-copy1("foo.out.out", "foo.out")
+copy2(["foo.out"], ["foo.in"])
+copy1(["foo.out.out"], ["foo.out"])
"""),
stderr=warning%16)
@@ -87,7 +87,7 @@ SetBuildSignatureType('content')
test.run(arguments='foo.out.out',
stdout=test.wrap_stdout("""\
-copy2("foo.out", "foo.in")
+copy2(["foo.out"], ["foo.in"])
scons: `foo.out.out' is up to date.
"""),
stderr=warning%17)
@@ -113,7 +113,7 @@ SetBuildSignatureType('build')
test.run(arguments='foo.out.out',
stdout=test.wrap_stdout("""\
-copy1("foo.out.out", "foo.out")
+copy1(["foo.out.out"], ["foo.out"])
"""),
stderr=warning%17)
@@ -137,8 +137,8 @@ SetBuildSignatureType('build')
test.run(arguments='foo.out.out',
stdout=test.wrap_stdout("""\
-copy2("foo.out", "foo.in")
-copy1("foo.out.out", "foo.out")
+copy2(["foo.out"], ["foo.in"])
+copy1(["foo.out.out"], ["foo.out"])
"""),
stderr=warning%16)
diff --git a/test/SetContentSignatureType.py b/test/SetContentSignatureType.py
index 586d55b..a6f6be2 100644
--- a/test/SetContentSignatureType.py
+++ b/test/SetContentSignatureType.py
@@ -63,9 +63,9 @@ test.run(arguments = 'f1.out f3.out',
test.run(arguments = 'f1.out f2.out f3.out f4.out',
stdout = test.wrap_stdout("""\
scons: `f1.out' is up to date.
-build("f2.out", "f2.in")
+build(["f2.out"], ["f2.in"])
scons: `f3.out' is up to date.
-build("f4.out", "f4.in")
+build(["f4.out"], ["f4.in"])
"""),
stderr = warning%11)
@@ -78,9 +78,9 @@ os.utime(test.workpath('f3.in'),
test.run(arguments = 'f1.out f2.out f3.out f4.out',
stdout = test.wrap_stdout("""\
-build("f1.out", "f1.in")
+build(["f1.out"], ["f1.in"])
scons: `f2.out' is up to date.
-build("f3.out", "f3.in")
+build(["f3.out"], ["f3.in"])
scons: `f4.out' is up to date.
"""),
stderr = warning%11)
@@ -109,9 +109,9 @@ test.run(arguments = 'f1.out f3.out',
test.run(arguments = 'f1.out f2.out f3.out f4.out',
stdout = test.wrap_stdout("""\
scons: `f1.out' is up to date.
-build("f2.out", "f2.in")
+build(["f2.out"], ["f2.in"])
scons: `f3.out' is up to date.
-build("f4.out", "f4.in")
+build(["f4.out"], ["f4.in"])
"""),
stderr = warning%11)
diff --git a/test/SideEffect.py b/test/SideEffect.py
index 35241bc..f7533b5 100644
--- a/test/SideEffect.py
+++ b/test/SideEffect.py
@@ -60,8 +60,8 @@ test.write('blat.in', 'blat.in\n')
test.write('baz.in', 'baz.in\n')
test.run(arguments = 'foo.out bar.out', stdout=test.wrap_stdout("""\
-build("foo.out", "foo.in")
-build("bar.out", "bar.in")
+build(["foo.out"], ["foo.in"])
+build(["bar.out"], ["bar.in"])
"""))
expect = """\
@@ -73,8 +73,8 @@ assert test.read('log.txt') == expect
test.write('bar.in', 'bar.in 2 \n')
test.run(arguments = 'log.txt', stdout=test.wrap_stdout("""\
-build("bar.out", "bar.in")
-build("blat.out", "blat.in")
+build(["bar.out"], ["bar.in"])
+build(["blat.out"], ["blat.in"])
"""))
expect = """\
@@ -88,10 +88,10 @@ assert test.read('log.txt') == expect
test.write('foo.in', 'foo.in 2 \n')
test.run(arguments = ".", stdout=test.wrap_stdout("""\
-build("foo.out", "foo.in")
-build("log.out", "log.txt")
-build("%s", "baz.in")
-build("%s", "%s")
+build(["foo.out"], ["foo.in"])
+build(["log.out"], ["log.txt"])
+build(["%s"], ["baz.in"])
+build(["%s"], ["%s"])
""" % (os.path.join('subdir', 'baz.out'),
os.path.join('subdir', 'out.out'),
os.path.join('subdir', 'out.txt'))))
@@ -107,18 +107,18 @@ assert test.read('log.txt') == expect
test.run(arguments = "-c .")
-test.fail_test(os.path.exists(test.workpath('foo.out')))
-test.fail_test(os.path.exists(test.workpath('bar.out')))
-test.fail_test(os.path.exists(test.workpath('blat.out')))
-test.fail_test(os.path.exists(test.workpath('log.txt')))
+test.must_not_exist(test.workpath('foo.out'))
+test.must_not_exist(test.workpath('bar.out'))
+test.must_not_exist(test.workpath('blat.out'))
+test.must_not_exist(test.workpath('log.txt'))
build_lines = [
- 'build("bar.out", "bar.in")',
- 'build("blat.out", "blat.in")',
- 'build("foo.out", "foo.in")',
- 'build("log.out", "log.txt")',
- 'build("%s", "baz.in")' % os.path.join('subdir', 'baz.out'),
- 'build("%s", "%s")' % (os.path.join('subdir', 'out.out'),
+ 'build(["bar.out"], ["bar.in"])',
+ 'build(["blat.out"], ["blat.in"])',
+ 'build(["foo.out"], ["foo.in"])',
+ 'build(["log.out"], ["log.txt"])',
+ 'build(["%s"], ["baz.in"])' % os.path.join('subdir', 'baz.out'),
+ 'build(["%s"], ["%s"])' % (os.path.join('subdir', 'out.out'),
os.path.join('subdir', 'out.txt')),
]
test.run(arguments = "-j 4 .")
@@ -160,14 +160,14 @@ env.SideEffect(Dir('log'), ['foo.out', 'bar.out', 'blat.out'])
test.run(arguments='foo.out')
-test.fail_test(not os.path.exists(test.workpath('foo.out')))
-test.fail_test(not os.path.exists(test.workpath('log/foo.out')))
-test.fail_test(os.path.exists(test.workpath('log', 'bar.out')))
-test.fail_test(os.path.exists(test.workpath('log', 'blat.out')))
+test.must_exist(test.workpath('foo.out'))
+test.must_exist(test.workpath('log/foo.out'))
+test.must_not_exist(test.workpath('log', 'bar.out'))
+test.must_not_exist(test.workpath('log', 'blat.out'))
test.run(arguments='log')
-test.fail_test(not os.path.exists(test.workpath('log', 'bar.out')))
-test.fail_test(not os.path.exists(test.workpath('log', 'blat.out')))
+test.must_exist(test.workpath('log', 'bar.out'))
+test.must_exist(test.workpath('log', 'blat.out'))
test.write('SConstruct',
"""
diff --git a/test/SourceCode.py b/test/SourceCode.py
index de2653f..ea18004 100644
--- a/test/SourceCode.py
+++ b/test/SourceCode.py
@@ -76,18 +76,18 @@ test.write(['sub', 'sc-SConscript'], "'sub/sc-SConscript'\n")
test.run(arguments = '.',
stdout = test.wrap_stdout(read_str = """\
-sc_cat("%s", [])
+sc_cat(["%s"], [])
""" % (os.path.join('sub', 'SConscript')),
build_str = """\
-sc_cat("%s", [])
-cat("aaa.out", "%s")
-sc_cat("%s", [])
-cat("bbb.out", "%s")
-sc_cat("%s", [])
-cat("ccc.out", "%s")
-cat("all", ["aaa.out", "bbb.out", "ccc.out"])
-sc_cat("%s", [])
-cat("ddd.out", "%s")
+sc_cat(["%s"], [])
+cat(["aaa.out"], ["%s"])
+sc_cat(["%s"], [])
+cat(["bbb.out"], ["%s"])
+sc_cat(["%s"], [])
+cat(["ccc.out"], ["%s"])
+cat(["all"], ["aaa.out", "bbb.out", "ccc.out"])
+sc_cat(["%s"], [])
+cat(["ddd.out"], ["%s"])
""" % (os.path.join('sub', 'aaa.in'),
os.path.join('sub', 'aaa.in'),
os.path.join('sub', 'bbb.in'),
@@ -97,8 +97,8 @@ cat("ddd.out", "%s")
os.path.join('sub2', 'ddd.in'),
os.path.join('sub2', 'ddd.in'))))
-test.fail_test(test.read(['sub', 'SConscript']) != "'sub/sc-SConscript'\n")
-test.fail_test(test.read('all') != "sub/sc-aaa.in\nsub/sc-bbb.in\nsub/sc-ccc.in\n")
-test.fail_test(test.read('ddd.out') != "sub2/sc-ddd.in\n")
+test.must_match(['sub', 'SConscript'], "'sub/sc-SConscript'\n")
+test.must_match('all', "sub/sc-aaa.in\nsub/sc-bbb.in\nsub/sc-ccc.in\n")
+test.must_match('ddd.out', "sub2/sc-ddd.in\n")
test.pass_test()
diff --git a/test/SourceSignatures.py b/test/SourceSignatures.py
index 10dfb29..36a9195 100644
--- a/test/SourceSignatures.py
+++ b/test/SourceSignatures.py
@@ -56,9 +56,9 @@ test.run(arguments = 'f1.out f3.out')
test.run(arguments = 'f1.out f2.out f3.out f4.out',
stdout = test.wrap_stdout("""\
scons: `f1.out' is up to date.
-build("f2.out", "f2.in")
+build(["f2.out"], ["f2.in"])
scons: `f3.out' is up to date.
-build("f4.out", "f4.in")
+build(["f4.out"], ["f4.in"])
"""))
os.utime(test.workpath('f1.in'),
@@ -70,9 +70,9 @@ os.utime(test.workpath('f3.in'),
test.run(arguments = 'f1.out f2.out f3.out f4.out',
stdout = test.wrap_stdout("""\
-build("f1.out", "f1.in")
+build(["f1.out"], ["f1.in"])
scons: `f2.out' is up to date.
-build("f3.out", "f3.in")
+build(["f3.out"], ["f3.in"])
scons: `f4.out' is up to date.
"""))
@@ -99,9 +99,9 @@ test.run(arguments = 'f1.out f3.out')
test.run(arguments = 'f1.out f2.out f3.out f4.out',
stdout = test.wrap_stdout("""\
scons: `f1.out' is up to date.
-build("f2.out", "f2.in")
+build(["f2.out"], ["f2.in"])
scons: `f3.out' is up to date.
-build("f4.out", "f4.in")
+build(["f4.out"], ["f4.in"])
"""))
os.utime(test.workpath('f1.in'),
@@ -151,9 +151,9 @@ test.run(arguments = 'f5.out f7.out')
test.run(arguments = 'f5.out f6.out f7.out f8.out',
stdout = test.wrap_stdout("""\
scons: `f5.out' is up to date.
-build("f6.out", "f6.in")
+build(["f6.out"], ["f6.in"])
scons: `f7.out' is up to date.
-build("f8.out", "f8.in")
+build(["f8.out"], ["f8.in"])
"""))
os.utime(test.workpath('f5.in'),
@@ -165,7 +165,7 @@ os.utime(test.workpath('f7.in'),
test.run(arguments = 'f5.out f6.out f7.out f8.out',
stdout = test.wrap_stdout("""\
-build("f5.out", "f5.in")
+build(["f5.out"], ["f5.in"])
scons: `f6.out' is up to date.
scons: `f7.out' is up to date.
scons: `f8.out' is up to date.
@@ -186,10 +186,9 @@ env.B(target = 'switch.out', source = 'switch.in')
test.write('switch.in', "switch.in\n")
-test.run(arguments = 'switch.out',
- stdout = test.wrap_stdout("""\
-build("switch.out", "switch.in")
-"""))
+switch_out_switch_in = test.wrap_stdout('build(["switch.out"], ["switch.in"])\n')
+
+test.run(arguments = 'switch.out', stdout = switch_out_switch_in)
test.up_to_date(arguments = 'switch.out')
@@ -203,10 +202,7 @@ env = Environment(BUILDERS = { 'B' : B })
env.B(target = 'switch.out', source = 'switch.in')
""")
-test.run(arguments = 'switch.out',
- stdout = test.wrap_stdout("""\
-build("switch.out", "switch.in")
-"""))
+test.run(arguments = 'switch.out', stdout = switch_out_switch_in)
test.up_to_date(arguments = 'switch.out')
@@ -220,19 +216,13 @@ env = Environment(BUILDERS = { 'B' : B })
env.B(target = 'switch.out', source = 'switch.in')
""")
-test.run(arguments = 'switch.out',
- stdout = test.wrap_stdout("""\
-build("switch.out", "switch.in")
-"""))
+test.run(arguments = 'switch.out', stdout = switch_out_switch_in)
test.up_to_date(arguments = 'switch.out')
test.write('switch.in', "switch.in 2\n")
-test.run(arguments = 'switch.out',
- stdout = test.wrap_stdout("""\
-build("switch.out", "switch.in")
-"""))
+test.run(arguments = 'switch.out', stdout = switch_out_switch_in)
# Test both implicit_cache and timestamp signatures at the same time:
@@ -249,41 +239,30 @@ env.B(target = 'both.out', source = 'both.in')
test.write('both.in', "both.in 1\n")
-test.run(arguments = 'both.out',
- stdout = test.wrap_stdout("""\
-build("both.out", "both.in")
-"""))
+both_out_both_in = test.wrap_stdout('build(["both.out"], ["both.in"])\n')
+
+test.run(arguments = 'both.out', stdout = both_out_both_in)
time.sleep(2)
test.write('both.in', "both.in 2\n")
-test.run(arguments = 'both.out',
- stdout = test.wrap_stdout("""\
-build("both.out", "both.in")
-"""))
+test.run(arguments = 'both.out', stdout = both_out_both_in)
time.sleep(2)
test.write('both.in', "both.in 3\n")
-test.run(arguments = 'both.out',
- stdout = test.wrap_stdout("""\
-build("both.out", "both.in")
-"""))
+test.run(arguments = 'both.out', stdout = both_out_both_in)
time.sleep(2)
test.write('both.in', "both.in 4\n")
-test.run(arguments = 'both.out',
- stdout = test.wrap_stdout("""\
-build("both.out", "both.in")
-"""))
+test.run(arguments = 'both.out', stdout = both_out_both_in)
time.sleep(2)
-
test.up_to_date(arguments = 'both.out')
test.pass_test()
diff --git a/test/TargetSignatures.py b/test/TargetSignatures.py
index 2ee016e..11dee8a 100644
--- a/test/TargetSignatures.py
+++ b/test/TargetSignatures.py
@@ -56,10 +56,10 @@ test.write('bar.in', 'bar.in')
test.run(arguments="bar.out foo.out",
stdout=test.wrap_stdout("""\
-copy2("bar.mid", "bar.in")
-copy1("bar.out", "bar.mid")
-copy2("foo.mid", "foo.in")
-copy1("foo.out", "foo.mid")
+copy2(["bar.mid"], ["bar.in"])
+copy1(["bar.out"], ["bar.mid"])
+copy2(["foo.mid"], ["foo.in"])
+copy1(["foo.out"], ["foo.mid"])
"""))
test.up_to_date(arguments='bar.out foo.out')
@@ -90,9 +90,9 @@ TargetSignatures('content')
test.run(arguments="bar.out foo.out",
stdout=test.wrap_stdout("""\
-copy2("bar.mid", "bar.in")
-copy1("bar.out", "bar.mid")
-copy2("foo.mid", "foo.in")
+copy2(["bar.mid"], ["bar.in"])
+copy1(["bar.out"], ["bar.mid"])
+copy2(["foo.mid"], ["foo.in"])
scons: `foo.out' is up to date.
"""))
@@ -122,8 +122,8 @@ TargetSignatures('build')
test.run(arguments="bar.out foo.out",
stdout=test.wrap_stdout("""\
-copy1("bar.out", "bar.mid")
-copy1("foo.out", "foo.mid")
+copy1(["bar.out"], ["bar.mid"])
+copy1(["foo.out"], ["foo.mid"])
"""))
test.write('SConstruct', """
@@ -151,10 +151,10 @@ TargetSignatures('build')
test.run(arguments='bar.out foo.out',
stdout=test.wrap_stdout("""\
-copy2("bar.mid", "bar.in")
+copy2(["bar.mid"], ["bar.in"])
scons: `bar.out' is up to date.
-copy2("foo.mid", "foo.in")
-copy1("foo.out", "foo.mid")
+copy2(["foo.mid"], ["foo.in"])
+copy1(["foo.out"], ["foo.mid"])
"""))
diff --git a/test/Touch.py b/test/Touch.py
index 7a3ca19..b41db25 100644
--- a/test/Touch.py
+++ b/test/Touch.py
@@ -62,11 +62,11 @@ oldtime = os.path.getmtime(test.workpath('f1'))
expect = test.wrap_stdout(read_str = 'Touch("f1")\n',
build_str = """\
-cat("f2.out", "f2.in")
+cat(["f2.out"], ["f2.in"])
Touch("f3")
Touch("f4")
-cat("f5.out", "f5.in")
-cat("f6.out", "f6.in")
+cat(["f5.out"], ["f5.in"])
+cat(["f6.out"], ["f6.in"])
Touch("Touch-f6.in")
Touch("f6.out-Touch")
""")
diff --git a/test/Value.py b/test/Value.py
index ee92d43..e3106b8 100644
--- a/test/Value.py
+++ b/test/Value.py
@@ -63,45 +63,39 @@ env.B('f3.out', Value(C))
test.run(arguments='-c')
test.run()
- out1 = """create("f1.out", "'/usr/local'")"""
- out2 = """create("f2.out", "10")"""
- out3 = """create\\("f3.out", "<.*.Custom instance at """
+ out1 = """create(["f1.out"], ["'/usr/local'"])"""
+ out2 = """create(["f2.out"], ["10"])"""
+ out3 = """create\\(\\["f3.out"\\], \\["<.*.Custom instance at """
#" <- unconfuses emacs syntax highlighting
test.fail_test(string.find(test.stdout(), out1) == -1)
test.fail_test(string.find(test.stdout(), out2) == -1)
test.fail_test(re.search(out3, test.stdout()) == None)
- test.fail_test(not os.path.exists(test.workpath('f1.out')))
- test.fail_test(open(test.workpath('f1.out'), 'rb').read() != '/usr/local')
- test.fail_test(not os.path.exists(test.workpath('f2.out')))
- test.fail_test(open(test.workpath('f2.out'), 'rb').read() != '10')
- test.fail_test(not os.path.exists(test.workpath('f3.out')))
- test.fail_test(open(test.workpath('f3.out'), 'rb').read() != 'C=/usr/local')
+ test.must_match('f1.out', "/usr/local")
+ test.must_match('f2.out', "10")
+ test.must_match('f3.out', "C=/usr/local")
test.up_to_date(arguments='.')
test.run(arguments='prefix=/usr')
- out4 = """create("f1.out", "'/usr'")"""
- out5 = """create("f2.out", "4")"""
- out6 = """create\\("f3.out", "<.*.Custom instance at """
+ out4 = """create(["f1.out"], ["'/usr'"])"""
+ out5 = """create(["f2.out"], ["4"])"""
+ out6 = """create\\(\\["f3.out"\\], \\["<.*.Custom instance at """
#" <- unconfuses emacs syntax highlighting
test.fail_test(string.find(test.stdout(), out4) == -1)
test.fail_test(string.find(test.stdout(), out5) == -1)
test.fail_test(re.search(out6, test.stdout()) == None)
- test.fail_test(not os.path.exists(test.workpath('f1.out')))
- test.fail_test(open(test.workpath('f1.out'), 'rb').read() != '/usr')
- test.fail_test(not os.path.exists(test.workpath('f2.out')))
- test.fail_test(open(test.workpath('f2.out'), 'rb').read() != '4')
- test.fail_test(not os.path.exists(test.workpath('f3.out')))
- test.fail_test(open(test.workpath('f3.out'), 'rb').read() != 'C=/usr')
+ test.must_match('f1.out', "/usr")
+ test.must_match('f2.out', "4")
+ test.must_match('f3.out', "C=/usr")
test.up_to_date('prefix=/usr', '.')
test.unlink('f3.out')
test.run(arguments='prefix=/var')
- out4 = """create("f1.out", "'/var'")"""
+ out4 = """create(["f1.out"], ["'/var'"])"""
test.fail_test(string.find(test.stdout(), out4) == -1)
test.fail_test(string.find(test.stdout(), out5) != -1)
@@ -109,11 +103,8 @@ env.B('f3.out', Value(C))
test.up_to_date('prefix=/var', '.')
- test.fail_test(not os.path.exists(test.workpath('f1.out')))
- test.fail_test(open(test.workpath('f1.out'), 'rb').read() != '/var')
- test.fail_test(not os.path.exists(test.workpath('f2.out')))
- test.fail_test(open(test.workpath('f2.out'), 'rb').read() != '4')
- test.fail_test(not os.path.exists(test.workpath('f3.out')))
- test.fail_test(open(test.workpath('f3.out'), 'rb').read() != 'C=/var')
+ test.must_match('f1.out', "/var")
+ test.must_match('f2.out', "4")
+ test.must_match('f3.out', "C=/var")
test.pass_test()
diff --git a/test/chained-build.py b/test/chained-build.py
index ea9bec0..23187bc 100644
--- a/test/chained-build.py
+++ b/test/chained-build.py
@@ -53,10 +53,10 @@ test.write(['w1', 'foo.in'], "foo.in 1")
test.run(chdir='w1',
arguments="--max-drift=0 -f SConstruct1 foo.mid",
- stdout = test.wrap_stdout('build("foo.mid", "foo.in")\n'))
+ stdout = test.wrap_stdout('build(["foo.mid"], ["foo.in"])\n'))
test.run(chdir='w1',
arguments="--max-drift=0 -f SConstruct2 foo.out",
- stdout = test.wrap_stdout('build("foo.out", "foo.mid")\n'))
+ stdout = test.wrap_stdout('build(["foo.out"], ["foo.mid"])\n'))
test.up_to_date(chdir='w1',
options="--max-drift=0 -f SConstruct1",
@@ -70,10 +70,10 @@ test.write(['w1', 'foo.in'], "foo.in 2")
test.run(chdir='w1',
arguments="--max-drift=0 -f SConstruct1 foo.mid",
- stdout = test.wrap_stdout('build("foo.mid", "foo.in")\n'))
+ stdout = test.wrap_stdout('build(["foo.mid"], ["foo.in"])\n'))
test.run(chdir='w1',
arguments="--max-drift=0 -f SConstruct2 foo.out",
- stdout = test.wrap_stdout('build("foo.out", "foo.mid")\n'))
+ stdout = test.wrap_stdout('build(["foo.out"], ["foo.mid"])\n'))
test.up_to_date(chdir='w1',
options="--max-drift=0 -f SConstruct1",
@@ -90,10 +90,10 @@ test.write(['w2', 'foo.in'], "foo.in 1")
test.run(chdir='w2',
arguments="--max-drift=0 -f SConstruct1 foo.mid",
- stdout = test.wrap_stdout('build("foo.mid", "foo.in")\n'))
+ stdout = test.wrap_stdout('build(["foo.mid"], ["foo.in"])\n'))
test.run(chdir='w2',
arguments="--max-drift=0 -f SConstruct2 foo.out",
- stdout = test.wrap_stdout('build("foo.out", "foo.mid")\n'))
+ stdout = test.wrap_stdout('build(["foo.out"], ["foo.mid"])\n'))
test.up_to_date(chdir='w2',
options="--max-drift=0 -f SConstruct1",
@@ -107,10 +107,10 @@ test.write(['w2', 'foo.in'], "foo.in 2")
test.run(chdir='w2',
arguments="--max-drift=0 -f SConstruct1 foo.mid",
- stdout = test.wrap_stdout('build("foo.mid", "foo.in")\n'))
+ stdout = test.wrap_stdout('build(["foo.mid"], ["foo.in"])\n'))
test.run(chdir='w2',
arguments="--max-drift=0 -f SConstruct2 foo.out",
- stdout = test.wrap_stdout('build("foo.out", "foo.mid")\n'))
+ stdout = test.wrap_stdout('build(["foo.out"], ["foo.mid"])\n'))
test.up_to_date(chdir='w2',
options="--max-drift=0 -f SConstruct1",
diff --git a/test/multi.py b/test/multi.py
index 9920cbc..989c636 100644
--- a/test/multi.py
+++ b/test/multi.py
@@ -56,7 +56,7 @@ test.write('file1b.in', 'file1b.in\n')
test.run(arguments='file1.out')
-test.fail_test(not test.read('file1.out') == 'file1a.in\nfile1b.in\n')
+test.must_match('file1.out', "file1a.in\nfile1b.in\n")
#
@@ -135,7 +135,7 @@ test.write('file4b.in', 'file4b.in\n')
test.run(arguments='file4.out')
-test.fail_test(not test.read('file4.out') == 'file4a.in\nfile4b.in\n')
+test.must_match('file4.out', "file4a.in\nfile4b.in\n")
#
@@ -162,11 +162,11 @@ test.write('file5b.in', 'file5b.in\n')
test.run(arguments='file5.out',
stderr="""
scons: warning: Two different environments were specified for target file5.out,
- but they appear to have the same action: build("file5.out", "file5b.in")
+ but they appear to have the same action: build(["file5.out"], ["file5b.in"])
File "SConstruct", line 11, in ?
""")
-test.fail_test(not test.read('file5.out') == 'file5a.in\nfile5b.in\n')
+test.must_match('file5.out', "file5a.in\nfile5b.in\n")
#
@@ -219,7 +219,7 @@ test.write('file7.in', 'file7.in\n')
test.run(arguments='file7.out')
-test.fail_test(not test.read('file7.out') == 'file7.in\n')
+test.must_match('file7.out', "file7.in\n")
#
@@ -277,8 +277,8 @@ test.write('file9b.in', 'file9b.in\n')
test.run(arguments='file9b.out')
-test.fail_test(not test.read('file9a.out') == 'file9a.in\nfile9b.in\n')
-test.fail_test(not test.read('file9b.out') == 'file9a.in\nfile9b.in\n')
+test.must_match('file9a.out', "file9a.in\nfile9b.in\n")
+test.must_match('file9b.out', "file9a.in\nfile9b.in\n")
#
diff --git a/test/option--cd.py b/test/option--cd.py
index e68256b..9aa9402 100644
--- a/test/option--cd.py
+++ b/test/option--cd.py
@@ -63,8 +63,8 @@ test.write(['src', 'ccc.in'], "ccc.in\n")
# This should populate the cache with our derived files.
test.run(chdir = 'src', arguments = '.')
-test.fail_test(test.read(['src', 'all']) != "aaa.in\nbbb.in\nccc.in\n")
-test.fail_test(test.read(['src', 'cat.out']) != "aaa.out\nbbb.out\nccc.out\nall\n")
+test.must_match(['src', 'all'], "aaa.in\nbbb.in\nccc.in\n")
+test.must_match(['src', 'cat.out'], "aaa.out\nbbb.out\nccc.out\nall\n")
test.up_to_date(chdir = 'src', arguments = '.')
@@ -80,8 +80,8 @@ Retrieved `ccc.out' from cache
Retrieved `all' from cache
"""))
-test.fail_test(test.read(['src', 'all']) != "aaa.in\nbbb.in\nccc.in\n")
-test.fail_test(os.path.exists(test.workpath('src', 'cat.out')))
+test.must_match(['src', 'all'], "aaa.in\nbbb.in\nccc.in\n")
+test.must_not_exist(test.workpath('src', 'cat.out'))
test.up_to_date(chdir = 'src', arguments = '.')
@@ -92,14 +92,14 @@ test.run(chdir = 'src', arguments = '-c .')
test.run(chdir = 'src',
arguments = '--cache-disable .',
stdout = test.wrap_stdout("""\
-cat("aaa.out", "aaa.in")
-cat("bbb.out", "bbb.in")
-cat("ccc.out", "ccc.in")
-cat("all", ["aaa.out", "bbb.out", "ccc.out"])
+cat(["aaa.out"], ["aaa.in"])
+cat(["bbb.out"], ["bbb.in"])
+cat(["ccc.out"], ["ccc.in"])
+cat(["all"], ["aaa.out", "bbb.out", "ccc.out"])
"""))
-test.fail_test(test.read(['src', 'all']) != "aaa.in\nbbb.in\nccc.in\n")
-test.fail_test(test.read(['src', 'cat.out']) != "aaa.out\nbbb.out\nccc.out\nall\n")
+test.must_match(['src', 'all'], "aaa.in\nbbb.in\nccc.in\n")
+test.must_match(['src', 'cat.out'], "aaa.out\nbbb.out\nccc.out\nall\n")
test.up_to_date(chdir = 'src', arguments = '.')
@@ -111,14 +111,14 @@ test.unlink(['src', 'cat.out'])
test.run(chdir = 'src',
arguments = '--no-cache .',
stdout = test.wrap_stdout("""\
-cat("aaa.out", "aaa.in")
-cat("bbb.out", "bbb.in")
-cat("ccc.out", "ccc.in")
-cat("all", ["aaa.out", "bbb.out", "ccc.out"])
+cat(["aaa.out"], ["aaa.in"])
+cat(["bbb.out"], ["bbb.in"])
+cat(["ccc.out"], ["ccc.in"])
+cat(["all"], ["aaa.out", "bbb.out", "ccc.out"])
"""))
-test.fail_test(test.read(['src', 'all']) != "aaa.in\nbbb.in\nccc.in\n")
-test.fail_test(test.read(['src', 'cat.out']) != "aaa.out\nbbb.out\nccc.out\nall\n")
+test.must_match(['src', 'all'], "aaa.in\nbbb.in\nccc.in\n")
+test.must_match(['src', 'cat.out'], "aaa.out\nbbb.out\nccc.out\nall\n")
test.up_to_date(chdir = 'src', arguments = '.')
diff --git a/test/option--cs.py b/test/option--cs.py
index 00ec2f9..5f0ec39 100644
--- a/test/option--cs.py
+++ b/test/option--cs.py
@@ -77,9 +77,9 @@ test.write(['src1', 'ccc.in'], "ccc.in\n")
# This should populate the cache with our derived files.
test.run(chdir = 'src1', arguments = '.')
-test.fail_test(test.read(['src1', 'all']) != "aaa.in\nbbb.in\nccc.in\n")
+test.must_match(['src1', 'all'], "aaa.in\nbbb.in\nccc.in\n")
-test.fail_test(test.read(['src1', 'cat.out']) != "aaa.out\nbbb.out\nccc.out\nall\n")
+test.must_match(['src1', 'cat.out'], "aaa.out\nbbb.out\nccc.out\nall\n")
test.up_to_date(chdir = 'src1', arguments = '.')
@@ -95,7 +95,7 @@ Retrieved `ccc.out' from cache
Retrieved `all' from cache
"""))
-test.fail_test(os.path.exists(test.workpath('src1', 'cat.out')))
+test.must_not_exist(test.workpath('src1', 'cat.out'))
test.up_to_date(chdir = 'src1', arguments = '.')
@@ -108,11 +108,11 @@ test.run(chdir = 'src1',
stdout = test.wrap_stdout("""\
%s build.py aaa.out aaa.in
%s build.py bbb.out bbb.in
-cat("ccc.out", "ccc.in")
-cat("all", ["aaa.out", "bbb.out", "ccc.out"])
+cat(["ccc.out"], ["ccc.in"])
+cat(["all"], ["aaa.out", "bbb.out", "ccc.out"])
""" % (python, python)))
-test.fail_test(os.path.exists(test.workpath('src1', 'cat.out')))
+test.must_not_exist(test.workpath('src1', 'cat.out'))
test.up_to_date(chdir = 'src1', arguments = '.')
@@ -126,16 +126,16 @@ test.run(chdir = 'src1',
stdout = test.wrap_stdout("""\
%s build.py aaa.out aaa.in
%s build.py bbb.out bbb.in
-cat("ccc.out", "ccc.in")
-cat("all", ["aaa.out", "bbb.out", "ccc.out"])
+cat(["ccc.out"], ["ccc.in"])
+cat(["all"], ["aaa.out", "bbb.out", "ccc.out"])
""" % (python, python)))
-test.fail_test(os.path.exists(test.workpath('src1', 'cat.out')))
+test.must_not_exist(test.workpath('src1', 'cat.out'))
-test.fail_test(os.path.exists(test.workpath('src1', 'aaa.out')))
-test.fail_test(os.path.exists(test.workpath('src1', 'bbb.out')))
-test.fail_test(os.path.exists(test.workpath('src1', 'ccc.out')))
-test.fail_test(os.path.exists(test.workpath('src1', 'all')))
+test.must_not_exist(test.workpath('src1', 'aaa.out'))
+test.must_not_exist(test.workpath('src1', 'bbb.out'))
+test.must_not_exist(test.workpath('src1', 'ccc.out'))
+test.must_not_exist(test.workpath('src1', 'all'))
# Verify that using --cache-show -s doesn't report anything, even though
# we do fetch the files from the cache. No need to clean up.
@@ -143,8 +143,8 @@ test.run(chdir = 'src1',
arguments = '--cache-show -s .',
stdout = "")
-test.fail_test(test.read(['src1', 'all']) != "aaa.in\nbbb.in\nccc.in\n")
-test.fail_test(os.path.exists(test.workpath('src1', 'cat.out')))
+test.must_match(['src1', 'all'], "aaa.in\nbbb.in\nccc.in\n")
+test.must_not_exist(test.workpath('src1', 'cat.out'))
#
hello_exe = 'hello' + _exe
diff --git a/test/option--debug.py b/test/option--debug.py
index 0893170..64cc424 100644
--- a/test/option--debug.py
+++ b/test/option--debug.py
@@ -323,13 +323,13 @@ __PYTHON__ cat.py file06.in temp
__PYTHON__ cat.py temp file06.out
Building file07.out with action(s):
cat(env, target, source)
-cat("file07.out", "file07.in")
+cat(["file07.out"], ["file07.in"])
Building file08.out with action(s):
cat(env, target, source)
-cat("file08.out", "file08.in")
+cat(["file08.out"], ["file08.in"])
Building file09.out with action(s):
cat(env, target, source)
-cat("file09.out", "file09.in")
+cat(["file09.out"], ["file09.in"])
Building file11.out with action(s):
$PYTHON cat.py $SOURCES $TARGET
__PYTHON__ cat.py file11.in file11.out
@@ -358,10 +358,10 @@ __PYTHON__ cat.py file16.in temp
__PYTHON__ cat.py temp file16.out
Building file17.out with action(s):
cat(env, target, source)
-cat("file17.out", "file17.in")
+cat(["file17.out"], ["file17.in"])
Building file18.out with action(s):
cat(env, target, source)
-cat("file18.out", "file18.in")
+cat(["file18.out"], ["file18.in"])
"""
expect = string.replace(expect, '__PYTHON__', TestSCons.python)
test.run(arguments = "--debug=presub .", stdout=test.wrap_stdout(expect))
diff --git a/test/option--warn.py b/test/option--warn.py
index 8c84b6d..155545b 100644
--- a/test/option--warn.py
+++ b/test/option--warn.py
@@ -127,16 +127,16 @@ test.write('file1b.in', 'file1b.in\n')
test.run(arguments='file1.out',
stderr=r"""
scons: warning: Two different environments were specified for target file1.out,
- but they appear to have the same action: build\("file1.out", "file1b.in"\)
+ but they appear to have the same action: build\(\["file1.out"\], \["file1b.in"\]\)
File "SConstruct", line \d+, in .+
""")
-test.fail_test(not test.read('file1.out') == 'file1a.in\nfile1b.in\n')
+test.must_match('file1.out', "file1a.in\nfile1b.in\n")
test.run(arguments='--warn=duplicate-environment file1.out',
stderr=r"""
scons: warning: Two different environments were specified for target file1.out,
- but they appear to have the same action: build\("file1.out", "file1b.in"\)
+ but they appear to have the same action: build\(\["file1.out"\], \["file1b.in"\]\)
File "SConstruct", line \d+, in .+
""")
diff --git a/test/option-u.py b/test/option-u.py
index 82583d4..28bab30 100644
--- a/test/option-u.py
+++ b/test/option-u.py
@@ -84,37 +84,37 @@ test.write(['sub4', 'dir', 'f4b.in'], "sub4/dir/f4b.in")
# Verify that we only build the specified local argument.
test.run(chdir = 'sub1', arguments = '-u f1a.out')
-test.fail_test(test.read(['sub1', 'f1a.out']) != "sub1/f1a.in")
-test.fail_test(os.path.exists(test.workpath('sub1', 'sub1/f1b.out')))
-test.fail_test(os.path.exists(test.workpath('sub2', 'f2a.out')))
-test.fail_test(os.path.exists(test.workpath('sub2', 'dir', 'f2b.out')))
-test.fail_test(os.path.exists(test.workpath('sub3', 'f3.out')))
-test.fail_test(os.path.exists(test.workpath('sub4', 'f4a.out')))
-test.fail_test(os.path.exists(test.workpath('sub4', 'dir', 'f4b.out')))
-test.fail_test(os.path.exists(test.workpath('build', 'f4a.out')))
-test.fail_test(os.path.exists(test.workpath('build', 'dir', 'f4b.out')))
+test.must_match(['sub1', 'f1a.out'], "sub1/f1a.in")
+test.must_not_exist(test.workpath('sub1', 'sub1/f1b.out'))
+test.must_not_exist(test.workpath('sub2', 'f2a.out'))
+test.must_not_exist(test.workpath('sub2', 'dir', 'f2b.out'))
+test.must_not_exist(test.workpath('sub3', 'f3.out'))
+test.must_not_exist(test.workpath('sub4', 'f4a.out'))
+test.must_not_exist(test.workpath('sub4', 'dir', 'f4b.out'))
+test.must_not_exist(test.workpath('build', 'f4a.out'))
+test.must_not_exist(test.workpath('build', 'dir', 'f4b.out'))
# Verify that we build everything at or below our current directory.
test.run(chdir = 'sub2', arguments = '-u')
-test.fail_test(os.path.exists(test.workpath('sub1', 'sub1/f1b.out')))
-test.fail_test(test.read(['sub2', 'f2a.out']) != "sub2/f2a.in")
-test.fail_test(test.read(['sub2', 'dir', 'f2b.out']) != "sub2/dir/f2b.in")
-test.fail_test(os.path.exists(test.workpath('sub3', 'f3.out')))
-test.fail_test(os.path.exists(test.workpath('sub4', 'f4a.out')))
-test.fail_test(os.path.exists(test.workpath('sub4', 'dir', 'f4b.out')))
-test.fail_test(os.path.exists(test.workpath('build', 'f4a.out')))
-test.fail_test(os.path.exists(test.workpath('build', 'dir', 'f4b.out')))
+test.must_not_exist(test.workpath('sub1', 'sub1/f1b.out'))
+test.must_match(['sub2', 'f2a.out'], "sub2/f2a.in")
+test.must_match(['sub2', 'dir', 'f2b.out'], "sub2/dir/f2b.in")
+test.must_not_exist(test.workpath('sub3', 'f3.out'))
+test.must_not_exist(test.workpath('sub4', 'f4a.out'))
+test.must_not_exist(test.workpath('sub4', 'dir', 'f4b.out'))
+test.must_not_exist(test.workpath('build', 'f4a.out'))
+test.must_not_exist(test.workpath('build', 'dir', 'f4b.out'))
# Verify that we build a specified alias, regardless of where.
test.run(chdir = 'sub2', arguments = '-u my_alias')
-test.fail_test(os.path.exists(test.workpath('sub1', 'sub1/f1b.out')))
-test.fail_test(test.read(['sub3', 'f3.out']) != "sub3/f3.in")
-test.fail_test(os.path.exists(test.workpath('sub4', 'f4a.out')))
-test.fail_test(os.path.exists(test.workpath('sub4', 'dir', 'f4b.out')))
-test.fail_test(os.path.exists(test.workpath('build', 'f4a.out')))
-test.fail_test(os.path.exists(test.workpath('build', 'dir', 'f4b.out')))
+test.must_not_exist(test.workpath('sub1', 'sub1/f1b.out'))
+test.must_match(['sub3', 'f3.out'], "sub3/f3.in")
+test.must_not_exist(test.workpath('sub4', 'f4a.out'))
+test.must_not_exist(test.workpath('sub4', 'dir', 'f4b.out'))
+test.must_not_exist(test.workpath('build', 'f4a.out'))
+test.must_not_exist(test.workpath('build', 'dir', 'f4b.out'))
# Verify that we build things in a linked BuildDir.
f4a_in = os.path.join('build', 'f4a.in')
@@ -126,15 +126,15 @@ test.run(chdir = 'sub4',
stdout = "scons: Entering directory `%s'\n" % test.workpath() + \
test.wrap_stdout("""\
scons: building associated BuildDir targets: build
-cat("%s", "%s")
-cat("%s", "%s")
+cat(["%s"], ["%s"])
+cat(["%s"], ["%s"])
""" % (f4b_out, f4b_in, f4a_out, f4a_in)))
-test.fail_test(os.path.exists(test.workpath('sub1', 'sub1/f1b.out')))
-test.fail_test(os.path.exists(test.workpath('sub4', 'f4a.out')))
-test.fail_test(os.path.exists(test.workpath('sub4', 'dir', 'f4b.out')))
-test.fail_test(test.read(['build', 'f4a.out']) != "sub4/f4a.in")
-test.fail_test(test.read(['build', 'dir', 'f4b.out']) != "sub4/dir/f4b.in")
+test.must_not_exist(test.workpath('sub1', 'sub1/f1b.out'))
+test.must_not_exist(test.workpath('sub4', 'f4a.out'))
+test.must_not_exist(test.workpath('sub4', 'dir', 'f4b.out'))
+test.must_match(['build', 'f4a.out'], "sub4/f4a.in")
+test.must_match(['build', 'dir', 'f4b.out'], "sub4/dir/f4b.in")
# Make sure explicit targets beginning with ../ get built.
test.subdir('sub6', ['sub6', 'dir'])
@@ -167,9 +167,9 @@ test.write(['sub6', 'dir', 'f4.in'], "f4.in\n")
test.run(chdir = 'sub6/dir', arguments = '-u ../f2.out')
-test.fail_test(os.path.exists(test.workpath('sub6', 'f1.out')))
-test.fail_test(not os.path.exists(test.workpath('sub6', 'f2.out')))
-test.fail_test(os.path.exists(test.workpath('sub6', 'dir', 'f3.out')))
-test.fail_test(os.path.exists(test.workpath('sub6', 'dir', 'f4.out')))
+test.must_not_exist(test.workpath('sub6', 'f1.out'))
+test.must_exist(test.workpath('sub6', 'f2.out'))
+test.must_not_exist(test.workpath('sub6', 'dir', 'f3.out'))
+test.must_not_exist(test.workpath('sub6', 'dir', 'f4.out'))
test.pass_test()
diff --git a/test/overrides.py b/test/overrides.py
index fa76b56..1013413 100644
--- a/test/overrides.py
+++ b/test/overrides.py
@@ -54,11 +54,11 @@ test.write('foo.in', "foo.in\n")
test.write('bar.in', "bar.in\n")
test.run(arguments = "-Q", stdout = """\
-build("foo.out", "foo.in")
+build(["foo.out"], ["foo.in"])
env['CC'] = mycc
env['CCFLAGS'] = -DFOO -DBAR
env['LIBS'] = ['a', 'b']
-build("bar.out", "bar.in")
+build(["bar.out"], ["bar.in"])
env['CC'] = buildcc
env['CCFLAGS'] = -DFOO
env['LIBS'] = buildlibs
diff --git a/test/sconsign.py b/test/sconsign.py
index 50b7bb1..e9a6609 100644
--- a/test/sconsign.py
+++ b/test/sconsign.py
@@ -87,7 +87,7 @@ scons: warning: Ignoring corrupt .sconsign file: sub1.\.sconsign
.*
'''
-stdout = test.wrap_stdout('build1\("sub1.foo\.out", "foo\.in"\)\n')
+stdout = test.wrap_stdout('build1\(\["sub1.foo\.out"\], \["foo\.in"\]\)\n')
test.write(sub1__sconsign, 'not:a:sconsign:file')
test.run(arguments = '.', stderr=stderr, stdout=stdout)
diff --git a/test/strfunction.py b/test/strfunction.py
index 4ed75ee..c8b2665 100644
--- a/test/strfunction.py
+++ b/test/strfunction.py
@@ -121,14 +121,14 @@ test.run(arguments = '.', stdout=test.wrap_stdout("""\
Building cmdstr.out from cmdstr.in
%s cat.py dict1.cmd dict1.out
Building dict2.out from dict2.cmdstr
-func("dict3.out", "dict3.func")
+func(["dict3.out"], ["dict3.func"])
Building dict4.out from dict4.funcstr
%s cat.py dict5.lazy dict5.out
Building dict6.out from dict6.lazystr
%s cat.py dict7.list .temp
%s cat.py .temp dict7.out
Building dict8.out from dict8.liststr
-func("func.out", "func.in")
+func(["func.out"], ["func.in"])
Building funcstr.out from funcstr.in
%s cat.py lazy.in lazy.out
Building lazystr.out from lazystr.in