Make the test/MSVC/{msvc,hierarchical}.py tests work even if
authorstevenknight <stevenknight@fdb21ef1-2011-0410-befe-b5e4ea1792b1>
Fri, 19 Sep 2008 16:02:13 +0000 (16:02 +0000)
committerstevenknight <stevenknight@fdb21ef1-2011-0410-befe-b5e4ea1792b1>
Fri, 19 Sep 2008 16:02:13 +0000 (16:02 +0000)
%INCLUDE% and %LIB% aren't set.

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

test/MSVC/hierarchical.py
test/MSVC/msvc.py

index 2dece6674737fb2f701af8f47982a62b63ad247f..19b9dcc2a8965e80909e6d939f54b671da019cc1 100644 (file)
@@ -50,8 +50,8 @@ SConscript('build/SConscript')
 test.write('src/SConscript',"""\r
 import os\r
 env = Environment()\r
-env.Append(CPPPATH=os.environ['INCLUDE'],\r
-           LIBPATH=os.environ['LIB'])\r
+env.Append(CPPPATH=os.environ.get('INCLUDE', ''),\r
+           LIBPATH=os.environ.get('LIB', ''))\r
 env['PCH'] = 'StdAfx.pch'\r
 env['PDB'] = '#out/test.pdb'\r
 env['PCHSTOP'] = 'StdAfx.h'\r
index 552d039a8c68aa3fbe6e5d5e41d0c28c6ec5dbe9..3d2f1f47a8751223dca82e661000fc5d7d08d252 100644 (file)
@@ -43,8 +43,8 @@ if sys.platform != 'win32':
 test.write('SConstruct',"""
 import os
 env = Environment()
-env.Append(CPPPATH=os.environ['INCLUDE'],
-           LIBPATH=os.environ['LIB'])
+env.Append(CPPPATH=os.environ.get('INCLUDE', ''),
+           LIBPATH=os.environ.get('LIB', ''))
 env['PDB'] = File('test.pdb')
 env['PCHSTOP'] = 'StdAfx.h'
 env['PCH'] = env.PCH('StdAfx.cpp')[0]