summaryrefslogtreecommitdiff
path: root/test/runtest/testlistfile.py
diff options
context:
space:
mode:
authorSteven Knight <knight@baldmt.com>2009-12-16 07:07:13 +0000
committerSteven Knight <knight@baldmt.com>2009-12-16 07:07:13 +0000
commit0bf3d84a5097f2fa365c979a539ddcd707d9bc8e (patch)
tree76a5d74c1ecb5a1a17d53d89712d0264b1bfa5de /test/runtest/testlistfile.py
parent892b6628410116a534d1a6d323726e8cd6b35b1c (diff)
downloadscons-0bf3d84a5097f2fa365c979a539ddcd707d9bc8e.tar.gz
Fix the tests of runtest.py now that QMTest is no longer being used
by default. Fix use of subprocess in Python 2.4+ and exit statuses of popen'ed scripts in earlier versions of Python. Support the ability to execute a directory's tests by naming the directory as a command- line argument.
Diffstat (limited to 'test/runtest/testlistfile.py')
-rw-r--r--test/runtest/testlistfile.py28
1 files changed, 9 insertions, 19 deletions
diff --git a/test/runtest/testlistfile.py b/test/runtest/testlistfile.py
index a9d2565b..dc78c296 100644
--- a/test/runtest/testlistfile.py
+++ b/test/runtest/testlistfile.py
@@ -32,6 +32,7 @@ import os.path
import TestRuntest
+python = TestRuntest.python
test_fail_py = os.path.join('test', 'fail.py')
test_no_result_py = os.path.join('test', 'no_result.py')
test_pass_py = os.path.join('test', 'pass.py')
@@ -51,27 +52,16 @@ test.write('t.txt', """\
%(test_pass_py)s
""" % locals())
-# NOTE: The "test/fail.py : FAIL" and "test/pass.py : PASS" lines both
-# have spaces at the end.
-
-expect = """qmtest run --output results.qmr --format none --result-stream="scons_tdb.AegisChangeStream" %(test_pass_py)s
---- TEST RESULTS -------------------------------------------------------------
-
- %(test_pass_py)s : PASS
-
---- TESTS THAT DID NOT PASS --------------------------------------------------
-
- None.
-
-
---- STATISTICS ---------------------------------------------------------------
-
- 1 tests total
-
- 1 (100%%) tests PASS
+expect_stdout = """\
+%(python)s -tt test/pass.py
+PASSING TEST STDOUT
""" % locals()
-test.run(arguments = '-f t.txt', stdout = expect)
+expect_stderr = """\
+PASSING TEST STDERR
+"""
+
+test.run(arguments='-f t.txt', stdout=expect_stdout, stderr=expect_stderr)
test.pass_test()