summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--runtest.py38
-rw-r--r--src/engine/SCons/Defaults.py5
-rw-r--r--test/LEX.py10
-rw-r--r--test/LEXFLAGS.py10
-rw-r--r--test/YACC.py10
-rw-r--r--test/YACCFLAGS.py10
6 files changed, 69 insertions, 14 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))
diff --git a/src/engine/SCons/Defaults.py b/src/engine/SCons/Defaults.py
index 056b1f3..450575c 100644
--- a/src/engine/SCons/Defaults.py
+++ b/src/engine/SCons/Defaults.py
@@ -129,7 +129,7 @@ def get_msvc_path (path, version, platform='x86'):
access the registry or appropriate registry keys not found.
"""
- if not _can_read_reg:
+ if not SCons.Util.can_read_reg:
raise InternalError, "No Windows registry module was found"
if path=='lib':
@@ -272,8 +272,9 @@ elif os.name == 'nt':
# so fall back to a reasonable default:
MVSdir = r'C:\Program Files\Microsoft Visual Studio'
MVSVCdir = r'%s\VC98' % MVSdir
+ MVSCommondir = r'%s\Common' % MVSdir
ConstructionEnvironment = make_win32_env_from_paths(
r'%s\atl\include;%s\mfc\include;%s\include' % (MVSVCdir, MVSVCdir, MVSVCdir),
r'%s\mvc\lib;%s\lib' % (MVSVCdir, MVSVCdir),
- os.environ["PATH"])
+ (r'%s\MSDev98\Bin' % MVSCommondir) + os.pathsep + os.environ["PATH"])
diff --git a/test/LEX.py b/test/LEX.py
index 9bf37d7..38bee99 100644
--- a/test/LEX.py
+++ b/test/LEX.py
@@ -25,6 +25,7 @@
__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
import os
+import os.path
import string
import sys
import TestSCons
@@ -36,8 +37,17 @@ if sys.platform == 'win32':
else:
_exe = ''
+lex = None
+for dir in string.split(os.environ['PATH'], os.pathsep):
+ l = os.path.join(dir, 'lex' + _exe)
+ if os.path.exists(l):
+ lex = l
+ break
+
test = TestSCons.TestSCons()
+test.no_result(not lex)
+
test.write("wrapper.py",
"""import os
import string
diff --git a/test/LEXFLAGS.py b/test/LEXFLAGS.py
index 06facb8..2625c29 100644
--- a/test/LEXFLAGS.py
+++ b/test/LEXFLAGS.py
@@ -25,6 +25,7 @@
__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
import os
+import os.path
import string
import sys
import TestSCons
@@ -36,8 +37,17 @@ if sys.platform == 'win32':
else:
_exe = ''
+lex = None
+for dir in string.split(os.environ['PATH'], os.pathsep):
+ l = os.path.join(dir, 'lex' + _exe)
+ if os.path.exists(l):
+ lex = l
+ break
+
test = TestSCons.TestSCons()
+test.no_result(not lex)
+
test.write('SConstruct', """
foo = Environment()
bar = Environment(LEXFLAGS = '-b')
diff --git a/test/YACC.py b/test/YACC.py
index f497c69..a405985 100644
--- a/test/YACC.py
+++ b/test/YACC.py
@@ -25,6 +25,7 @@
__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
import os
+import os.path
import string
import sys
import TestSCons
@@ -36,8 +37,17 @@ if sys.platform == 'win32':
else:
_exe = ''
+yacc = None
+for dir in string.split(os.environ['PATH'], os.pathsep):
+ y = os.path.join(dir, 'yacc' + _exe)
+ if os.path.exists(y):
+ yacc = y
+ break
+
test = TestSCons.TestSCons()
+test.no_result(not yacc)
+
test.write("wrapper.py",
"""import os
import string
diff --git a/test/YACCFLAGS.py b/test/YACCFLAGS.py
index dc127ad..82b38cb 100644
--- a/test/YACCFLAGS.py
+++ b/test/YACCFLAGS.py
@@ -25,6 +25,7 @@
__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
import os
+import os.path
import string
import sys
import TestSCons
@@ -36,8 +37,17 @@ if sys.platform == 'win32':
else:
_exe = ''
+yacc = None
+for dir in string.split(os.environ['PATH'], os.pathsep):
+ y = os.path.join(dir, 'yacc' + _exe)
+ if os.path.exists(y):
+ yacc = y
+ break
+
test = TestSCons.TestSCons()
+test.no_result(not yacc)
+
test.write('SConstruct', """
foo = Environment()
bar = Environment(YACCFLAGS = '-v')