Fix execution of test/MSV[CS]/*.py tests on non-Windows systems by
authorstevenknight <stevenknight@fdb21ef1-2011-0410-befe-b5e4ea1792b1>
Tue, 21 Jul 2009 14:24:00 +0000 (14:24 +0000)
committerstevenknight <stevenknight@fdb21ef1-2011-0410-befe-b5e4ea1792b1>
Tue, 21 Jul 2009 14:24:00 +0000 (14:24 +0000)
not assuming that %PROCESSOR_ARCHITECTURE% will be defined, and not
assuming that we'll find any installed Windows SDKs.

git-svn-id: http://scons.tigris.org/svn/scons/trunk@4297 fdb21ef1-2011-0410-befe-b5e4ea1792b1

src/engine/SCons/Platform/win32.py
src/engine/SCons/Tool/MSCommon/sdk.py

index 78822c615000f0ee7f5ef5cd7e7f51017637a0e5..bcdc50ae39d8cb37525de3eebe233804abca80ae 100644 (file)
@@ -281,8 +281,8 @@ def get_architecture(arch=None):
     if arch is None:
         arch = os.environ.get('PROCESSOR_ARCHITEW6432')
         if not arch:
-            arch = os.environ['PROCESSOR_ARCHITECTURE']
-    return SupportedArchitectureMap.get(arch, '')
+            arch = os.environ.get('PROCESSOR_ARCHITECTURE')
+    return SupportedArchitectureMap.get(arch, ArchDefinition('', ['']))
 
 def generate(env):
     # Attempt to find cmd.exe (for WinNT/2k/XP) or
index d9f609cd74d5c7570fc20339d365abfec591f415..eb7ed382a2917f9f4aef55a118baf34c42abe1c9 100644 (file)
@@ -259,6 +259,8 @@ def get_sdk_by_version(mssdk):
 def get_default_sdk():
     """Set up the default Platform/Windows SDK."""
     get_installed_sdks()
+    if not InstalledSDKList:
+        return None
     return InstalledSDKList[0]
 
 def mssdk_setup_env(env):