summaryrefslogtreecommitdiffstats
path: root/runtest.py
diff options
context:
space:
mode:
authorSteven Knight <knight@baldmt.com>2001-11-24 23:15:01 (GMT)
committerSteven Knight <knight@baldmt.com>2001-11-24 23:15:01 (GMT)
commit378373defaf150feb90cd54d13626516c6dbe1b4 (patch)
treefc9783004f1cae3c3558846d6f9a1c589e104a3e /runtest.py
parent139a0052dc0bff059dc9b8cf1739396304e7c129 (diff)
downloadSCons-378373defaf150feb90cd54d13626516c6dbe1b4.zip
SCons-378373defaf150feb90cd54d13626516c6dbe1b4.tar.gz
SCons-378373defaf150feb90cd54d13626516c6dbe1b4.tar.bz2
More NT portability fixes.
Diffstat (limited to 'runtest.py')
-rw-r--r--runtest.py19
1 files changed, 14 insertions, 5 deletions
diff --git a/runtest.py b/runtest.py
index 108db73..dd82b0e 100644
--- a/runtest.py
+++ b/runtest.py
@@ -56,6 +56,11 @@ printcmd = 1
version = None
testver = 1
+if sys.platform == 'win32':
+ lib_dir = os.path.join(sys.exec_prefix, "lib")
+else:
+ lib_dir = os.path.join(sys.exec_prefix, "lib", "python" + sys.version[0:3])
+
opts, tests = getopt.getopt(sys.argv[1:], "12ab:dqv:",
['all','build=','debug','quiet','version='])
@@ -64,11 +69,7 @@ for o, a in opts:
elif o == '-2': testver = 2
elif o == '-a' or o == '--all': all = 1
elif o == '-b' or o == '--build': build = a
- elif o == '-d' or o == '--debug': debug = os.path.join(
- sys.exec_prefix,
- "lib",
- "python" + sys.version[0:3],
- "pdb.py")
+ elif o == '-d' or o == '--debug': debug = os.path.join(lib_dir, "pdb.py")
elif o == '-q' or o == '--quiet': printcmd = 0
elif o == '-v' or o == '--version': version = a
@@ -143,4 +144,12 @@ for path in tests:
if os.system(cmd):
fail.append(path)
+if fail and len(tests) != 1:
+ if len(fail) == 1:
+ str = "test"
+ else:
+ str = "%d tests" % len(fail)
+ print "\nFailed the following %s:" % str
+ print "\t", string.join(fail, "\n\t")
+
sys.exit(len(fail))