From 0a34420780fe0f7fb3f7a8d9f13eccb8ac1f2738 Mon Sep 17 00:00:00 2001 From: Steven Knight Date: Thu, 11 Aug 2005 02:16:07 +0000 Subject: Win32 portability fixes. --- src/engine/SCons/dblite.py | 4 +++- test/import.py | 32 ++++++++++++++++++++------------ 2 files changed, 23 insertions(+), 13 deletions(-) diff --git a/src/engine/SCons/dblite.py b/src/engine/SCons/dblite.py index 18a1202..505a793 100644 --- a/src/engine/SCons/dblite.py +++ b/src/engine/SCons/dblite.py @@ -78,7 +78,9 @@ class dblite: f = _open(self._tmp_name, "wb", self._mode) cPickle.dump(self._dict, f, 1) f.close() - # Win32 doesn't allow renaming if the file exists, so unlink it first. + # Win32 doesn't allow renaming if the file exists, so unlink it first, + # chmod'ing it to make sure we can do so. + os.chmod(self._file_name, 0777) os.unlink(self._file_name) os.rename(self._tmp_name, self._file_name) self._needs_sync = 00000 diff --git a/test/import.py b/test/import.py index 9c25ada..0c790ba 100644 --- a/test/import.py +++ b/test/import.py @@ -135,22 +135,30 @@ tools = [ 'zip', ] -intel_warnings = [ - # License warning. - """ -scons: warning: Intel license dir was not found. Tried using the INTEL_LICENSE_FILE environment variable (), the registry () and the default path (C:\Program Files\Common Files\Intel\Licenses). Using the default path as a last resort. -File "SConstruct", line 1, in ? -""", - # No top dir warning, 32 bit version. - """ +# Intel no top dir warning, 32 bit version. +intel_no_top_dir_32_warning = """ scons: warning: Can't find Intel compiler top dir for version='None', abi='ia32' File "SConstruct", line 1, in ? -""", - # No top dir warning, 64 bit version. - """ +""" + +# Intel no top dir warning, 64 bit version. +intel_no_top_dir_64_warning = """ scons: warning: Can't find Intel compiler top dir for version='None', abi='x86_64' File "SConstruct", line 1, in ? -""", +""" + +# Intel no license directory warning +intel_license_warning = """ +scons: warning: Intel license dir was not found. Tried using the INTEL_LICENSE_FILE environment variable (), the registry () and the default path (C:\Program Files\Common Files\Intel\Licenses). Using the default path as a last resort. +File "SConstruct", line 1, in ? +""" + +intel_warnings = [ + intel_license_warning, + intel_no_top_dir_32_warning, + intel_no_top_dir_32_warning + intel_license_warning, + intel_no_top_dir_64_warning, + intel_no_top_dir_64_warning + intel_license_warning, ] moc = test.where_is('moc') -- cgit v0.12