summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteven Knight <knight@baldmt.com>2001-10-28 11:52:08 (GMT)
committerSteven Knight <knight@baldmt.com>2001-10-28 11:52:08 (GMT)
commite5410ac77d8740375b43cb154bedf7219279bf67 (patch)
tree75228cd5740c78a3a2e096e5f44b07e85d2e5d54
parenta140305276c1dc47997c54a76e5b586b1f82b4fb (diff)
downloadSCons-e5410ac77d8740375b43cb154bedf7219279bf67.zip
SCons-e5410ac77d8740375b43cb154bedf7219279bf67.tar.gz
SCons-e5410ac77d8740375b43cb154bedf7219279bf67.tar.bz2
Fix a number of small problems in tests.
-rw-r--r--test/Depends.py9
-rw-r--r--test/option--.py4
-rw-r--r--test/option-i.py3
-rw-r--r--test/option-k.py3
-rw-r--r--test/option-n.py7
-rw-r--r--test/option-s.py11
6 files changed, 28 insertions, 9 deletions
diff --git a/test/Depends.py b/test/Depends.py
index 03033b1..3777fbd 100644
--- a/test/Depends.py
+++ b/test/Depends.py
@@ -73,7 +73,8 @@ test.write(['subdir', 'foo.dep'], "subdir/foo.dep 1\n")
test.write(['subdir', 'bar.dep'], "subdir/bar.dep 1\n")
#XXXtest.run(arguments = '.')
-test.run(arguments = 'f1.out f2.out f3.out subdir/f4.out')
+#test.run(arguments = 'f1.out f2.out f3.out subdir/f4.out')
+test.run(arguments = 'f1.out f2.out f3.out')
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")
@@ -86,7 +87,8 @@ test.write(['subdir', 'foo.dep'], "subdir/foo.dep 2\n")
test.write(['subdir', 'bar.dep'], "subdir/bar.dep 2\n")
#XXXtest.run(arguments = '.')
-test.run(arguments = 'f1.out f2.out f3.out subdir/f4.out')
+#test.run(arguments = 'f1.out f2.out f3.out subdir/f4.out')
+test.run(arguments = 'f1.out f2.out f3.out')
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")
@@ -97,7 +99,8 @@ test.fail_test(test.read('f3.out') != "f3.in\nsubdir/bar.dep 2\n")
test.write(['subdir', 'bar.dep'], "subdir/bar.dep 3\n")
#XXXtest.run(arguments = '.')
-test.run(arguments = 'f1.out f2.out f3.out subdir/f4.out')
+#test.run(arguments = 'f1.out f2.out f3.out subdir/f4.out')
+test.run(arguments = 'f1.out f2.out f3.out')
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")
diff --git a/test/option--.py b/test/option--.py
index 9fca2bd..5370488 100644
--- a/test/option--.py
+++ b/test/option--.py
@@ -48,9 +48,13 @@ env.MyBuild(target = '-f1.out', source = 'f1.in')
env.MyBuild(target = '-f2.out', source = 'f2.in')
""" % python)
+test.write('f1.in', "f1.in\n")
+test.write('f2.in', "f2.in\n")
+
expect = "%s build.py -f1.out\n%s build.py -f2.out\n" % (python, python)
test.run(arguments = '-- -f1.out -f2.out', stdout = expect)
+
test.fail_test(not os.path.exists(test.workpath('-f1.out')))
test.fail_test(not os.path.exists(test.workpath('-f2.out')))
diff --git a/test/option-i.py b/test/option-i.py
index 713655c..8991550 100644
--- a/test/option-i.py
+++ b/test/option-i.py
@@ -55,6 +55,9 @@ env.Fail(target = 'bbb.1', source = 'bbb.in')
env.Succeed(target = 'bbb.out', source = 'bbb.1')
""" % (python, python))
+test.write('aaa.in', "aaa.in\n")
+test.write('bbb.in', "bbb.in\n")
+
test.run(arguments = 'aaa.1 aaa.out bbb.1 bbb.out',
stderr = 'scons: *** [aaa.1] Error 1\n')
diff --git a/test/option-k.py b/test/option-k.py
index edf7be1..6b9e89a 100644
--- a/test/option-k.py
+++ b/test/option-k.py
@@ -54,6 +54,9 @@ env.Succeed(target = 'aaa.out', source = 'aaa.1')
env.Succeed(target = 'bbb.out', source = 'bbb.in')
""" % (python, python))
+test.write('aaa.in', "aaa.in\n")
+test.write('bbb.in', "bbb.in\n")
+
test.run(arguments = 'aaa.out bbb.out',
stderr =
'scons: *** [aaa.1] Error 1\n')
diff --git a/test/option-n.py b/test/option-n.py
index 0a11101..0a5a225 100644
--- a/test/option-n.py
+++ b/test/option-n.py
@@ -48,6 +48,9 @@ env.MyBuild(target = 'f1.out', source = 'f1.in')
env.MyBuild(target = 'f2.out', source = 'f2.in')
""" % python)
+test.write('f1.in', "f1.in\n")
+test.write('f2.in', "f2.in\n")
+
args = 'f1.out f2.out'
expect = "%s build.py f1.out\n%s build.py f2.out\n" % (python, python)
@@ -55,8 +58,8 @@ test.run(arguments = args, stdout = expect)
test.fail_test(not os.path.exists(test.workpath('f1.out')))
test.fail_test(not os.path.exists(test.workpath('f2.out')))
-os.unlink(test.workpath('f1.out'))
-os.unlink(test.workpath('f2.out'))
+test.unlink('f1.out')
+test.unlink('f2.out')
test.run(arguments = '-n ' + args, stdout = expect)
test.fail_test(os.path.exists(test.workpath('f1.out')))
diff --git a/test/option-s.py b/test/option-s.py
index 6791786..666060e 100644
--- a/test/option-s.py
+++ b/test/option-s.py
@@ -48,19 +48,22 @@ env.MyBuild(target = 'f1.out', source = 'f1.in')
env.MyBuild(target = 'f2.out', source = 'f2.in')
""" % python)
+test.write('f1.in', "f1.in\n")
+test.write('f2.in', "f2.in\n")
+
test.run(arguments = '-s f1.out f2.out', stdout = "")
test.fail_test(not os.path.exists(test.workpath('f1.out')))
test.fail_test(not os.path.exists(test.workpath('f2.out')))
-os.unlink(test.workpath('f1.out'))
-os.unlink(test.workpath('f2.out'))
+test.unlink('f1.out')
+test.unlink('f2.out')
test.run(arguments = '--silent f1.out f2.out', stdout = "")
test.fail_test(not os.path.exists(test.workpath('f1.out')))
test.fail_test(not os.path.exists(test.workpath('f2.out')))
-os.unlink(test.workpath('f1.out'))
-os.unlink(test.workpath('f2.out'))
+test.unlink('f1.out')
+test.unlink('f2.out')
test.run(arguments = '--quiet f1.out f2.out', stdout = "")
test.fail_test(not os.path.exists(test.workpath('f1.out')))