From c1f297fb263f60926d66b2f1319da953fbf1a58f Mon Sep 17 00:00:00 2001 From: stevenknight Date: Tue, 21 Jul 2009 14:24:00 +0000 Subject: [PATCH] Fix execution of test/MSV[CS]/*.py tests on non-Windows systems by 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 | 4 ++-- src/engine/SCons/Tool/MSCommon/sdk.py | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/engine/SCons/Platform/win32.py b/src/engine/SCons/Platform/win32.py index 78822c61..bcdc50ae 100644 --- a/src/engine/SCons/Platform/win32.py +++ b/src/engine/SCons/Platform/win32.py @@ -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 diff --git a/src/engine/SCons/Tool/MSCommon/sdk.py b/src/engine/SCons/Tool/MSCommon/sdk.py index d9f609cd..eb7ed382 100644 --- a/src/engine/SCons/Tool/MSCommon/sdk.py +++ b/src/engine/SCons/Tool/MSCommon/sdk.py @@ -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): -- 2.26.2