diff options
author | Steven Knight <knight@baldmt.com> | 2006-02-15 05:14:30 (GMT) |
---|---|---|
committer | Steven Knight <knight@baldmt.com> | 2006-02-15 05:14:30 (GMT) |
commit | 2708dc3927775a374fc94a6996ebe09e70705e60 (patch) | |
tree | e58962d58516f26ff0babcdb67a58435a4019f07 /test/QT | |
parent | e7190df6b6aa89dac0370dc01ae45ff39254c221 (diff) | |
download | SCons-2708dc3927775a374fc94a6996ebe09e70705e60.zip SCons-2708dc3927775a374fc94a6996ebe09e70705e60.tar.gz SCons-2708dc3927775a374fc94a6996ebe09e70705e60.tar.bz2 |
More test portability fixes. (Baptiste Lepilleur and SK)
Diffstat (limited to 'test/QT')
-rw-r--r-- | test/QT/generated-ui.py | 3 | ||||
-rw-r--r-- | test/QT/installed.py | 3 | ||||
-rw-r--r-- | test/QT/up-to-date.py | 8 | ||||
-rw-r--r-- | test/QT/warnings.py | 3 |
4 files changed, 12 insertions, 5 deletions
diff --git a/test/QT/generated-ui.py b/test/QT/generated-ui.py index 7125dd9..991047d 100644 --- a/test/QT/generated-ui.py +++ b/test/QT/generated-ui.py @@ -47,7 +47,8 @@ import os aa=os.getcwd() env=Environment(tools=['default','expheaders','qt'],toolpath=[aa]) -env['ENV']['HOME'] = os.environ['HOME'] +if os.environ.has_key('HOME'): + env['ENV']['HOME'] = os.environ['HOME'] env["EXP_HEADER_ABS"]=os.path.join(os.getcwd(),'include') if not os.access(env["EXP_HEADER_ABS"],os.F_OK): os.mkdir (env["EXP_HEADER_ABS"]) diff --git a/test/QT/installed.py b/test/QT/installed.py index 6b06d37..8cb9ab1 100644 --- a/test/QT/installed.py +++ b/test/QT/installed.py @@ -62,7 +62,8 @@ except KeyError: env = Environment(tools=['default','qt'], ENV={'PATH':ENV_PATH, 'PATHEXT':os.environ.get('PATHEXT'), - 'HOME':os.getcwd()}, + 'HOME':os.getcwd(), + 'SYSTEMROOT':ENV.get('SYSTEMROOT')}, # moc / uic want to write stuff in ~/.qt CXXFILESUFFIX=".cpp") diff --git a/test/QT/up-to-date.py b/test/QT/up-to-date.py index 46b9db8..b6ebfdf 100644 --- a/test/QT/up-to-date.py +++ b/test/QT/up-to-date.py @@ -34,6 +34,7 @@ ca. September 2005.) """ import os +import string import TestSCons @@ -129,10 +130,13 @@ test.write(['layer', 'aclock', 'qt_bug', 'my.cc'], """\ #include <main.h> """) -test.run(arguments = 'layer/aclock/qt_bug/my'+_obj, stderr=None) +my_obj = 'layer/aclock/qt_bug/my'+_obj +test.run(arguments = my_obj, stderr=None) + +expect = string.replace( my_obj, '/', os.sep ) test.up_to_date(options = '--debug=explain', - arguments = 'layer/aclock/qt_bug/my'+_obj, + arguments = (expect), stderr=None) test.pass_test() diff --git a/test/QT/warnings.py b/test/QT/warnings.py index 3741079..7b41360 100644 --- a/test/QT/warnings.py +++ b/test/QT/warnings.py @@ -29,6 +29,7 @@ Test the Qt tool warnings. """ import os +import string import TestSCons @@ -79,7 +80,7 @@ if moc: 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)) +""" % string.replace( os.path.dirname(os.path.dirname(moc)), '\\', '\\\\' ) else: expect = """ scons: warning: Could not detect qt, using empty QTDIR |