summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorSteven Knight <knight@baldmt.com>2005-03-17 03:06:56 (GMT)
committerSteven Knight <knight@baldmt.com>2005-03-17 03:06:56 (GMT)
commit7e4b4c01d69a2d2a776abb49db68507706ded50e (patch)
tree89d7e783bfa6814d01de40df8a8b9b18539d9ef4 /test
parenta911d49dc68205cebbd6b7e728f2cd1ad49b9aca (diff)
downloadSCons-7e4b4c01d69a2d2a776abb49db68507706ded50e.zip
SCons-7e4b4c01d69a2d2a776abb49db68507706ded50e.tar.gz
SCons-7e4b4c01d69a2d2a776abb49db68507706ded50e.tar.bz2
Windows portability in tests. Replace overlooked import
Diffstat (limited to 'test')
-rw-r--r--test/QT/QT.py16
-rw-r--r--test/import.py20
2 files changed, 29 insertions, 7 deletions
diff --git a/test/QT/QT.py b/test/QT/QT.py
index 680784f..a6580a6 100644
--- a/test/QT/QT.py
+++ b/test/QT/QT.py
@@ -923,8 +923,20 @@ test.run(chdir='work12', arguments='-n noqtdir=1')
# Consequently, we need to just wipe out its value as follows>
os.environ['QTDIR'] = ''
test.run(chdir='work12', stderr=None, arguments='-n noqtdir=1')
-test.fail_test(not test.match_re(test.stderr(), r"""
+
+moc = test.where_is('moc')
+if moc:
+ import os.path
+ expect = """
+scons: warning: Could not detect qt, using moc executable as a hint \(QTDIR=%s\)
+File "SConstruct", line \d+, in \?
+""" % os.path.dirname(os.path.dirname(moc))
+else:
+ expect = """
scons: warning: Could not detect qt, using empty QTDIR
-""" + TestSCons.file_expr))
+File "SConstruct", line \d+, in \?
+"""
+
+test.fail_test(not test.match_re(test.stderr(), expect))
test.pass_test()
diff --git a/test/import.py b/test/import.py
index 1aae7ce..5bf2042 100644
--- a/test/import.py
+++ b/test/import.py
@@ -140,13 +140,23 @@ scons: warning: Intel license dir was not found. Tried using the INTEL_LICENSE_
File "SConstruct", line 1, in ?
"""
+moc = test.where_is('moc')
+if moc:
+ import os.path
+ qt_err = """
+scons: warning: Could not detect qt, using moc executable as a hint (QTDIR=%s)
+File "SConstruct", line 1, in ?
+""" % os.path.dirname(os.path.dirname(moc))
+else:
+ qt_err = """
+scons: warning: Could not detect qt, using empty QTDIR
+File "SConstruct", line 1, in ?
+"""
+
error_output = {
'icl' : intel_license_warning,
'intelc' : intel_license_warning,
- 'qt' : """
-scons: warning: Could not detect qt, using empty QTDIR
-File "SConstruct", line 1, in ?
-""",
+ 'qt' : qt_err,
}
# An SConstruct for importing Tool names that have illegal characters
@@ -176,7 +186,7 @@ for tool in tools:
if stderr != '' and stderr != error_output.get(tool, ''):
print "Failed importing '%s', stderr:" % tool
print stderr
- failures.append[tool]
+ failures.append(tool)
test.fail_test(len(failures))