summaryrefslogtreecommitdiffstats
path: root/runtest.py
diff options
context:
space:
mode:
authorSteven Knight <knight@baldmt.com>2002-01-11 03:17:45 (GMT)
committerSteven Knight <knight@baldmt.com>2002-01-11 03:17:45 (GMT)
commit73d5fcf51f9002bb3a0da8a32576b2e8ce0cb54a (patch)
treea8312b6ab6dc5cdd45c711c757dd59150223efdc /runtest.py
parent74c6fdcbeadb1b42f134f7f9b864763d29bb8338 (diff)
downloadSCons-73d5fcf51f9002bb3a0da8a32576b2e8ce0cb54a.zip
SCons-73d5fcf51f9002bb3a0da8a32576b2e8ce0cb54a.tar.gz
SCons-73d5fcf51f9002bb3a0da8a32576b2e8ce0cb54a.tar.bz2
Check for the existence of lex and yacc in those tests and bail with NO RESULT if they're not present..
Diffstat (limited to 'runtest.py')
-rw-r--r--runtest.py38
1 files changed, 26 insertions, 12 deletions
diff --git a/runtest.py b/runtest.py
index 6ac8a6e..4535064 100644
--- a/runtest.py
+++ b/runtest.py
@@ -139,6 +139,7 @@ else:
os.chdir(scons_dir)
fail = []
+no_result = []
for path in tests:
if os.path.isabs(path):
@@ -148,15 +149,28 @@ for path in tests:
cmd = string.join(["python", debug, abs], " ")
if printcmd:
print cmd
- 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))
+ s = os.system(cmd)
+ if s == 1:
+ fail.append(path)
+ elif s == 2:
+ no_result.append(path)
+ elif s != 0:
+ print "Unexpected exit status %d" % s
+
+if len(tests) != 1:
+ if fail:
+ 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")
+ if no_result:
+ if len(no_result) == 1:
+ str = "test"
+ else:
+ str = "%d tests" % len(no_result)
+ print "\nNO RESULT from the following %s:" % str
+ print "\t", string.join(no_result, "\n\t")
+
+sys.exit(len(fail) + len(no_result))