summaryrefslogtreecommitdiffstats
path: root/test/MSVS
diff options
context:
space:
mode:
authorAdam Gross <grossag@vmware.com>2019-07-18 19:20:08 (GMT)
committerAdam Gross <grossag@vmware.com>2019-07-18 20:35:54 (GMT)
commitb3dcc756c51b86220685acf88d4f5dea49af307f (patch)
treea03eb62e354eb286ca57b753145ccef02a3133ab /test/MSVS
parenta50f82ba0673e6922504e74dad3bb259e9edc0d3 (diff)
downloadSCons-b3dcc756c51b86220685acf88d4f5dea49af307f.zip
SCons-b3dcc756c51b86220685acf88d4f5dea49af307f.tar.gz
SCons-b3dcc756c51b86220685acf88d4f5dea49af307f.tar.bz2
Fix msvs tests
Diffstat (limited to 'test/MSVS')
-rw-r--r--test/MSVS/vs-10.0-files.py110
-rw-r--r--test/MSVS/vs-10.0-scc-legacy-files.py98
-rw-r--r--test/MSVS/vs-11.0-files.py110
-rw-r--r--test/MSVS/vs-11.0-scc-files.py115
-rw-r--r--test/MSVS/vs-11.0-scc-legacy-files.py98
-rw-r--r--test/MSVS/vs-14.0-files.py110
-rw-r--r--test/MSVS/vs-14.0-scc-files.py115
-rw-r--r--test/MSVS/vs-14.1-files.py108
-rw-r--r--test/MSVS/vs-14.1-scc-files.py113
-rw-r--r--test/MSVS/vs-14.1-scc-legacy-files.py96
-rw-r--r--test/MSVS/vs-8.0-clean.py117
-rw-r--r--test/MSVS/vs-8.0-files.py106
-rw-r--r--test/MSVS/vs-8.0-scc-files.py115
-rw-r--r--test/MSVS/vs-8.0-scc-legacy-files.py98
-rw-r--r--test/MSVS/vs-8.0-variant_dir.py95
-rw-r--r--test/MSVS/vs-8.0-x64-files.py114
-rw-r--r--test/MSVS/vs-9.0-files.py106
-rw-r--r--test/MSVS/vs-9.0-scc-files.py115
-rw-r--r--test/MSVS/vs-9.0-scc-legacy-files.py98
-rw-r--r--test/MSVS/vs-files.py112
-rw-r--r--test/MSVS/vs-scc-files.py (renamed from test/MSVS/vs-10.0-scc-files.py)77
-rw-r--r--test/MSVS/vs-scc-legacy-files.py (renamed from test/MSVS/vs-14.0-scc-legacy-files.py)66
-rw-r--r--test/MSVS/vs-variant_dir.py93
23 files changed, 289 insertions, 2096 deletions
diff --git a/test/MSVS/vs-10.0-files.py b/test/MSVS/vs-10.0-files.py
deleted file mode 100644
index 8cdc152..0000000
--- a/test/MSVS/vs-10.0-files.py
+++ /dev/null
@@ -1,110 +0,0 @@
-#!/usr/bin/env python
-#
-# __COPYRIGHT__
-#
-# Permission is hereby granted, free of charge, to any person obtaining
-# a copy of this software and associated documentation files (the
-# "Software"), to deal in the Software without restriction, including
-# without limitation the rights to use, copy, modify, merge, publish,
-# distribute, sublicense, and/or sell copies of the Software, and to
-# permit persons to whom the Software is furnished to do so, subject to
-# the following conditions:
-#
-# The above copyright notice and this permission notice shall be included
-# in all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
-# KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
-# WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-#
-
-__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
-
-"""
-Test that we can generate Visual Studio 10.0 project (.vcxproj) and
-solution (.sln) files that look correct.
-"""
-
-import os
-
-import TestSConsMSVS
-
-test = TestSConsMSVS.TestSConsMSVS()
-host_arch = test.get_vs_host_arch()
-
-
-# Make the test infrastructure think we have this version of MSVS installed.
-test._msvs_versions = ['10.0']
-
-
-
-expected_slnfile = TestSConsMSVS.expected_slnfile_10_0
-expected_vcprojfile = TestSConsMSVS.expected_vcprojfile_10_0
-SConscript_contents = TestSConsMSVS.SConscript_contents_10_0
-
-
-
-test.write('SConstruct', SConscript_contents%{'HOST_ARCH': host_arch})
-
-test.run(arguments="Test.vcxproj")
-
-test.must_exist(test.workpath('Test.vcxproj'))
-test.must_exist(test.workpath('Test.vcxproj.filters'))
-vcxproj = test.read('Test.vcxproj', 'r')
-expect = test.msvs_substitute(expected_vcprojfile, '10.0', None, 'SConstruct')
-# don't compare the pickled data
-assert vcxproj[:len(expect)] == expect, test.diff_substr(expect, vcxproj)
-
-test.must_exist(test.workpath('Test.sln'))
-sln = test.read('Test.sln', 'r')
-expect = test.msvs_substitute(expected_slnfile, '10.0', None, 'SConstruct')
-# don't compare the pickled data
-assert sln[:len(expect)] == expect, test.diff_substr(expect, sln)
-
-test.run(arguments='-c .')
-
-test.must_not_exist(test.workpath('Test.vcxproj'))
-test.must_not_exist(test.workpath('Test.vcxproj.filters'))
-test.must_not_exist(test.workpath('Test.sln'))
-
-test.run(arguments='Test.vcxproj')
-
-test.must_exist(test.workpath('Test.vcxproj'))
-test.must_exist(test.workpath('Test.vcxproj.filters'))
-test.must_exist(test.workpath('Test.sln'))
-
-test.run(arguments='-c Test.sln')
-
-test.must_not_exist(test.workpath('Test.vcxproj'))
-test.must_not_exist(test.workpath('Test.vcxproj.filters'))
-test.must_not_exist(test.workpath('Test.sln'))
-
-
-
-# Test that running SCons with $PYTHON_ROOT in the environment
-# changes the .vcxproj output as expected.
-os.environ['PYTHON_ROOT'] = 'xyzzy'
-python = os.path.join('$(PYTHON_ROOT)', os.path.split(TestSConsMSVS.python)[1])
-
-test.run(arguments='Test.vcxproj')
-
-test.must_exist(test.workpath('Test.vcxproj'))
-vcxproj = test.read('Test.vcxproj', 'r')
-expect = test.msvs_substitute(expected_vcprojfile, '10.0', None, 'SConstruct',
- python=python)
-# don't compare the pickled data
-assert vcxproj[:len(expect)] == expect, test.diff_substr(expect, vcxproj)
-
-
-
-test.pass_test()
-
-# Local Variables:
-# tab-width:4
-# indent-tabs-mode:nil
-# End:
-# vim: set expandtab tabstop=4 shiftwidth=4:
diff --git a/test/MSVS/vs-10.0-scc-legacy-files.py b/test/MSVS/vs-10.0-scc-legacy-files.py
deleted file mode 100644
index 9cb65d8..0000000
--- a/test/MSVS/vs-10.0-scc-legacy-files.py
+++ /dev/null
@@ -1,98 +0,0 @@
-#!/usr/bin/env python
-#
-# __COPYRIGHT__
-#
-# Permission is hereby granted, free of charge, to any person obtaining
-# a copy of this software and associated documentation files (the
-# "Software"), to deal in the Software without restriction, including
-# without limitation the rights to use, copy, modify, merge, publish,
-# distribute, sublicense, and/or sell copies of the Software, and to
-# permit persons to whom the Software is furnished to do so, subject to
-# the following conditions:
-#
-# The above copyright notice and this permission notice shall be included
-# in all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
-# KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
-# WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-#
-
-__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
-
-"""
-Test that we can generate Visual Studio 10.0 project (.vcxproj) and
-solution (.sln) files that contain SCC information and look correct.
-"""
-
-import os
-
-import TestSConsMSVS
-
-test = TestSConsMSVS.TestSConsMSVS()
-
-# Make the test infrastructure think we have this version of MSVS installed.
-test._msvs_versions = ['10.0']
-
-
-
-expected_slnfile = TestSConsMSVS.expected_slnfile_10_0
-expected_vcprojfile = TestSConsMSVS.expected_vcprojfile_10_0
-SConscript_contents = """\
-env=Environment(platform='win32', tools=['msvs'], MSVS_VERSION='10.0',
- CPPDEFINES=['DEF1', 'DEF2',('DEF3','1234')],
- CPPPATH=['inc1', 'inc2'],
- MSVS_SCC_LOCAL_PATH=r'C:\\MyMsVsProjects',
- MSVS_SCC_PROJECT_NAME='Perforce Project')
-
-testsrc = ['test1.cpp', 'test2.cpp']
-testincs = [r'sdk_dir\\sdk.h']
-testlocalincs = ['test.h']
-testresources = ['test.rc']
-testmisc = ['readme.txt']
-
-env.MSVSProject(target = 'Test.vcxproj',
- srcs = testsrc,
- incs = testincs,
- localincs = testlocalincs,
- resources = testresources,
- misc = testmisc,
- buildtarget = 'Test.exe',
- variant = 'Release')
-"""
-
-expected_vcproj_sccinfo = """\
-\t\t<SccProjectName>Perforce Project</SccProjectName>
-\t\t<SccLocalPath>C:\\MyMsVsProjects</SccLocalPath>
-"""
-
-
-test.write('SConstruct', SConscript_contents)
-
-test.run(arguments="Test.vcxproj")
-
-test.must_exist(test.workpath('Test.vcxproj'))
-vcproj = test.read('Test.vcxproj', 'r')
-expect = test.msvs_substitute(expected_vcprojfile, '10.0', None, 'SConstruct',
- vcproj_sccinfo=expected_vcproj_sccinfo)
-# don't compare the pickled data
-assert vcproj[:len(expect)] == expect, test.diff_substr(expect, vcproj)
-
-test.must_exist(test.workpath('Test.sln'))
-sln = test.read('Test.sln', 'r')
-expect = test.msvs_substitute(expected_slnfile, '10.0', None, 'SConstruct')
-# don't compare the pickled data
-assert sln[:len(expect)] == expect, test.diff_substr(expect, sln)
-
-
-test.pass_test()
-
-# Local Variables:
-# tab-width:4
-# indent-tabs-mode:nil
-# End:
-# vim: set expandtab tabstop=4 shiftwidth=4:
diff --git a/test/MSVS/vs-11.0-files.py b/test/MSVS/vs-11.0-files.py
deleted file mode 100644
index 6c4933c..0000000
--- a/test/MSVS/vs-11.0-files.py
+++ /dev/null
@@ -1,110 +0,0 @@
-#!/usr/bin/env python
-#
-# __COPYRIGHT__
-#
-# Permission is hereby granted, free of charge, to any person obtaining
-# a copy of this software and associated documentation files (the
-# "Software"), to deal in the Software without restriction, including
-# without limitation the rights to use, copy, modify, merge, publish,
-# distribute, sublicense, and/or sell copies of the Software, and to
-# permit persons to whom the Software is furnished to do so, subject to
-# the following conditions:
-#
-# The above copyright notice and this permission notice shall be included
-# in all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
-# KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
-# WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-#
-
-__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
-
-"""
-Test that we can generate Visual Studio 11.0 project (.vcxproj) and
-solution (.sln) files that look correct.
-"""
-
-import os
-
-import TestSConsMSVS
-
-test = TestSConsMSVS.TestSConsMSVS()
-host_arch = test.get_vs_host_arch()
-
-
-# Make the test infrastructure think we have this version of MSVS installed.
-test._msvs_versions = ['11.0']
-
-
-
-expected_slnfile = TestSConsMSVS.expected_slnfile_11_0
-expected_vcprojfile = TestSConsMSVS.expected_vcprojfile_11_0
-SConscript_contents = TestSConsMSVS.SConscript_contents_11_0
-
-
-
-test.write('SConstruct', SConscript_contents%{'HOST_ARCH': host_arch})
-
-test.run(arguments="Test.vcxproj")
-
-test.must_exist(test.workpath('Test.vcxproj'))
-test.must_exist(test.workpath('Test.vcxproj.filters'))
-vcxproj = test.read('Test.vcxproj', 'r')
-expect = test.msvs_substitute(expected_vcprojfile, '11.0', None, 'SConstruct')
-# don't compare the pickled data
-assert vcxproj[:len(expect)] == expect, test.diff_substr(expect, vcxproj)
-
-test.must_exist(test.workpath('Test.sln'))
-sln = test.read('Test.sln', 'r')
-expect = test.msvs_substitute(expected_slnfile, '11.0', None, 'SConstruct')
-# don't compare the pickled data
-assert sln[:len(expect)] == expect, test.diff_substr(expect, sln)
-
-test.run(arguments='-c .')
-
-test.must_not_exist(test.workpath('Test.vcxproj'))
-test.must_not_exist(test.workpath('Test.vcxproj.filters'))
-test.must_not_exist(test.workpath('Test.sln'))
-
-test.run(arguments='Test.vcxproj')
-
-test.must_exist(test.workpath('Test.vcxproj'))
-test.must_exist(test.workpath('Test.vcxproj.filters'))
-test.must_exist(test.workpath('Test.sln'))
-
-test.run(arguments='-c Test.sln')
-
-test.must_not_exist(test.workpath('Test.vcxproj'))
-test.must_not_exist(test.workpath('Test.vcxproj.filters'))
-test.must_not_exist(test.workpath('Test.sln'))
-
-
-
-# Test that running SCons with $PYTHON_ROOT in the environment
-# changes the .vcxproj output as expected.
-os.environ['PYTHON_ROOT'] = 'xyzzy'
-python = os.path.join('$(PYTHON_ROOT)', os.path.split(TestSConsMSVS.python)[1])
-
-test.run(arguments='Test.vcxproj')
-
-test.must_exist(test.workpath('Test.vcxproj'))
-vcxproj = test.read('Test.vcxproj', 'r')
-expect = test.msvs_substitute(expected_vcprojfile, '11.0', None, 'SConstruct',
- python=python)
-# don't compare the pickled data
-assert vcxproj[:len(expect)] == expect, test.diff_substr(expect, vcxproj)
-
-
-
-test.pass_test()
-
-# Local Variables:
-# tab-width:4
-# indent-tabs-mode:nil
-# End:
-# vim: set expandtab tabstop=4 shiftwidth=4:
diff --git a/test/MSVS/vs-11.0-scc-files.py b/test/MSVS/vs-11.0-scc-files.py
deleted file mode 100644
index 2b13e46..0000000
--- a/test/MSVS/vs-11.0-scc-files.py
+++ /dev/null
@@ -1,115 +0,0 @@
-#!/usr/bin/env python
-#
-# __COPYRIGHT__
-#
-# Permission is hereby granted, free of charge, to any person obtaining
-# a copy of this software and associated documentation files (the
-# "Software"), to deal in the Software without restriction, including
-# without limitation the rights to use, copy, modify, merge, publish,
-# distribute, sublicense, and/or sell copies of the Software, and to
-# permit persons to whom the Software is furnished to do so, subject to
-# the following conditions:
-#
-# The above copyright notice and this permission notice shall be included
-# in all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
-# KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
-# WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-#
-
-__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
-
-"""
-Test that we can generate Visual Studio 11.0 project (.vcxproj) and
-solution (.sln) files that contain SCC information and look correct.
-"""
-
-import os
-
-import TestSConsMSVS
-
-test = TestSConsMSVS.TestSConsMSVS()
-
-# Make the test infrastructure think we have this version of MSVS installed.
-test._msvs_versions = ['11.0']
-
-
-
-expected_slnfile = TestSConsMSVS.expected_slnfile_11_0
-expected_vcprojfile = TestSConsMSVS.expected_vcprojfile_11_0
-SConscript_contents = """\
-env=Environment(platform='win32', tools=['msvs'], MSVS_VERSION='11.0',
- CPPDEFINES=['DEF1', 'DEF2',('DEF3','1234')],
- CPPPATH=['inc1', 'inc2'],
- MSVS_SCC_CONNECTION_ROOT='.',
- MSVS_SCC_PROVIDER='MSSCCI:Perforce SCM',
- MSVS_SCC_PROJECT_NAME='Perforce Project')
-
-testsrc = ['test1.cpp', 'test2.cpp']
-testincs = [r'sdk_dir\\sdk.h']
-testlocalincs = ['test.h']
-testresources = ['test.rc']
-testmisc = ['readme.txt']
-
-env.MSVSProject(target = 'Test.vcxproj',
- srcs = testsrc,
- incs = testincs,
- localincs = testlocalincs,
- resources = testresources,
- misc = testmisc,
- buildtarget = 'Test.exe',
- variant = 'Release')
-"""
-
-expected_sln_sccinfo = """\
-\tGlobalSection(SourceCodeControl) = preSolution
-\t\tSccNumberOfProjects = 2
-\t\tSccProjectName0 = Perforce\\u0020Project
-\t\tSccLocalPath0 = .
-\t\tSccProvider0 = MSSCCI:Perforce\\u0020SCM
-\t\tCanCheckoutShared = true
-\t\tSccProjectUniqueName1 = Test.vcxproj
-\t\tSccLocalPath1 = .
-\t\tCanCheckoutShared = true
-\t\tSccProjectFilePathRelativizedFromConnection1 = .\\\\
-\tEndGlobalSection
-"""
-
-expected_vcproj_sccinfo = """\
-\t\t<SccProjectName>Perforce Project</SccProjectName>
-\t\t<SccLocalPath>.</SccLocalPath>
-\t\t<SccProvider>MSSCCI:Perforce SCM</SccProvider>
-"""
-
-
-test.write('SConstruct', SConscript_contents)
-
-test.run(arguments="Test.vcxproj")
-
-test.must_exist(test.workpath('Test.vcxproj'))
-vcproj = test.read('Test.vcxproj', 'r')
-expect = test.msvs_substitute(expected_vcprojfile, '11.0', None, 'SConstruct',
- vcproj_sccinfo=expected_vcproj_sccinfo)
-# don't compare the pickled data
-assert vcproj[:len(expect)] == expect, test.diff_substr(expect, vcproj)
-
-test.must_exist(test.workpath('Test.sln'))
-sln = test.read('Test.sln', 'r')
-expect = test.msvs_substitute(expected_slnfile, '11.0', None, 'SConstruct',
- sln_sccinfo=expected_sln_sccinfo)
-# don't compare the pickled data
-assert sln[:len(expect)] == expect, test.diff_substr(expect, sln)
-
-
-test.pass_test()
-
-# Local Variables:
-# tab-width:4
-# indent-tabs-mode:nil
-# End:
-# vim: set expandtab tabstop=4 shiftwidth=4:
diff --git a/test/MSVS/vs-11.0-scc-legacy-files.py b/test/MSVS/vs-11.0-scc-legacy-files.py
deleted file mode 100644
index 9e46f6a..0000000
--- a/test/MSVS/vs-11.0-scc-legacy-files.py
+++ /dev/null
@@ -1,98 +0,0 @@
-#!/usr/bin/env python
-#
-# __COPYRIGHT__
-#
-# Permission is hereby granted, free of charge, to any person obtaining
-# a copy of this software and associated documentation files (the
-# "Software"), to deal in the Software without restriction, including
-# without limitation the rights to use, copy, modify, merge, publish,
-# distribute, sublicense, and/or sell copies of the Software, and to
-# permit persons to whom the Software is furnished to do so, subject to
-# the following conditions:
-#
-# The above copyright notice and this permission notice shall be included
-# in all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
-# KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
-# WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-#
-
-__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
-
-"""
-Test that we can generate Visual Studio 11.0 project (.vcxproj) and
-solution (.sln) files that contain SCC information and look correct.
-"""
-
-import os
-
-import TestSConsMSVS
-
-test = TestSConsMSVS.TestSConsMSVS()
-
-# Make the test infrastructure think we have this version of MSVS installed.
-test._msvs_versions = ['11.0']
-
-
-
-expected_slnfile = TestSConsMSVS.expected_slnfile_11_0
-expected_vcprojfile = TestSConsMSVS.expected_vcprojfile_11_0
-SConscript_contents = """\
-env=Environment(platform='win32', tools=['msvs'], MSVS_VERSION='11.0',
- CPPDEFINES=['DEF1', 'DEF2',('DEF3','1234')],
- CPPPATH=['inc1', 'inc2'],
- MSVS_SCC_LOCAL_PATH=r'C:\\MyMsVsProjects',
- MSVS_SCC_PROJECT_NAME='Perforce Project')
-
-testsrc = ['test1.cpp', 'test2.cpp']
-testincs = [r'sdk_dir\\sdk.h']
-testlocalincs = ['test.h']
-testresources = ['test.rc']
-testmisc = ['readme.txt']
-
-env.MSVSProject(target = 'Test.vcxproj',
- srcs = testsrc,
- incs = testincs,
- localincs = testlocalincs,
- resources = testresources,
- misc = testmisc,
- buildtarget = 'Test.exe',
- variant = 'Release')
-"""
-
-expected_vcproj_sccinfo = """\
-\t\t<SccProjectName>Perforce Project</SccProjectName>
-\t\t<SccLocalPath>C:\\MyMsVsProjects</SccLocalPath>
-"""
-
-
-test.write('SConstruct', SConscript_contents)
-
-test.run(arguments="Test.vcxproj")
-
-test.must_exist(test.workpath('Test.vcxproj'))
-vcproj = test.read('Test.vcxproj', 'r')
-expect = test.msvs_substitute(expected_vcprojfile, '11.0', None, 'SConstruct',
- vcproj_sccinfo=expected_vcproj_sccinfo)
-# don't compare the pickled data
-assert vcproj[:len(expect)] == expect, test.diff_substr(expect, vcproj)
-
-test.must_exist(test.workpath('Test.sln'))
-sln = test.read('Test.sln', 'r')
-expect = test.msvs_substitute(expected_slnfile, '11.0', None, 'SConstruct')
-# don't compare the pickled data
-assert sln[:len(expect)] == expect, test.diff_substr(expect, sln)
-
-
-test.pass_test()
-
-# Local Variables:
-# tab-width:4
-# indent-tabs-mode:nil
-# End:
-# vim: set expandtab tabstop=4 shiftwidth=4:
diff --git a/test/MSVS/vs-14.0-files.py b/test/MSVS/vs-14.0-files.py
deleted file mode 100644
index e4ba8e2..0000000
--- a/test/MSVS/vs-14.0-files.py
+++ /dev/null
@@ -1,110 +0,0 @@
-#!/usr/bin/env python
-#
-# __COPYRIGHT__
-#
-# Permission is hereby granted, free of charge, to any person obtaining
-# a copy of this software and associated documentation files (the
-# "Software"), to deal in the Software without restriction, including
-# without limitation the rights to use, copy, modify, merge, publish,
-# distribute, sublicense, and/or sell copies of the Software, and to
-# permit persons to whom the Software is furnished to do so, subject to
-# the following conditions:
-#
-# The above copyright notice and this permission notice shall be included
-# in all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
-# KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
-# WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-#
-
-__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
-
-"""
-Test that we can generate Visual Studio 14.0 project (.vcxproj) and
-solution (.sln) files that look correct.
-"""
-
-import os
-
-import TestSConsMSVS
-
-test = TestSConsMSVS.TestSConsMSVS()
-host_arch = test.get_vs_host_arch()
-
-
-# Make the test infrastructure think we have this version of MSVS installed.
-test._msvs_versions = ['14.0']
-
-
-
-expected_slnfile = TestSConsMSVS.expected_slnfile_14_0
-expected_vcprojfile = TestSConsMSVS.expected_vcprojfile_14_0
-SConscript_contents = TestSConsMSVS.SConscript_contents_14_0
-
-
-
-test.write('SConstruct', SConscript_contents%{'HOST_ARCH': host_arch})
-
-test.run(arguments="Test.vcxproj")
-
-test.must_exist(test.workpath('Test.vcxproj'))
-test.must_exist(test.workpath('Test.vcxproj.filters'))
-vcxproj = test.read('Test.vcxproj', 'r')
-expect = test.msvs_substitute(expected_vcprojfile, '14.0', None, 'SConstruct')
-# don't compare the pickled data
-assert vcxproj[:len(expect)] == expect, test.diff_substr(expect, vcxproj)
-
-test.must_exist(test.workpath('Test.sln'))
-sln = test.read('Test.sln', 'r')
-expect = test.msvs_substitute(expected_slnfile, '14.0', None, 'SConstruct')
-# don't compare the pickled data
-assert sln[:len(expect)] == expect, test.diff_substr(expect, sln)
-
-test.run(arguments='-c .')
-
-test.must_not_exist(test.workpath('Test.vcxproj'))
-test.must_not_exist(test.workpath('Test.vcxproj.filters'))
-test.must_not_exist(test.workpath('Test.sln'))
-
-test.run(arguments='Test.vcxproj')
-
-test.must_exist(test.workpath('Test.vcxproj'))
-test.must_exist(test.workpath('Test.vcxproj.filters'))
-test.must_exist(test.workpath('Test.sln'))
-
-test.run(arguments='-c Test.sln')
-
-test.must_not_exist(test.workpath('Test.vcxproj'))
-test.must_not_exist(test.workpath('Test.vcxproj.filters'))
-test.must_not_exist(test.workpath('Test.sln'))
-
-
-
-# Test that running SCons with $PYTHON_ROOT in the environment
-# changes the .vcxproj output as expected.
-os.environ['PYTHON_ROOT'] = 'xyzzy'
-python = os.path.join('$(PYTHON_ROOT)', os.path.split(TestSConsMSVS.python)[1])
-
-test.run(arguments='Test.vcxproj')
-
-test.must_exist(test.workpath('Test.vcxproj'))
-vcxproj = test.read('Test.vcxproj', 'r')
-expect = test.msvs_substitute(expected_vcprojfile, '14.0', None, 'SConstruct',
- python=python)
-# don't compare the pickled data
-assert vcxproj[:len(expect)] == expect, test.diff_substr(expect, vcxproj)
-
-
-
-test.pass_test()
-
-# Local Variables:
-# tab-width:4
-# indent-tabs-mode:nil
-# End:
-# vim: set expandtab tabstop=4 shiftwidth=4:
diff --git a/test/MSVS/vs-14.0-scc-files.py b/test/MSVS/vs-14.0-scc-files.py
deleted file mode 100644
index d706b32..0000000
--- a/test/MSVS/vs-14.0-scc-files.py
+++ /dev/null
@@ -1,115 +0,0 @@
-#!/usr/bin/env python
-#
-# __COPYRIGHT__
-#
-# Permission is hereby granted, free of charge, to any person obtaining
-# a copy of this software and associated documentation files (the
-# "Software"), to deal in the Software without restriction, including
-# without limitation the rights to use, copy, modify, merge, publish,
-# distribute, sublicense, and/or sell copies of the Software, and to
-# permit persons to whom the Software is furnished to do so, subject to
-# the following conditions:
-#
-# The above copyright notice and this permission notice shall be included
-# in all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
-# KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
-# WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-#
-
-__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
-
-"""
-Test that we can generate Visual Studio 14.0 project (.vcxproj) and
-solution (.sln) files that contain SCC information and look correct.
-"""
-
-import os
-
-import TestSConsMSVS
-
-test = TestSConsMSVS.TestSConsMSVS()
-
-# Make the test infrastructure think we have this version of MSVS installed.
-test._msvs_versions = ['14.0']
-
-
-
-expected_slnfile = TestSConsMSVS.expected_slnfile_14_0
-expected_vcprojfile = TestSConsMSVS.expected_vcprojfile_14_0
-SConscript_contents = """\
-env=Environment(platform='win32', tools=['msvs'], MSVS_VERSION='14.0',
- CPPDEFINES=['DEF1', 'DEF2',('DEF3','1234')],
- CPPPATH=['inc1', 'inc2'],
- MSVS_SCC_CONNECTION_ROOT='.',
- MSVS_SCC_PROVIDER='MSSCCI:Perforce SCM',
- MSVS_SCC_PROJECT_NAME='Perforce Project')
-
-testsrc = ['test1.cpp', 'test2.cpp']
-testincs = [r'sdk_dir\\sdk.h']
-testlocalincs = ['test.h']
-testresources = ['test.rc']
-testmisc = ['readme.txt']
-
-env.MSVSProject(target = 'Test.vcxproj',
- srcs = testsrc,
- incs = testincs,
- localincs = testlocalincs,
- resources = testresources,
- misc = testmisc,
- buildtarget = 'Test.exe',
- variant = 'Release')
-"""
-
-expected_sln_sccinfo = """\
-\tGlobalSection(SourceCodeControl) = preSolution
-\t\tSccNumberOfProjects = 2
-\t\tSccProjectName0 = Perforce\\u0020Project
-\t\tSccLocalPath0 = .
-\t\tSccProvider0 = MSSCCI:Perforce\\u0020SCM
-\t\tCanCheckoutShared = true
-\t\tSccProjectUniqueName1 = Test.vcxproj
-\t\tSccLocalPath1 = .
-\t\tCanCheckoutShared = true
-\t\tSccProjectFilePathRelativizedFromConnection1 = .\\\\
-\tEndGlobalSection
-"""
-
-expected_vcproj_sccinfo = """\
-\t\t<SccProjectName>Perforce Project</SccProjectName>
-\t\t<SccLocalPath>.</SccLocalPath>
-\t\t<SccProvider>MSSCCI:Perforce SCM</SccProvider>
-"""
-
-
-test.write('SConstruct', SConscript_contents)
-
-test.run(arguments="Test.vcxproj")
-
-test.must_exist(test.workpath('Test.vcxproj'))
-vcproj = test.read('Test.vcxproj', 'r')
-expect = test.msvs_substitute(expected_vcprojfile, '14.0', None, 'SConstruct',
- vcproj_sccinfo=expected_vcproj_sccinfo)
-# don't compare the pickled data
-assert vcproj[:len(expect)] == expect, test.diff_substr(expect, vcproj)
-
-test.must_exist(test.workpath('Test.sln'))
-sln = test.read('Test.sln', 'r')
-expect = test.msvs_substitute(expected_slnfile, '14.0', None, 'SConstruct',
- sln_sccinfo=expected_sln_sccinfo)
-# don't compare the pickled data
-assert sln[:len(expect)] == expect, test.diff_substr(expect, sln)
-
-
-test.pass_test()
-
-# Local Variables:
-# tab-width:4
-# indent-tabs-mode:nil
-# End:
-# vim: set expandtab tabstop=4 shiftwidth=4:
diff --git a/test/MSVS/vs-14.1-files.py b/test/MSVS/vs-14.1-files.py
deleted file mode 100644
index a7c8437..0000000
--- a/test/MSVS/vs-14.1-files.py
+++ /dev/null
@@ -1,108 +0,0 @@
-#!/usr/bin/env python
-#
-# __COPYRIGHT__
-#
-# Permission is hereby granted, free of charge, to any person obtaining
-# a copy of this software and associated documentation files (the
-# "Software"), to deal in the Software without restriction, including
-# without limitation the rights to use, copy, modify, merge, publish,
-# distribute, sublicense, and/or sell copies of the Software, and to
-# permit persons to whom the Software is furnished to do so, subject to
-# the following conditions:
-#
-# The above copyright notice and this permission notice shall be included
-# in all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
-# KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
-# WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-#
-
-__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
-
-"""
-Test that we can generate Visual Studio 14.1 project (.vcxproj) and
-solution (.sln) files that look correct.
-"""
-
-import os
-
-import TestSConsMSVS
-
-test = TestSConsMSVS.TestSConsMSVS()
-host_arch = test.get_vs_host_arch()
-
-
-# Make the test infrastructure think we have this version of MSVS installed.
-test._msvs_versions = ['14.1']
-
-
-
-expected_slnfile = TestSConsMSVS.expected_slnfile_14_1
-expected_vcprojfile = TestSConsMSVS.expected_vcprojfile_14_1
-SConscript_contents = TestSConsMSVS.SConscript_contents_14_1
-
-
-
-test.write('SConstruct', SConscript_contents%{'HOST_ARCH': host_arch})
-
-test.run(arguments="Test.vcxproj")
-
-test.must_exist(test.workpath('Test.vcxproj'))
-test.must_exist(test.workpath('Test.vcxproj.filters'))
-vcxproj = test.read('Test.vcxproj', 'r')
-expect = test.msvs_substitute(expected_vcprojfile, '14.1', None, 'SConstruct')
-# don't compare the pickled data
-assert vcxproj[:len(expect)] == expect, test.diff_substr(expect, vcxproj)
-
-test.must_exist(test.workpath('Test.sln'))
-sln = test.read('Test.sln', 'r')
-expect = test.msvs_substitute(expected_slnfile, '14.1', None, 'SConstruct')
-# don't compare the pickled data
-assert sln[:len(expect)] == expect, test.diff_substr(expect, sln)
-
-test.run(arguments='-c .')
-
-test.must_not_exist(test.workpath('Test.vcxproj'))
-test.must_not_exist(test.workpath('Test.vcxproj.filters'))
-test.must_not_exist(test.workpath('Test.sln'))
-
-test.run(arguments='Test.vcxproj')
-
-test.must_exist(test.workpath('Test.vcxproj'))
-test.must_exist(test.workpath('Test.vcxproj.filters'))
-test.must_exist(test.workpath('Test.sln'))
-
-test.run(arguments='-c Test.sln')
-
-test.must_not_exist(test.workpath('Test.vcxproj'))
-test.must_not_exist(test.workpath('Test.vcxproj.filters'))
-test.must_not_exist(test.workpath('Test.sln'))
-
-
-
-# Test that running SCons with $PYTHON_ROOT in the environment
-# changes the .vcxproj output as expected.
-os.environ['PYTHON_ROOT'] = 'xyzzy'
-python = os.path.join('$(PYTHON_ROOT)', os.path.split(TestSConsMSVS.python)[1])
-
-test.run(arguments='Test.vcxproj')
-
-test.must_exist(test.workpath('Test.vcxproj'))
-vcxproj = test.read('Test.vcxproj', 'r')
-expect = test.msvs_substitute(expected_vcprojfile, '14.1', None, 'SConstruct',
- python=python)
-# don't compare the pickled data
-assert vcxproj[:len(expect)] == expect, test.diff_substr(expect, vcxproj)
-
-test.pass_test()
-
-# Local Variables:
-# tab-width:4
-# indent-tabs-mode:nil
-# End:
-# vim: set expandtab tabstop=4 shiftwidth=4:
diff --git a/test/MSVS/vs-14.1-scc-files.py b/test/MSVS/vs-14.1-scc-files.py
deleted file mode 100644
index 465c904..0000000
--- a/test/MSVS/vs-14.1-scc-files.py
+++ /dev/null
@@ -1,113 +0,0 @@
-#!/usr/bin/env python
-#
-# __COPYRIGHT__
-#
-# Permission is hereby granted, free of charge, to any person obtaining
-# a copy of this software and associated documentation files (the
-# "Software"), to deal in the Software without restriction, including
-# without limitation the rights to use, copy, modify, merge, publish,
-# distribute, sublicense, and/or sell copies of the Software, and to
-# permit persons to whom the Software is furnished to do so, subject to
-# the following conditions:
-#
-# The above copyright notice and this permission notice shall be included
-# in all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
-# KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
-# WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-#
-
-__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
-
-"""
-Test that we can generate Visual Studio 14.1 project (.vcxproj) and
-solution (.sln) files that contain SCC information and look correct.
-"""
-
-import TestSConsMSVS
-
-test = TestSConsMSVS.TestSConsMSVS()
-
-# Make the test infrastructure think we have this version of MSVS installed.
-test._msvs_versions = ['14.1']
-
-
-
-expected_slnfile = TestSConsMSVS.expected_slnfile_14_1
-expected_vcprojfile = TestSConsMSVS.expected_vcprojfile_14_1
-SConscript_contents = """\
-env=Environment(platform='win32', tools=['msvs'], MSVS_VERSION='14.1',
- CPPDEFINES=['DEF1', 'DEF2',('DEF3','1234')],
- CPPPATH=['inc1', 'inc2'],
- MSVS_SCC_CONNECTION_ROOT='.',
- MSVS_SCC_PROVIDER='MSSCCI:Perforce SCM',
- MSVS_SCC_PROJECT_NAME='Perforce Project')
-
-testsrc = ['test1.cpp', 'test2.cpp']
-testincs = [r'sdk_dir\\sdk.h']
-testlocalincs = ['test.h']
-testresources = ['test.rc']
-testmisc = ['readme.txt']
-
-env.MSVSProject(target = 'Test.vcxproj',
- srcs = testsrc,
- incs = testincs,
- localincs = testlocalincs,
- resources = testresources,
- misc = testmisc,
- buildtarget = 'Test.exe',
- variant = 'Release')
-"""
-
-expected_sln_sccinfo = """\
-\tGlobalSection(SourceCodeControl) = preSolution
-\t\tSccNumberOfProjects = 2
-\t\tSccProjectName0 = Perforce\\u0020Project
-\t\tSccLocalPath0 = .
-\t\tSccProvider0 = MSSCCI:Perforce\\u0020SCM
-\t\tCanCheckoutShared = true
-\t\tSccProjectUniqueName1 = Test.vcxproj
-\t\tSccLocalPath1 = .
-\t\tCanCheckoutShared = true
-\t\tSccProjectFilePathRelativizedFromConnection1 = .\\\\
-\tEndGlobalSection
-"""
-
-expected_vcproj_sccinfo = """\
-\t\t<SccProjectName>Perforce Project</SccProjectName>
-\t\t<SccLocalPath>.</SccLocalPath>
-\t\t<SccProvider>MSSCCI:Perforce SCM</SccProvider>
-"""
-
-
-test.write('SConstruct', SConscript_contents)
-
-test.run(arguments="Test.vcxproj")
-
-test.must_exist(test.workpath('Test.vcxproj'))
-vcproj = test.read('Test.vcxproj', 'r')
-expect = test.msvs_substitute(expected_vcprojfile, '14.1', None, 'SConstruct',
- vcproj_sccinfo=expected_vcproj_sccinfo)
-# don't compare the pickled data
-assert vcproj[:len(expect)] == expect, test.diff_substr(expect, vcproj)
-
-test.must_exist(test.workpath('Test.sln'))
-sln = test.read('Test.sln', 'r')
-expect = test.msvs_substitute(expected_slnfile, '14.1', None, 'SConstruct',
- sln_sccinfo=expected_sln_sccinfo)
-# don't compare the pickled data
-assert sln[:len(expect)] == expect, test.diff_substr(expect, sln)
-
-
-test.pass_test()
-
-# Local Variables:
-# tab-width:4
-# indent-tabs-mode:nil
-# End:
-# vim: set expandtab tabstop=4 shiftwidth=4:
diff --git a/test/MSVS/vs-14.1-scc-legacy-files.py b/test/MSVS/vs-14.1-scc-legacy-files.py
deleted file mode 100644
index 45d94a6..0000000
--- a/test/MSVS/vs-14.1-scc-legacy-files.py
+++ /dev/null
@@ -1,96 +0,0 @@
-#!/usr/bin/env python
-#
-# __COPYRIGHT__
-#
-# Permission is hereby granted, free of charge, to any person obtaining
-# a copy of this software and associated documentation files (the
-# "Software"), to deal in the Software without restriction, including
-# without limitation the rights to use, copy, modify, merge, publish,
-# distribute, sublicense, and/or sell copies of the Software, and to
-# permit persons to whom the Software is furnished to do so, subject to
-# the following conditions:
-#
-# The above copyright notice and this permission notice shall be included
-# in all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
-# KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
-# WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-#
-
-__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
-
-"""
-Test that we can generate Visual Studio 14.1 project (.vcxproj) and
-solution (.sln) files that contain SCC information and look correct.
-"""
-
-import TestSConsMSVS
-
-test = TestSConsMSVS.TestSConsMSVS()
-
-# Make the test infrastructure think we have this version of MSVS installed.
-test._msvs_versions = ['14.1']
-
-
-
-expected_slnfile = TestSConsMSVS.expected_slnfile_14_1
-expected_vcprojfile = TestSConsMSVS.expected_vcprojfile_14_1
-SConscript_contents = """\
-env=Environment(platform='win32', tools=['msvs'], MSVS_VERSION='14.1',
- CPPDEFINES=['DEF1', 'DEF2',('DEF3','1234')],
- CPPPATH=['inc1', 'inc2'],
- MSVS_SCC_LOCAL_PATH=r'C:\\MyMsVsProjects',
- MSVS_SCC_PROJECT_NAME='Perforce Project')
-
-testsrc = ['test1.cpp', 'test2.cpp']
-testincs = [r'sdk_dir\\sdk.h']
-testlocalincs = ['test.h']
-testresources = ['test.rc']
-testmisc = ['readme.txt']
-
-env.MSVSProject(target = 'Test.vcxproj',
- srcs = testsrc,
- incs = testincs,
- localincs = testlocalincs,
- resources = testresources,
- misc = testmisc,
- buildtarget = 'Test.exe',
- variant = 'Release')
-"""
-
-expected_vcproj_sccinfo = """\
-\t\t<SccProjectName>Perforce Project</SccProjectName>
-\t\t<SccLocalPath>C:\\MyMsVsProjects</SccLocalPath>
-"""
-
-
-test.write('SConstruct', SConscript_contents)
-
-test.run(arguments="Test.vcxproj")
-
-test.must_exist(test.workpath('Test.vcxproj'))
-vcproj = test.read('Test.vcxproj', 'r')
-expect = test.msvs_substitute(expected_vcprojfile, '14.1', None, 'SConstruct',
- vcproj_sccinfo=expected_vcproj_sccinfo)
-# don't compare the pickled data
-assert vcproj[:len(expect)] == expect, test.diff_substr(expect, vcproj)
-
-test.must_exist(test.workpath('Test.sln'))
-sln = test.read('Test.sln', 'r')
-expect = test.msvs_substitute(expected_slnfile, '14.1', None, 'SConstruct')
-# don't compare the pickled data
-assert sln[:len(expect)] == expect, test.diff_substr(expect, sln)
-
-
-test.pass_test()
-
-# Local Variables:
-# tab-width:4
-# indent-tabs-mode:nil
-# End:
-# vim: set expandtab tabstop=4 shiftwidth=4:
diff --git a/test/MSVS/vs-8.0-clean.py b/test/MSVS/vs-8.0-clean.py
deleted file mode 100644
index 7ca1c46..0000000
--- a/test/MSVS/vs-8.0-clean.py
+++ /dev/null
@@ -1,117 +0,0 @@
-#!/usr/bin/env python
-#
-# __COPYRIGHT__
-#
-# Permission is hereby granted, free of charge, to any person obtaining
-# a copy of this software and associated documentation files (the
-# "Software"), to deal in the Software without restriction, including
-# without limitation the rights to use, copy, modify, merge, publish,
-# distribute, sublicense, and/or sell copies of the Software, and to
-# permit persons to whom the Software is furnished to do so, subject to
-# the following conditions:
-#
-# The above copyright notice and this permission notice shall be included
-# in all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
-# KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
-# WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-#
-
-__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
-
-"""
-Verify the -c option's ability to clean generated Visual Studio 8.0
-project (.vcproj) and solution (.sln) files.
-"""
-
-import TestSConsMSVS
-
-test = TestSConsMSVS.TestSConsMSVS()
-host_arch = test.get_vs_host_arch()
-
-
-# Make the test infrastructure think we have this version of MSVS installed.
-test._msvs_versions = ['8.0']
-
-
-
-expected_slnfile = TestSConsMSVS.expected_slnfile_8_0
-expected_vcprojfile = TestSConsMSVS.expected_vcprojfile_8_0
-
-
-
-test.write('SConstruct', """\
-env=Environment(platform='win32', tools=['msvs'], MSVS_VERSION='8.0',
- CPPDEFINES=['DEF1', 'DEF2',('DEF3','1234')],
- CPPPATH=['inc1', 'inc2'],
- HOST_ARCH='%(HOST_ARCH)s')
-
-testsrc = ['test1.cpp', 'test2.cpp']
-testincs = ['sdk.h']
-testlocalincs = ['test.h']
-testresources = ['test.rc']
-testmisc = ['readme.txt']
-
-p = env.MSVSProject(target = 'Test.vcproj',
- srcs = testsrc,
- incs = testincs,
- localincs = testlocalincs,
- resources = testresources,
- misc = testmisc,
- buildtarget = 'Test.exe',
- variant = 'Release',
- auto_build_solution = 0)
-
-env.MSVSSolution(target = 'Test.sln',
- slnguid = '{SLNGUID}',
- projects = [p],
- variant = 'Release')
-"""%{'HOST_ARCH': host_arch})
-
-test.run(arguments=".")
-
-test.must_exist(test.workpath('Test.vcproj'))
-vcproj = test.read('Test.vcproj', 'r')
-expect = test.msvs_substitute(expected_vcprojfile, '8.0', None, 'SConstruct')
-# don't compare the pickled data
-assert vcproj[:len(expect)] == expect, test.diff_substr(expect, vcproj)
-
-test.must_exist(test.workpath('Test.sln'))
-sln = test.read('Test.sln', 'r')
-expect = test.msvs_substitute(expected_slnfile, '8.0', None, 'SConstruct')
-# don't compare the pickled data
-assert sln[:len(expect)] == expect, test.diff_substr(expect, sln)
-
-test.run(arguments='-c .')
-
-test.must_not_exist(test.workpath('Test.vcproj'))
-test.must_not_exist(test.workpath('Test.sln'))
-
-test.run(arguments='.')
-
-test.must_exist(test.workpath('Test.vcproj'))
-test.must_exist(test.workpath('Test.sln'))
-
-test.run(arguments='-c Test.sln')
-
-test.must_exist(test.workpath('Test.vcproj'))
-test.must_not_exist(test.workpath('Test.sln'))
-
-test.run(arguments='-c Test.vcproj')
-
-test.must_not_exist(test.workpath('Test.vcproj'))
-
-
-
-test.pass_test()
-
-# Local Variables:
-# tab-width:4
-# indent-tabs-mode:nil
-# End:
-# vim: set expandtab tabstop=4 shiftwidth=4:
diff --git a/test/MSVS/vs-8.0-files.py b/test/MSVS/vs-8.0-files.py
deleted file mode 100644
index 038a5bf..0000000
--- a/test/MSVS/vs-8.0-files.py
+++ /dev/null
@@ -1,106 +0,0 @@
-#!/usr/bin/env python
-#
-# __COPYRIGHT__
-#
-# Permission is hereby granted, free of charge, to any person obtaining
-# a copy of this software and associated documentation files (the
-# "Software"), to deal in the Software without restriction, including
-# without limitation the rights to use, copy, modify, merge, publish,
-# distribute, sublicense, and/or sell copies of the Software, and to
-# permit persons to whom the Software is furnished to do so, subject to
-# the following conditions:
-#
-# The above copyright notice and this permission notice shall be included
-# in all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
-# KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
-# WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-#
-
-__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
-
-"""
-Test that we can generate Visual Studio 8.0 project (.vcproj) and
-solution (.sln) files that look correct.
-"""
-
-import os
-
-import TestSConsMSVS
-
-test = TestSConsMSVS.TestSConsMSVS()
-host_arch = test.get_vs_host_arch()
-
-
-# Make the test infrastructure think we have this version of MSVS installed.
-test._msvs_versions = ['8.0']
-
-
-
-expected_slnfile = TestSConsMSVS.expected_slnfile_8_0
-expected_vcprojfile = TestSConsMSVS.expected_vcprojfile_8_0
-SConscript_contents = TestSConsMSVS.SConscript_contents_8_0
-
-
-
-test.write('SConstruct', SConscript_contents%{'HOST_ARCH': host_arch})
-
-test.run(arguments="Test.vcproj")
-
-test.must_exist(test.workpath('Test.vcproj'))
-vcproj = test.read('Test.vcproj', 'r')
-expect = test.msvs_substitute(expected_vcprojfile, '8.0', None, 'SConstruct')
-# don't compare the pickled data
-assert vcproj[:len(expect)] == expect, test.diff_substr(expect, vcproj)
-
-test.must_exist(test.workpath('Test.sln'))
-sln = test.read('Test.sln', 'r')
-expect = test.msvs_substitute(expected_slnfile, '8.0', None, 'SConstruct')
-# don't compare the pickled data
-assert sln[:len(expect)] == expect, test.diff_substr(expect, sln)
-
-test.run(arguments='-c .')
-
-test.must_not_exist(test.workpath('Test.vcproj'))
-test.must_not_exist(test.workpath('Test.sln'))
-
-test.run(arguments='Test.vcproj')
-
-test.must_exist(test.workpath('Test.vcproj'))
-test.must_exist(test.workpath('Test.sln'))
-
-test.run(arguments='-c Test.sln')
-
-test.must_not_exist(test.workpath('Test.vcproj'))
-test.must_not_exist(test.workpath('Test.sln'))
-
-
-
-# Test that running SCons with $PYTHON_ROOT in the environment
-# changes the .vcproj output as expected.
-os.environ['PYTHON_ROOT'] = 'xyzzy'
-python = os.path.join('$(PYTHON_ROOT)', os.path.split(TestSConsMSVS.python)[1])
-
-test.run(arguments='Test.vcproj')
-
-test.must_exist(test.workpath('Test.vcproj'))
-vcproj = test.read('Test.vcproj', 'r')
-expect = test.msvs_substitute(expected_vcprojfile, '8.0', None, 'SConstruct',
- python=python)
-# don't compare the pickled data
-assert vcproj[:len(expect)] == expect, test.diff_substr(expect, vcproj)
-
-
-
-test.pass_test()
-
-# Local Variables:
-# tab-width:4
-# indent-tabs-mode:nil
-# End:
-# vim: set expandtab tabstop=4 shiftwidth=4:
diff --git a/test/MSVS/vs-8.0-scc-files.py b/test/MSVS/vs-8.0-scc-files.py
deleted file mode 100644
index 05a8a5f..0000000
--- a/test/MSVS/vs-8.0-scc-files.py
+++ /dev/null
@@ -1,115 +0,0 @@
-#!/usr/bin/env python
-#
-# __COPYRIGHT__
-#
-# Permission is hereby granted, free of charge, to any person obtaining
-# a copy of this software and associated documentation files (the
-# "Software"), to deal in the Software without restriction, including
-# without limitation the rights to use, copy, modify, merge, publish,
-# distribute, sublicense, and/or sell copies of the Software, and to
-# permit persons to whom the Software is furnished to do so, subject to
-# the following conditions:
-#
-# The above copyright notice and this permission notice shall be included
-# in all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
-# KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
-# WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-#
-
-__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
-
-"""
-Test that we can generate Visual Studio 8.0 project (.vcproj) and
-solution (.sln) files that contain SCC information and look correct.
-"""
-
-import os
-
-import TestSConsMSVS
-
-test = TestSConsMSVS.TestSConsMSVS()
-
-# Make the test infrastructure think we have this version of MSVS installed.
-test._msvs_versions = ['8.0']
-
-
-
-expected_slnfile = TestSConsMSVS.expected_slnfile_8_0
-expected_vcprojfile = TestSConsMSVS.expected_vcprojfile_8_0
-SConscript_contents = """\
-env=Environment(platform='win32', tools=['msvs'], MSVS_VERSION='8.0',
- CPPDEFINES=['DEF1', 'DEF2',('DEF3','1234')],
- CPPPATH=['inc1', 'inc2'],
- MSVS_SCC_CONNECTION_ROOT='.',
- MSVS_SCC_PROVIDER='MSSCCI:Perforce SCM',
- MSVS_SCC_PROJECT_NAME='Perforce Project')
-
-testsrc = ['test1.cpp', 'test2.cpp']
-testincs = ['sdk.h']
-testlocalincs = ['test.h']
-testresources = ['test.rc']
-testmisc = ['readme.txt']
-
-env.MSVSProject(target = 'Test.vcproj',
- srcs = testsrc,
- incs = testincs,
- localincs = testlocalincs,
- resources = testresources,
- misc = testmisc,
- buildtarget = 'Test.exe',
- variant = 'Release')
-"""
-
-expected_sln_sccinfo = """\
-\tGlobalSection(SourceCodeControl) = preSolution
-\t\tSccNumberOfProjects = 2
-\t\tSccProjectName0 = Perforce\\u0020Project
-\t\tSccLocalPath0 = .
-\t\tSccProvider0 = MSSCCI:Perforce\\u0020SCM
-\t\tCanCheckoutShared = true
-\t\tSccProjectUniqueName1 = Test.vcproj
-\t\tSccLocalPath1 = .
-\t\tCanCheckoutShared = true
-\t\tSccProjectFilePathRelativizedFromConnection1 = .\\\\
-\tEndGlobalSection
-"""
-
-expected_vcproj_sccinfo = """\
-\tSccProjectName="Perforce Project"
-\tSccLocalPath="."
-\tSccProvider="MSSCCI:Perforce SCM"
-"""
-
-
-test.write('SConstruct', SConscript_contents)
-
-test.run(arguments="Test.vcproj")
-
-test.must_exist(test.workpath('Test.vcproj'))
-vcproj = test.read('Test.vcproj', 'r')
-expect = test.msvs_substitute(expected_vcprojfile, '8.0', None, 'SConstruct',
- vcproj_sccinfo=expected_vcproj_sccinfo)
-# don't compare the pickled data
-assert vcproj[:len(expect)] == expect, test.diff_substr(expect, vcproj)
-
-test.must_exist(test.workpath('Test.sln'))
-sln = test.read('Test.sln', 'r')
-expect = test.msvs_substitute(expected_slnfile, '8.0', None, 'SConstruct',
- sln_sccinfo=expected_sln_sccinfo)
-# don't compare the pickled data
-assert sln[:len(expect)] == expect, test.diff_substr(expect, sln)
-
-
-test.pass_test()
-
-# Local Variables:
-# tab-width:4
-# indent-tabs-mode:nil
-# End:
-# vim: set expandtab tabstop=4 shiftwidth=4:
diff --git a/test/MSVS/vs-8.0-scc-legacy-files.py b/test/MSVS/vs-8.0-scc-legacy-files.py
deleted file mode 100644
index bfb8416..0000000
--- a/test/MSVS/vs-8.0-scc-legacy-files.py
+++ /dev/null
@@ -1,98 +0,0 @@
-#!/usr/bin/env python
-#
-# __COPYRIGHT__
-#
-# Permission is hereby granted, free of charge, to any person obtaining
-# a copy of this software and associated documentation files (the
-# "Software"), to deal in the Software without restriction, including
-# without limitation the rights to use, copy, modify, merge, publish,
-# distribute, sublicense, and/or sell copies of the Software, and to
-# permit persons to whom the Software is furnished to do so, subject to
-# the following conditions:
-#
-# The above copyright notice and this permission notice shall be included
-# in all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
-# KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
-# WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-#
-
-__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
-
-"""
-Test that we can generate Visual Studio 8.0 project (.vcproj) and
-solution (.sln) files that contain SCC information and look correct.
-"""
-
-import os
-
-import TestSConsMSVS
-
-test = TestSConsMSVS.TestSConsMSVS()
-
-# Make the test infrastructure think we have this version of MSVS installed.
-test._msvs_versions = ['8.0']
-
-
-
-expected_slnfile = TestSConsMSVS.expected_slnfile_8_0
-expected_vcprojfile = TestSConsMSVS.expected_vcprojfile_8_0
-SConscript_contents = """\
-env=Environment(platform='win32', tools=['msvs'], MSVS_VERSION='8.0',
- CPPDEFINES=['DEF1', 'DEF2',('DEF3','1234')],
- CPPPATH=['inc1', 'inc2'],
- MSVS_SCC_LOCAL_PATH=r'C:\\MyMsVsProjects',
- MSVS_SCC_PROJECT_NAME='Perforce Project')
-
-testsrc = ['test1.cpp', 'test2.cpp']
-testincs = ['sdk.h']
-testlocalincs = ['test.h']
-testresources = ['test.rc']
-testmisc = ['readme.txt']
-
-env.MSVSProject(target = 'Test.vcproj',
- srcs = testsrc,
- incs = testincs,
- localincs = testlocalincs,
- resources = testresources,
- misc = testmisc,
- buildtarget = 'Test.exe',
- variant = 'Release')
-"""
-
-expected_vcproj_sccinfo = """\
-\tSccProjectName="Perforce Project"
-\tSccLocalPath="C:\\MyMsVsProjects"
-"""
-
-
-test.write('SConstruct', SConscript_contents)
-
-test.run(arguments="Test.vcproj")
-
-test.must_exist(test.workpath('Test.vcproj'))
-vcproj = test.read('Test.vcproj', 'r')
-expect = test.msvs_substitute(expected_vcprojfile, '8.0', None, 'SConstruct',
- vcproj_sccinfo=expected_vcproj_sccinfo)
-# don't compare the pickled data
-assert vcproj[:len(expect)] == expect, test.diff_substr(expect, vcproj)
-
-test.must_exist(test.workpath('Test.sln'))
-sln = test.read('Test.sln', 'r')
-expect = test.msvs_substitute(expected_slnfile, '8.0', None, 'SConstruct')
-# don't compare the pickled data
-assert sln[:len(expect)] == expect, test.diff_substr(expect, sln)
-
-
-test.pass_test()
-
-# Local Variables:
-# tab-width:4
-# indent-tabs-mode:nil
-# End:
-# vim: set expandtab tabstop=4 shiftwidth=4:
diff --git a/test/MSVS/vs-8.0-variant_dir.py b/test/MSVS/vs-8.0-variant_dir.py
deleted file mode 100644
index 20c7381..0000000
--- a/test/MSVS/vs-8.0-variant_dir.py
+++ /dev/null
@@ -1,95 +0,0 @@
-#!/usr/bin/env python
-#
-# __COPYRIGHT__
-#
-# Permission is hereby granted, free of charge, to any person obtaining
-# a copy of this software and associated documentation files (the
-# "Software"), to deal in the Software without restriction, including
-# without limitation the rights to use, copy, modify, merge, publish,
-# distribute, sublicense, and/or sell copies of the Software, and to
-# permit persons to whom the Software is furnished to do so, subject to
-# the following conditions:
-#
-# The above copyright notice and this permission notice shall be included
-# in all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
-# KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
-# WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-#
-
-__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
-
-"""
-Test that we can generate Visual Studio 8.0 project (.vcproj) and
-solution (.sln) files that look correct when using a variant_dir.
-"""
-
-import TestSConsMSVS
-
-test = TestSConsMSVS.TestSConsMSVS()
-host_arch = test.get_vs_host_arch()
-
-
-# Make the test infrastructure think we have this version of MSVS installed.
-test._msvs_versions = ['8.0']
-
-
-
-expected_slnfile = TestSConsMSVS.expected_slnfile_8_0
-expected_vcprojfile = TestSConsMSVS.expected_vcprojfile_8_0
-SConscript_contents = TestSConsMSVS.SConscript_contents_8_0
-
-
-
-test.subdir('src')
-
-test.write('SConstruct', """\
-SConscript('src/SConscript', variant_dir='build')
-""")
-
-test.write(['src', 'SConscript'], SConscript_contents%{'HOST_ARCH': host_arch})
-
-test.run(arguments=".")
-
-project_guid = "{25F6CE89-8E22-2910-8B6E-FFE6DC1E2792}"
-vcproj = test.read(['src', 'Test.vcproj'], 'r')
-expect = test.msvs_substitute(expected_vcprojfile, '8.0', None, 'SConstruct',
- project_guid=project_guid)
-# don't compare the pickled data
-assert vcproj[:len(expect)] == expect, test.diff_substr(expect, vcproj)
-
-test.must_exist(test.workpath('src', 'Test.sln'))
-sln = test.read(['src', 'Test.sln'], 'r')
-expect = test.msvs_substitute(expected_slnfile, '8.0', 'src',
- project_guid=project_guid)
-# don't compare the pickled data
-assert sln[:len(expect)] == expect, test.diff_substr(expect, sln)
-
-test.must_match(['build', 'Test.vcproj'], """\
-This is just a placeholder file.
-The real project file is here:
-%s
-""" % test.workpath('src', 'Test.vcproj'),
- mode='r')
-
-test.must_match(['build', 'Test.sln'], """\
-This is just a placeholder file.
-The real workspace file is here:
-%s
-""" % test.workpath('src', 'Test.sln'),
- mode='r')
-
-
-
-test.pass_test()
-
-# Local Variables:
-# tab-width:4
-# indent-tabs-mode:nil
-# End:
-# vim: set expandtab tabstop=4 shiftwidth=4:
diff --git a/test/MSVS/vs-8.0-x64-files.py b/test/MSVS/vs-8.0-x64-files.py
deleted file mode 100644
index 072ba22..0000000
--- a/test/MSVS/vs-8.0-x64-files.py
+++ /dev/null
@@ -1,114 +0,0 @@
-#!/usr/bin/env python
-#
-# __COPYRIGHT__
-#
-# Permission is hereby granted, free of charge, to any person obtaining
-# a copy of this software and associated documentation files (the
-# "Software"), to deal in the Software without restriction, including
-# without limitation the rights to use, copy, modify, merge, publish,
-# distribute, sublicense, and/or sell copies of the Software, and to
-# permit persons to whom the Software is furnished to do so, subject to
-# the following conditions:
-#
-# The above copyright notice and this permission notice shall be included
-# in all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
-# KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
-# WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-#
-
-__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
-
-"""
-Test that we can generate Visual Studio 8.0 project (.vcproj) and
-solution (.sln) files that look correct.
-"""
-
-import os
-
-import TestSConsMSVS
-
-test = TestSConsMSVS.TestSConsMSVS()
-host_arch = test.get_vs_host_arch()
-
-
-
-# Make the test infrastructure think we have this version of MSVS installed.
-test._msvs_versions = ['8.0']
-
-
-
-expected_slnfile = TestSConsMSVS.expected_slnfile_8_0
-expected_vcprojfile = TestSConsMSVS.expected_vcprojfile_8_0
-SConscript_contents = TestSConsMSVS.SConscript_contents_8_0
-
-# We didn't create an API for putting parameters like this into
-# the common generated and expected files. Until we do, just patch
-# in the values.
-expected_slnfile = expected_slnfile.replace('Win32', 'x64')
-expected_vcprojfile = expected_vcprojfile.replace('Win32', 'x64')
-SConscript_contents = SConscript_contents.replace('\'Release\'', '\'Release|x64\'')
-
-
-
-test.write('SConstruct', SConscript_contents%{'HOST_ARCH': host_arch})
-
-test.run(arguments="Test.vcproj")
-
-test.must_exist(test.workpath('Test.vcproj'))
-vcproj = test.read('Test.vcproj', 'r')
-expect = test.msvs_substitute(expected_vcprojfile, '8.0', None, 'SConstruct')
-# don't compare the pickled data
-assert vcproj[:len(expect)] == expect, test.diff_substr(expect, vcproj)
-
-test.must_exist(test.workpath('Test.sln'))
-sln = test.read('Test.sln', 'r')
-expect = test.msvs_substitute(expected_slnfile, '8.0', None, 'SConstruct')
-# don't compare the pickled data
-assert sln[:len(expect)] == expect, test.diff_substr(expect, sln)
-
-test.run(arguments='-c .')
-
-test.must_not_exist(test.workpath('Test.vcproj'))
-test.must_not_exist(test.workpath('Test.sln'))
-
-test.run(arguments='Test.vcproj')
-
-test.must_exist(test.workpath('Test.vcproj'))
-test.must_exist(test.workpath('Test.sln'))
-
-test.run(arguments='-c Test.sln')
-
-test.must_not_exist(test.workpath('Test.vcproj'))
-test.must_not_exist(test.workpath('Test.sln'))
-
-
-
-# Test that running SCons with $PYTHON_ROOT in the environment
-# changes the .vcproj output as expected.
-os.environ['PYTHON_ROOT'] = 'xyzzy'
-python = os.path.join('$(PYTHON_ROOT)', os.path.split(TestSConsMSVS.python)[1])
-
-test.run(arguments='Test.vcproj')
-
-test.must_exist(test.workpath('Test.vcproj'))
-vcproj = test.read('Test.vcproj', 'r')
-expect = test.msvs_substitute(expected_vcprojfile, '8.0', None, 'SConstruct',
- python=python)
-# don't compare the pickled data
-assert vcproj[:len(expect)] == expect, test.diff_substr(expect, vcproj)
-
-
-
-test.pass_test()
-
-# Local Variables:
-# tab-width:4
-# indent-tabs-mode:nil
-# End:
-# vim: set expandtab tabstop=4 shiftwidth=4:
diff --git a/test/MSVS/vs-9.0-files.py b/test/MSVS/vs-9.0-files.py
deleted file mode 100644
index eccca51..0000000
--- a/test/MSVS/vs-9.0-files.py
+++ /dev/null
@@ -1,106 +0,0 @@
-#!/usr/bin/env python
-#
-# __COPYRIGHT__
-#
-# Permission is hereby granted, free of charge, to any person obtaining
-# a copy of this software and associated documentation files (the
-# "Software"), to deal in the Software without restriction, including
-# without limitation the rights to use, copy, modify, merge, publish,
-# distribute, sublicense, and/or sell copies of the Software, and to
-# permit persons to whom the Software is furnished to do so, subject to
-# the following conditions:
-#
-# The above copyright notice and this permission notice shall be included
-# in all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
-# KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
-# WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-#
-
-__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
-
-"""
-Test that we can generate Visual Studio 9.0 project (.vcproj) and
-solution (.sln) files that look correct.
-"""
-
-import os
-
-import TestSConsMSVS
-
-test = TestSConsMSVS.TestSConsMSVS()
-host_arch = test.get_vs_host_arch()
-
-
-# Make the test infrastructure think we have this version of MSVS installed.
-test._msvs_versions = ['9.0']
-
-
-
-expected_slnfile = TestSConsMSVS.expected_slnfile_9_0
-expected_vcprojfile = TestSConsMSVS.expected_vcprojfile_9_0
-SConscript_contents = TestSConsMSVS.SConscript_contents_9_0
-
-
-
-test.write('SConstruct', SConscript_contents%{'HOST_ARCH': host_arch})
-
-test.run(arguments="Test.vcproj")
-
-test.must_exist(test.workpath('Test.vcproj'))
-vcproj = test.read('Test.vcproj', 'r')
-expect = test.msvs_substitute(expected_vcprojfile, '9.0', None, 'SConstruct')
-# don't compare the pickled data
-assert vcproj[:len(expect)] == expect, test.diff_substr(expect, vcproj)
-
-test.must_exist(test.workpath('Test.sln'))
-sln = test.read('Test.sln', 'r')
-expect = test.msvs_substitute(expected_slnfile, '9.0', None, 'SConstruct')
-# don't compare the pickled data
-assert sln[:len(expect)] == expect, test.diff_substr(expect, sln)
-
-test.run(arguments='-c .')
-
-test.must_not_exist(test.workpath('Test.vcproj'))
-test.must_not_exist(test.workpath('Test.sln'))
-
-test.run(arguments='Test.vcproj')
-
-test.must_exist(test.workpath('Test.vcproj'))
-test.must_exist(test.workpath('Test.sln'))
-
-test.run(arguments='-c Test.sln')
-
-test.must_not_exist(test.workpath('Test.vcproj'))
-test.must_not_exist(test.workpath('Test.sln'))
-
-
-
-# Test that running SCons with $PYTHON_ROOT in the environment
-# changes the .vcproj output as expected.
-os.environ['PYTHON_ROOT'] = 'xyzzy'
-python = os.path.join('$(PYTHON_ROOT)', os.path.split(TestSConsMSVS.python)[1])
-
-test.run(arguments='Test.vcproj')
-
-test.must_exist(test.workpath('Test.vcproj'))
-vcproj = test.read('Test.vcproj', 'r')
-expect = test.msvs_substitute(expected_vcprojfile, '9.0', None, 'SConstruct',
- python=python)
-# don't compare the pickled data
-assert vcproj[:len(expect)] == expect, test.diff_substr(expect, vcproj)
-
-
-
-test.pass_test()
-
-# Local Variables:
-# tab-width:4
-# indent-tabs-mode:nil
-# End:
-# vim: set expandtab tabstop=4 shiftwidth=4:
diff --git a/test/MSVS/vs-9.0-scc-files.py b/test/MSVS/vs-9.0-scc-files.py
deleted file mode 100644
index c270010..0000000
--- a/test/MSVS/vs-9.0-scc-files.py
+++ /dev/null
@@ -1,115 +0,0 @@
-#!/usr/bin/env python
-#
-# __COPYRIGHT__
-#
-# Permission is hereby granted, free of charge, to any person obtaining
-# a copy of this software and associated documentation files (the
-# "Software"), to deal in the Software without restriction, including
-# without limitation the rights to use, copy, modify, merge, publish,
-# distribute, sublicense, and/or sell copies of the Software, and to
-# permit persons to whom the Software is furnished to do so, subject to
-# the following conditions:
-#
-# The above copyright notice and this permission notice shall be included
-# in all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
-# KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
-# WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-#
-
-__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
-
-"""
-Test that we can generate Visual Studio 9.0 project (.vcproj) and
-solution (.sln) files that contain SCC information and look correct.
-"""
-
-import os
-
-import TestSConsMSVS
-
-test = TestSConsMSVS.TestSConsMSVS()
-
-# Make the test infrastructure think we have this version of MSVS installed.
-test._msvs_versions = ['9.0']
-
-
-
-expected_slnfile = TestSConsMSVS.expected_slnfile_9_0
-expected_vcprojfile = TestSConsMSVS.expected_vcprojfile_9_0
-SConscript_contents = """\
-env=Environment(platform='win32', tools=['msvs'], MSVS_VERSION='9.0',
- CPPDEFINES=['DEF1', 'DEF2',('DEF3','1234')],
- CPPPATH=['inc1', 'inc2'],
- MSVS_SCC_CONNECTION_ROOT='.',
- MSVS_SCC_PROVIDER='MSSCCI:Perforce SCM',
- MSVS_SCC_PROJECT_NAME='Perforce Project')
-
-testsrc = ['test1.cpp', 'test2.cpp']
-testincs = ['sdk.h']
-testlocalincs = ['test.h']
-testresources = ['test.rc']
-testmisc = ['readme.txt']
-
-env.MSVSProject(target = 'Test.vcproj',
- srcs = testsrc,
- incs = testincs,
- localincs = testlocalincs,
- resources = testresources,
- misc = testmisc,
- buildtarget = 'Test.exe',
- variant = 'Release')
-"""
-
-expected_sln_sccinfo = """\
-\tGlobalSection(SourceCodeControl) = preSolution
-\t\tSccNumberOfProjects = 2
-\t\tSccProjectName0 = Perforce\\u0020Project
-\t\tSccLocalPath0 = .
-\t\tSccProvider0 = MSSCCI:Perforce\\u0020SCM
-\t\tCanCheckoutShared = true
-\t\tSccProjectUniqueName1 = Test.vcproj
-\t\tSccLocalPath1 = .
-\t\tCanCheckoutShared = true
-\t\tSccProjectFilePathRelativizedFromConnection1 = .\\\\
-\tEndGlobalSection
-"""
-
-expected_vcproj_sccinfo = """\
-\tSccProjectName="Perforce Project"
-\tSccLocalPath="."
-\tSccProvider="MSSCCI:Perforce SCM"
-"""
-
-
-test.write('SConstruct', SConscript_contents)
-
-test.run(arguments="Test.vcproj")
-
-test.must_exist(test.workpath('Test.vcproj'))
-vcproj = test.read('Test.vcproj', 'r')
-expect = test.msvs_substitute(expected_vcprojfile, '9.0', None, 'SConstruct',
- vcproj_sccinfo=expected_vcproj_sccinfo)
-# don't compare the pickled data
-assert vcproj[:len(expect)] == expect, test.diff_substr(expect, vcproj)
-
-test.must_exist(test.workpath('Test.sln'))
-sln = test.read('Test.sln', 'r')
-expect = test.msvs_substitute(expected_slnfile, '9.0', None, 'SConstruct',
- sln_sccinfo=expected_sln_sccinfo)
-# don't compare the pickled data
-assert sln[:len(expect)] == expect, test.diff_substr(expect, sln)
-
-
-test.pass_test()
-
-# Local Variables:
-# tab-width:4
-# indent-tabs-mode:nil
-# End:
-# vim: set expandtab tabstop=4 shiftwidth=4:
diff --git a/test/MSVS/vs-9.0-scc-legacy-files.py b/test/MSVS/vs-9.0-scc-legacy-files.py
deleted file mode 100644
index 0085f64..0000000
--- a/test/MSVS/vs-9.0-scc-legacy-files.py
+++ /dev/null
@@ -1,98 +0,0 @@
-#!/usr/bin/env python
-#
-# __COPYRIGHT__
-#
-# Permission is hereby granted, free of charge, to any person obtaining
-# a copy of this software and associated documentation files (the
-# "Software"), to deal in the Software without restriction, including
-# without limitation the rights to use, copy, modify, merge, publish,
-# distribute, sublicense, and/or sell copies of the Software, and to
-# permit persons to whom the Software is furnished to do so, subject to
-# the following conditions:
-#
-# The above copyright notice and this permission notice shall be included
-# in all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
-# KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
-# WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-#
-
-__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
-
-"""
-Test that we can generate Visual Studio 9.0 project (.vcproj) and
-solution (.sln) files that contain SCC information and look correct.
-"""
-
-import os
-
-import TestSConsMSVS
-
-test = TestSConsMSVS.TestSConsMSVS()
-
-# Make the test infrastructure think we have this version of MSVS installed.
-test._msvs_versions = ['9.0']
-
-
-
-expected_slnfile = TestSConsMSVS.expected_slnfile_9_0
-expected_vcprojfile = TestSConsMSVS.expected_vcprojfile_9_0
-SConscript_contents = """\
-env=Environment(platform='win32', tools=['msvs'], MSVS_VERSION='9.0',
- CPPDEFINES=['DEF1', 'DEF2',('DEF3','1234')],
- CPPPATH=['inc1', 'inc2'],
- MSVS_SCC_LOCAL_PATH=r'C:\\MyMsVsProjects',
- MSVS_SCC_PROJECT_NAME='Perforce Project')
-
-testsrc = ['test1.cpp', 'test2.cpp']
-testincs = ['sdk.h']
-testlocalincs = ['test.h']
-testresources = ['test.rc']
-testmisc = ['readme.txt']
-
-env.MSVSProject(target = 'Test.vcproj',
- srcs = testsrc,
- incs = testincs,
- localincs = testlocalincs,
- resources = testresources,
- misc = testmisc,
- buildtarget = 'Test.exe',
- variant = 'Release')
-"""
-
-expected_vcproj_sccinfo = """\
-\tSccProjectName="Perforce Project"
-\tSccLocalPath="C:\\MyMsVsProjects"
-"""
-
-
-test.write('SConstruct', SConscript_contents)
-
-test.run(arguments="Test.vcproj")
-
-test.must_exist(test.workpath('Test.vcproj'))
-vcproj = test.read('Test.vcproj', 'r')
-expect = test.msvs_substitute(expected_vcprojfile, '9.0', None, 'SConstruct',
- vcproj_sccinfo=expected_vcproj_sccinfo)
-# don't compare the pickled data
-assert vcproj[:len(expect)] == expect, test.diff_substr(expect, vcproj)
-
-test.must_exist(test.workpath('Test.sln'))
-sln = test.read('Test.sln', 'r')
-expect = test.msvs_substitute(expected_slnfile, '9.0', None, 'SConstruct')
-# don't compare the pickled data
-assert sln[:len(expect)] == expect, test.diff_substr(expect, sln)
-
-
-test.pass_test()
-
-# Local Variables:
-# tab-width:4
-# indent-tabs-mode:nil
-# End:
-# vim: set expandtab tabstop=4 shiftwidth=4:
diff --git a/test/MSVS/vs-files.py b/test/MSVS/vs-files.py
new file mode 100644
index 0000000..b330ce7
--- /dev/null
+++ b/test/MSVS/vs-files.py
@@ -0,0 +1,112 @@
+#!/usr/bin/env python
+#
+# __COPYRIGHT__
+#
+# Permission is hereby granted, free of charge, to any person obtaining
+# a copy of this software and associated documentation files (the
+# "Software"), to deal in the Software without restriction, including
+# without limitation the rights to use, copy, modify, merge, publish,
+# distribute, sublicense, and/or sell copies of the Software, and to
+# permit persons to whom the Software is furnished to do so, subject to
+# the following conditions:
+#
+# The above copyright notice and this permission notice shall be included
+# in all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
+# KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
+# WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+#
+
+__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
+
+"""
+Test that we can generate Visual Studio 10.0 or later project (.vcxproj) and
+solution (.sln) files that look correct.
+"""
+
+import os
+
+import TestSConsMSVS
+
+for vc_version in TestSConsMSVS.get_tested_proj_file_vc_versions():
+ test = TestSConsMSVS.TestSConsMSVS()
+ host_arch = test.get_vs_host_arch()
+
+ # Make the test infrastructure think we have this version of MSVS installed.
+ test._msvs_versions = [vc_version]
+
+ dirs = ['inc1', 'inc2']
+ major, minor = test.parse_vc_version(vc_version)
+ project_file = 'Test.vcproj' if major <= 9 else 'Test.vcxproj'
+ filters_file = project_file + '.filters'
+ filters_file_expected = major >= 10
+ expected_slnfile = test.get_expected_sln_file_contents(vc_version, project_file)
+ expected_vcprojfile = test.get_expected_proj_file_contents(vc_version, dirs, project_file)
+
+ test.write('SConstruct', test.get_expected_sconscript_file_contents(vc_version, project_file))
+
+ test.run(arguments=project_file)
+
+ test.must_exist(test.workpath(project_file))
+ if filters_file_expected:
+ test.must_exist(test.workpath(filters_file))
+ else:
+ test.must_not_exist(test.workpath(filters_file))
+ vcxproj = test.read(project_file, 'r')
+ expect = test.msvs_substitute(expected_vcprojfile, vc_version, None, 'SConstruct')
+ # don't compare the pickled data
+ assert vcxproj[:len(expect)] == expect, test.diff_substr(expect, vcxproj)
+
+ test.must_exist(test.workpath('Test.sln'))
+ sln = test.read('Test.sln', 'r')
+ expect = test.msvs_substitute(expected_slnfile, vc_version, None, 'SConstruct')
+ # don't compare the pickled data
+ assert sln[:len(expect)] == expect, test.diff_substr(expect, sln)
+
+ test.run(arguments='-c .')
+
+ test.must_not_exist(test.workpath(project_file))
+ test.must_not_exist(test.workpath(filters_file))
+ test.must_not_exist(test.workpath('Test.sln'))
+
+ test.run(arguments=project_file)
+
+ test.must_exist(test.workpath(project_file))
+ if filters_file_expected:
+ test.must_exist(test.workpath(filters_file))
+ else:
+ test.must_not_exist(test.workpath(filters_file))
+ test.must_exist(test.workpath('Test.sln'))
+
+ test.run(arguments='-c Test.sln')
+
+ test.must_not_exist(test.workpath(project_file))
+ test.must_not_exist(test.workpath(filters_file))
+ test.must_not_exist(test.workpath('Test.sln'))
+
+ # Test that running SCons with $PYTHON_ROOT in the environment
+ # changes the .vcxproj output as expected.
+ os.environ['PYTHON_ROOT'] = 'xyzzy'
+ python = os.path.join('$(PYTHON_ROOT)', os.path.split(TestSConsMSVS.python)[1])
+
+ test.run(arguments=project_file)
+
+ test.must_exist(test.workpath(project_file))
+ vcxproj = test.read(project_file, 'r')
+ expect = test.msvs_substitute(expected_vcprojfile, vc_version, None, 'SConstruct',
+ python=python)
+ # don't compare the pickled data
+ assert vcxproj[:len(expect)] == expect, test.diff_substr(expect, vcxproj)
+
+ test.pass_test()
+
+# Local Variables:
+# tab-width:4
+# indent-tabs-mode:nil
+# End:
+# vim: set expandtab tabstop=4 shiftwidth=4:
diff --git a/test/MSVS/vs-10.0-scc-files.py b/test/MSVS/vs-scc-files.py
index 8a08ece..a02ba5c 100644
--- a/test/MSVS/vs-10.0-scc-files.py
+++ b/test/MSVS/vs-scc-files.py
@@ -33,17 +33,21 @@ import os
import TestSConsMSVS
-test = TestSConsMSVS.TestSConsMSVS()
-
-# Make the test infrastructure think we have this version of MSVS installed.
-test._msvs_versions = ['10.0']
-
-
-
-expected_slnfile = TestSConsMSVS.expected_slnfile_10_0
-expected_vcprojfile = TestSConsMSVS.expected_vcprojfile_10_0
-SConscript_contents = """\
-env=Environment(platform='win32', tools=['msvs'], MSVS_VERSION='10.0',
+for vc_version in TestSConsMSVS.get_tested_proj_file_vc_versions():
+ test = TestSConsMSVS.TestSConsMSVS()
+
+ # Make the test infrastructure think we have this version of MSVS installed.
+ test._msvs_versions = [vc_version]
+
+ dirs = ['inc1', 'inc2']
+ major, minor = test.parse_vc_version(vc_version)
+ project_file = 'Test.vcproj' if major <= 9 else 'Test.vcxproj'
+ filters_file = project_file + '.filters'
+ filters_file_expected = major >= 10
+ expected_slnfile = test.get_expected_sln_file_contents(vc_version, project_file)
+ expected_vcprojfile = test.get_expected_proj_file_contents(vc_version, dirs, project_file)
+ SConscript_contents = """\
+env=Environment(platform='win32', tools=['msvs'], MSVS_VERSION='{vc_version}',
CPPDEFINES=['DEF1', 'DEF2',('DEF3','1234')],
CPPPATH=['inc1', 'inc2'],
MSVS_SCC_CONNECTION_ROOT='.',
@@ -56,7 +60,7 @@ testlocalincs = ['test.h']
testresources = ['test.rc']
testmisc = ['readme.txt']
-env.MSVSProject(target = 'Test.vcxproj',
+env.MSVSProject(target = '{project_file}',
srcs = testsrc,
incs = testincs,
localincs = testlocalincs,
@@ -64,49 +68,58 @@ env.MSVSProject(target = 'Test.vcxproj',
misc = testmisc,
buildtarget = 'Test.exe',
variant = 'Release')
-"""
+""".format(vc_version=vc_version, project_file=project_file)
-expected_sln_sccinfo = """\
+ expected_sln_sccinfo = """\
\tGlobalSection(SourceCodeControl) = preSolution
\t\tSccNumberOfProjects = 2
\t\tSccProjectName0 = Perforce\\u0020Project
\t\tSccLocalPath0 = .
\t\tSccProvider0 = MSSCCI:Perforce\\u0020SCM
\t\tCanCheckoutShared = true
-\t\tSccProjectUniqueName1 = Test.vcxproj
+\t\tSccProjectUniqueName1 = {project_file}
\t\tSccLocalPath1 = .
\t\tCanCheckoutShared = true
\t\tSccProjectFilePathRelativizedFromConnection1 = .\\\\
\tEndGlobalSection
+""".format(project_file=project_file)
+
+ if major < 10:
+ # VC8 and VC9 used key-value pair format.
+ expected_vcproj_sccinfo = """\
+\tSccProjectName="Perforce Project"
+\tSccLocalPath="."
+\tSccProvider="MSSCCI:Perforce SCM"
"""
-
-expected_vcproj_sccinfo = """\
+ else:
+ # VC10 and later use XML format.
+ expected_vcproj_sccinfo = """\
\t\t<SccProjectName>Perforce Project</SccProjectName>
\t\t<SccLocalPath>.</SccLocalPath>
\t\t<SccProvider>MSSCCI:Perforce SCM</SccProvider>
"""
-test.write('SConstruct', SConscript_contents)
+ test.write('SConstruct', SConscript_contents)
-test.run(arguments="Test.vcxproj")
+ test.run(arguments=project_file)
-test.must_exist(test.workpath('Test.vcxproj'))
-vcproj = test.read('Test.vcxproj', 'r')
-expect = test.msvs_substitute(expected_vcprojfile, '10.0', None, 'SConstruct',
- vcproj_sccinfo=expected_vcproj_sccinfo)
-# don't compare the pickled data
-assert vcproj[:len(expect)] == expect, test.diff_substr(expect, vcproj)
+ test.must_exist(test.workpath(project_file))
+ vcproj = test.read(project_file, 'r')
+ expect = test.msvs_substitute(expected_vcprojfile, vc_version, None, 'SConstruct',
+ vcproj_sccinfo=expected_vcproj_sccinfo)
+ # don't compare the pickled data
+ assert vcproj[:len(expect)] == expect, test.diff_substr(expect, vcproj)
-test.must_exist(test.workpath('Test.sln'))
-sln = test.read('Test.sln', 'r')
-expect = test.msvs_substitute(expected_slnfile, '10.0', None, 'SConstruct',
- sln_sccinfo=expected_sln_sccinfo)
-# don't compare the pickled data
-assert sln[:len(expect)] == expect, test.diff_substr(expect, sln)
+ test.must_exist(test.workpath('Test.sln'))
+ sln = test.read('Test.sln', 'r')
+ expect = test.msvs_substitute(expected_slnfile, vc_version, None, 'SConstruct',
+ sln_sccinfo=expected_sln_sccinfo)
+ # don't compare the pickled data
+ assert sln[:len(expect)] == expect, test.diff_substr(expect, sln)
-test.pass_test()
+ test.pass_test()
# Local Variables:
# tab-width:4
diff --git a/test/MSVS/vs-14.0-scc-legacy-files.py b/test/MSVS/vs-scc-legacy-files.py
index 904a103..813025a 100644
--- a/test/MSVS/vs-14.0-scc-legacy-files.py
+++ b/test/MSVS/vs-scc-legacy-files.py
@@ -25,7 +25,7 @@
__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
"""
-Test that we can generate Visual Studio 14.0 project (.vcxproj) and
+Test that we can generate Visual Studio 10.0 or later project (.vcxproj) and
solution (.sln) files that contain SCC information and look correct.
"""
@@ -33,17 +33,22 @@ import os
import TestSConsMSVS
-test = TestSConsMSVS.TestSConsMSVS()
+for vc_version in TestSConsMSVS.get_tested_proj_file_vc_versions():
+ test = TestSConsMSVS.TestSConsMSVS()
-# Make the test infrastructure think we have this version of MSVS installed.
-test._msvs_versions = ['14.0']
+ # Make the test infrastructure think we have this version of MSVS installed.
+ test._msvs_versions = [vc_version]
+ dirs = ['inc1', 'inc2']
+ major, minor = test.parse_vc_version(vc_version)
+ project_file = 'Test.vcproj' if major <= 9 else 'Test.vcxproj'
+ filters_file = project_file + '.filters'
+ filters_file_expected = major >= 10
+ expected_slnfile = test.get_expected_sln_file_contents(vc_version, project_file)
+ expected_vcprojfile = test.get_expected_proj_file_contents(vc_version, dirs, project_file)
-
-expected_slnfile = TestSConsMSVS.expected_slnfile_14_0
-expected_vcprojfile = TestSConsMSVS.expected_vcprojfile_14_0
-SConscript_contents = """\
-env=Environment(platform='win32', tools=['msvs'], MSVS_VERSION='14.0',
+ SConscript_contents = """\
+env=Environment(platform='win32', tools=['msvs'], MSVS_VERSION='{vc_version}',
CPPDEFINES=['DEF1', 'DEF2',('DEF3','1234')],
CPPPATH=['inc1', 'inc2'],
MSVS_SCC_LOCAL_PATH=r'C:\\MyMsVsProjects',
@@ -55,7 +60,7 @@ testlocalincs = ['test.h']
testresources = ['test.rc']
testmisc = ['readme.txt']
-env.MSVSProject(target = 'Test.vcxproj',
+env.MSVSProject(target = '{project_file}',
srcs = testsrc,
incs = testincs,
localincs = testlocalincs,
@@ -63,33 +68,40 @@ env.MSVSProject(target = 'Test.vcxproj',
misc = testmisc,
buildtarget = 'Test.exe',
variant = 'Release')
-"""
+""".format(vc_version=vc_version, project_file=project_file)
-expected_vcproj_sccinfo = """\
+ if major < 10:
+ # VC8 and VC9 used key-value pair format.
+ expected_vcproj_sccinfo = """\
+\tSccProjectName="Perforce Project"
+\tSccLocalPath="C:\\MyMsVsProjects"
+"""
+ else:
+ # VC10 and later use XML format.
+ expected_vcproj_sccinfo = """\
\t\t<SccProjectName>Perforce Project</SccProjectName>
\t\t<SccLocalPath>C:\\MyMsVsProjects</SccLocalPath>
"""
+ test.write('SConstruct', SConscript_contents)
-test.write('SConstruct', SConscript_contents)
-
-test.run(arguments="Test.vcxproj")
+ test.run(arguments=project_file)
-test.must_exist(test.workpath('Test.vcxproj'))
-vcproj = test.read('Test.vcxproj', 'r')
-expect = test.msvs_substitute(expected_vcprojfile, '14.0', None, 'SConstruct',
- vcproj_sccinfo=expected_vcproj_sccinfo)
-# don't compare the pickled data
-assert vcproj[:len(expect)] == expect, test.diff_substr(expect, vcproj)
+ test.must_exist(test.workpath(project_file))
+ vcproj = test.read(project_file, 'r')
+ expect = test.msvs_substitute(expected_vcprojfile, vc_version, None, 'SConstruct',
+ vcproj_sccinfo=expected_vcproj_sccinfo)
+ # don't compare the pickled data
+ assert vcproj[:len(expect)] == expect, test.diff_substr(expect, vcproj)
-test.must_exist(test.workpath('Test.sln'))
-sln = test.read('Test.sln', 'r')
-expect = test.msvs_substitute(expected_slnfile, '14.0', None, 'SConstruct')
-# don't compare the pickled data
-assert sln[:len(expect)] == expect, test.diff_substr(expect, sln)
+ test.must_exist(test.workpath('Test.sln'))
+ sln = test.read('Test.sln', 'r')
+ expect = test.msvs_substitute(expected_slnfile, vc_version, None, 'SConstruct')
+ # don't compare the pickled data
+ assert sln[:len(expect)] == expect, test.diff_substr(expect, sln)
-test.pass_test()
+ test.pass_test()
# Local Variables:
# tab-width:4
diff --git a/test/MSVS/vs-variant_dir.py b/test/MSVS/vs-variant_dir.py
new file mode 100644
index 0000000..15b46e8
--- /dev/null
+++ b/test/MSVS/vs-variant_dir.py
@@ -0,0 +1,93 @@
+#!/usr/bin/env python
+#
+# __COPYRIGHT__
+#
+# Permission is hereby granted, free of charge, to any person obtaining
+# a copy of this software and associated documentation files (the
+# "Software"), to deal in the Software without restriction, including
+# without limitation the rights to use, copy, modify, merge, publish,
+# distribute, sublicense, and/or sell copies of the Software, and to
+# permit persons to whom the Software is furnished to do so, subject to
+# the following conditions:
+#
+# The above copyright notice and this permission notice shall be included
+# in all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
+# KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
+# WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+#
+
+__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
+
+"""
+Test that we can generate Visual Studio 8.0 project (.vcproj) and
+solution (.sln) files that look correct when using a variant_dir.
+"""
+
+import TestSConsMSVS
+
+for vc_version in TestSConsMSVS.get_tested_proj_file_vc_versions():
+ test = TestSConsMSVS.TestSConsMSVS()
+ host_arch = test.get_vs_host_arch()
+
+ # Make the test infrastructure think we have this version of MSVS installed.
+ test._msvs_versions = [vc_version]
+
+ dirs = ['inc1', 'inc2']
+ major, minor = test.parse_vc_version(vc_version)
+ project_file = 'Test.vcproj' if major <= 9 else 'Test.vcxproj'
+ expected_slnfile = test.get_expected_sln_file_contents(vc_version, project_file)
+ expected_vcprojfile = test.get_expected_proj_file_contents(vc_version, dirs, project_file)
+
+ test.subdir('src')
+
+ test.write('SConstruct', """\
+SConscript('src/SConscript', variant_dir='build')
+""")
+
+ test.write('SConstruct', """\
+SConscript('src/SConscript', variant_dir='build')
+""")
+
+ test.write(['src', 'SConscript'], test.get_expected_sconscript_file_contents(vc_version, project_file))
+
+ test.run(arguments=".")
+
+ project_guid = "{25F6CE89-8E22-2910-8B6E-FFE6DC1E2792}"
+ vcproj = test.read(['src', project_file], 'r')
+ expect = test.msvs_substitute(expected_vcprojfile, vc_version, None, 'SConstruct',
+ project_guid=project_guid)
+ # don't compare the pickled data
+ assert vcproj[:len(expect)] == expect, test.diff_substr(expect, vcproj)
+
+ test.must_exist(test.workpath('src', 'Test.sln'))
+ sln = test.read(['src', 'Test.sln'], 'r')
+ expect = test.msvs_substitute(expected_slnfile, '8.0', 'src',
+ project_guid=project_guid)
+ # don't compare the pickled data
+ assert sln[:len(expect)] == expect, test.diff_substr(expect, sln)
+
+ test.must_match(['build', 'Test.vcproj'], """\
+This is just a placeholder file.
+The real project file is here:
+%s
+""" % test.workpath('src', project_file), mode='r')
+
+ test.must_match(['build', 'Test.sln'], """\
+This is just a placeholder file.
+The real workspace file is here:
+%s
+""" % test.workpath('src', 'Test.sln'), mode='r')
+
+ test.pass_test()
+
+# Local Variables:
+# tab-width:4
+# indent-tabs-mode:nil
+# End:
+# vim: set expandtab tabstop=4 shiftwidth=4: