From cba8f0e268000e7628bd80c8c6782cf390359264 Mon Sep 17 00:00:00 2001 From: stevenknight Date: Thu, 11 Aug 2005 02:16:07 +0000 Subject: [PATCH] Win32 portability fixes. git-svn-id: http://scons.tigris.org/svn/scons/trunk@1318 fdb21ef1-2011-0410-befe-b5e4ea1792b1 --- 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 18a12022..505a7930 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 9c25adae..0c790ba9 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') -- 2.26.2