summaryrefslogtreecommitdiffstats
path: root/test/MSVC/msvc.py
diff options
context:
space:
mode:
authorSteven Knight <knight@baldmt.com>2008-04-21 06:38:31 (GMT)
committerSteven Knight <knight@baldmt.com>2008-04-21 06:38:31 (GMT)
commit736666c4435e553e13b69e57339ec91c9f4f2824 (patch)
tree512353b30aa2af47f79bcd816ea27ac65cf1303f /test/MSVC/msvc.py
parenta6391f26d941d3cba4ec4bf6c499d38e2ce4a014 (diff)
downloadSCons-736666c4435e553e13b69e57339ec91c9f4f2824.zip
SCons-736666c4435e553e13b69e57339ec91c9f4f2824.tar.gz
SCons-736666c4435e553e13b69e57339ec91c9f4f2824.tar.bz2
Merged revisions 2880-2883,2885-2895 via svnmerge from
http://scons.tigris.org/svn/scons/branches/core ........ r2885 | stevenknight | 2008-04-18 21:38:59 -0700 (Fri, 18 Apr 2008) | 2 lines Update troubleshooting appendix for new Taskmaster output. ........ r2886 | bdbaddog | 2008-04-19 15:15:03 -0700 (Sat, 19 Apr 2008) | 5 lines Fix infinite loop in Fortran tool initialization. Bug 2017. Steven fixed, I tested. ........ r2887 | garyo | 2008-04-20 17:44:46 -0700 (Sun, 20 Apr 2008) | 1 line Added this in two sections; simple one when discussing simple builds, and an example in the VariantDir section showing how it still works there. ........ r2888 | stevenknight | 2008-04-20 21:33:01 -0700 (Sun, 20 Apr 2008) | 4 lines Accomodate test/MSVC/msvc.py's reliance on the Windows Platform SDK (for now) by making use of the user's %INCLUDE% and %LIB% variables. Split some independent embedded subtests into their own test scripts. ........ r2889 | stevenknight | 2008-04-20 21:38:05 -0700 (Sun, 20 Apr 2008) | 2 lines Windows portability fix (line endings). ........ r2890 | stevenknight | 2008-04-20 21:44:24 -0700 (Sun, 20 Apr 2008) | 2 lines Update Windows portion of if:-elif: block for a variable name change. ........ r2891 | stevenknight | 2008-04-20 21:52:41 -0700 (Sun, 20 Apr 2008) | 3 lines On Windows, escape backslashes on the --interactive command line input, so people can build targets in other directories. ........ r2892 | stevenknight | 2008-04-20 21:56:50 -0700 (Sun, 20 Apr 2008) | 3 lines Fix ripple effects on Windows from redefining how $CXXFLAGS gets added to C++ command lines. ........ r2893 | stevenknight | 2008-04-20 22:04:50 -0700 (Sun, 20 Apr 2008) | 4 lines Handle a ripple effect from redefining the file() and open() builtin functions by explicitly restoring the originals whenever we reset the global state between tests. ........ r2894 | stevenknight | 2008-04-20 23:17:23 -0700 (Sun, 20 Apr 2008) | 2 lines Remove by-hand backslash escaping, now that --interactive mode is handling it. ........ r2895 | stevenknight | 2008-04-20 23:23:04 -0700 (Sun, 20 Apr 2008) | 2 lines Mention the fix for the Fortran suffix out-of-memory bug ........
Diffstat (limited to 'test/MSVC/msvc.py')
-rw-r--r--test/MSVC/msvc.py95
1 files changed, 5 insertions, 90 deletions
diff --git a/test/MSVC/msvc.py b/test/MSVC/msvc.py
index 48e47f6..552d039 100644
--- a/test/MSVC/msvc.py
+++ b/test/MSVC/msvc.py
@@ -25,15 +25,13 @@
__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
import os
-import os.path
import re
import sys
import time
-import TestCmd
import TestSCons
-test = TestSCons.TestSCons(match = TestCmd.match_re)
+test = TestSCons.TestSCons(match = TestSCons.match_re)
if sys.platform != 'win32':
msg = "Skipping Visual C/C++ test on non-Windows platform '%s'\n" % sys.platform
@@ -43,7 +41,10 @@ if sys.platform != 'win32':
# Test the basics
test.write('SConstruct',"""
-env=Environment()
+import os
+env = Environment()
+env.Append(CPPPATH=os.environ['INCLUDE'],
+ LIBPATH=os.environ['LIB'])
env['PDB'] = File('test.pdb')
env['PCHSTOP'] = 'StdAfx.h'
env['PCH'] = env.PCH('StdAfx.cpp')[0]
@@ -185,91 +186,5 @@ test.not_up_to_date(arguments='test.exe', stderr=None)
test.run(program=test.workpath('test.exe'), stdout='2003 test 2\n')
-##########
-# Test a hierarchical build
-
-test.subdir('src', 'build', 'out')
-
-test.write('SConstruct',"""
-VariantDir('build', 'src', duplicate=0)
-SConscript('build/SConscript')
-""")
-
-test.write('src/SConscript',"""
-env=Environment()
-env['PCH'] = 'StdAfx.pch'
-env['PDB'] = '#out/test.pdb'
-env['PCHSTOP'] = 'StdAfx.h'
-env.PCH('StdAfx.cpp')
-env.Program('#out/test.exe', 'test.cpp')
-""")
-
-test.write('src/test.cpp', '''
-#include "StdAfx.h"
-
-int main(void)
-{
- return 1;
-}
-''')
-
-test.write('src/StdAfx.h', '''
-#include <windows.h>
-''')
-
-test.write('src/StdAfx.cpp', '''
-#include "StdAfx.h"
-''')
-
-test.run(arguments='out', stderr=None)
-
-test.must_exist(test.workpath('out/test.pdb'))
-test.must_exist(test.workpath('build/StdAfx.pch'))
-test.must_exist(test.workpath('build/StdAfx.obj'))
-
-test.run(arguments='-c out')
-
-test.must_not_exist(test.workpath('out/test.pdb'))
-test.must_not_exist(test.workpath('build/StdAfx.pch'))
-test.must_not_exist(test.workpath('build/StdAfx.obj'))
-
-#####
-# Test error reporting
-
-SConstruct_path = test.workpath('SConstruct')
-
-test.write(SConstruct_path, """\
-env = Environment()
-env['PDB'] = File('test.pdb')
-env['PCH'] = env.PCH('StdAfx.cpp')[0]
-env.Program('test', 'test.cpp')
-""")
-
-expect_stderr = r'''
-scons: \*\*\* The PCHSTOP construction must be defined if PCH is defined.
-File "%s", line 4, in \?
-''' % re.escape(SConstruct_path)
-
-test.run(status=2, stderr=expect_stderr)
-
-test.write(SConstruct_path, """\
-env = Environment()
-env['PDB'] = File('test.pdb')
-env['PCHSTOP'] = File('StdAfx.h')
-env['PCH'] = env.PCH('StdAfx.cpp')[0]
-env.Program('test', 'test.cpp')
-""")
-
-expect_stderr = r'''
-scons: \*\*\* The PCHSTOP construction variable must be a string: .+
-File "%s", line 5, in \?
-''' % re.escape(SConstruct_path)
-
-test.run(status=2, stderr=expect_stderr)
test.pass_test()
-
-
-
-
-