summaryrefslogtreecommitdiff
path: root/test/option-i.py
diff options
context:
space:
mode:
authorSteven Knight <knight@baldmt.com>2001-10-10 21:50:55 +0000
committerSteven Knight <knight@baldmt.com>2001-10-10 21:50:55 +0000
commit385aabf686d687432fb81fa2e68b77e3f11f06f8 (patch)
tree319adfb4dc23d8c7b1e55fb2e691898d8b544481 /test/option-i.py
parentf72203b4610a100fce3065f5c5c4c41e92fc5883 (diff)
downloadscons-385aabf686d687432fb81fa2e68b77e3f11f06f8.tar.gz
Add -i (ignore errors) support
Diffstat (limited to 'test/option-i.py')
-rw-r--r--test/option-i.py25
1 files changed, 15 insertions, 10 deletions
diff --git a/test/option-i.py b/test/option-i.py
index f00a4cd4..9463141d 100644
--- a/test/option-i.py
+++ b/test/option-i.py
@@ -29,8 +29,6 @@ import TestSCons
test = TestSCons.TestSCons()
-test.pass_test() #XXX Short-circuit until this is supported.
-
test.write('succeed.py', r"""
import sys
file = open(sys.argv[1], 'w')
@@ -54,29 +52,36 @@ env.Fail(target = 'bbb.1', source = 'bbb.in')
env.Succeed(target = 'bbb.out', source = 'bbb.1')
""")
-test.run(arguments = '.')
+test.run(arguments = 'aaa.1 aaa.out bbb.1 bbb.out',
+ stderr = 'scons: *** [aaa.1] Error 1\n')
test.fail_test(os.path.exists(test.workpath('aaa.1')))
test.fail_test(os.path.exists(test.workpath('aaa.out')))
test.fail_test(os.path.exists(test.workpath('bbb.1')))
test.fail_test(os.path.exists(test.workpath('bbb.out')))
-test.run(arguments = '-i .')
-
+test.run(arguments = '-i aaa.1 aaa.out bbb.1 bbb.out',
+ stderr =
+ 'scons: *** [aaa.1] Error 1\n'
+ 'scons: *** [bbb.1] Error 1\n')
+
test.fail_test(os.path.exists(test.workpath('aaa.1')))
-test.fail_test(test.read('aaa.out') != "aaa.out\n")
+test.fail_test(test.read('aaa.out') != "succeed.py: aaa.out\n")
test.fail_test(os.path.exists(test.workpath('bbb.1')))
-test.fail_test(test.read('bbb.out') != "bbb.out\n")
+test.fail_test(test.read('bbb.out') != "succeed.py: bbb.out\n")
test.unlink("aaa.out")
test.unlink("bbb.out")
-test.run(arguments = '--ignore-errors .')
+test.run(arguments = '--ignore-errors aaa.1 aaa.out bbb.1 bbb.out',
+ stderr =
+ 'scons: *** [aaa.1] Error 1\n'
+ 'scons: *** [bbb.1] Error 1\n')
test.fail_test(os.path.exists(test.workpath('aaa.1')))
-test.fail_test(test.read('aaa.out') != "aaa.out\n")
+test.fail_test(test.read('aaa.out') != "succeed.py: aaa.out\n")
test.fail_test(os.path.exists(test.workpath('bbb.1')))
-test.fail_test(test.read('bbb.out') != "bbb.out\n")
+test.fail_test(test.read('bbb.out') != "succeed.py: bbb.out\n")
test.pass_test()