diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/QT/QT.py | 16 | ||||
-rw-r--r-- | test/import.py | 20 |
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)) |