summaryrefslogtreecommitdiffstats
path: root/test/runtest/fallback.py
diff options
context:
space:
mode:
Diffstat (limited to 'test/runtest/fallback.py')
-rw-r--r--test/runtest/fallback.py14
1 files changed, 8 insertions, 6 deletions
diff --git a/test/runtest/fallback.py b/test/runtest/fallback.py
index 8b6ae42..76aebe6 100644
--- a/test/runtest/fallback.py
+++ b/test/runtest/fallback.py
@@ -26,7 +26,7 @@ __revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
"""
Test that runtest.py falls back (with a warning) using --noqmtest
-if it can't find qmtest.py on the $PATH.
+if it can't find qmtest on the $PATH.
"""
import os
@@ -41,14 +41,16 @@ _python_ = TestRuntest._python_
test = TestRuntest.TestRuntest(noqmtest=1)
-qmtest_py = test.where_is('qmtest.py')
-
-if qmtest_py:
- dir = os.path.split(qmtest_py)[0]
+# qmtest may be in more than one location in your path
+while test.where_is('qmtest'):
+ qmtest=test.where_is('qmtest')
+ dir = os.path.split(qmtest)[0]
path = string.split(os.environ['PATH'], os.pathsep)
path.remove(dir)
os.environ['PATH'] = string.join(path, os.pathsep)
+print "PATH: %s"%os.environ['PATH']
+
test.subdir('test')
test_pass_py = os.path.join('test', 'pass.py')
@@ -92,7 +94,7 @@ NO RESULT from the following test:
""" % locals()
expect_stderr = """\
-Warning: qmtest.py not found on $PATH, assuming --noqmtest option.
+Warning: qmtest not found on $PATH, assuming --noqmtest option.
FAILING TEST STDERR
NO RESULT TEST STDERR
PASSING TEST STDERR