From 74595efeb1a54f7be3aa5725200590fdcb06b41f Mon Sep 17 00:00:00 2001 From: Steven Knight Date: Wed, 24 Sep 2008 01:01:37 +0000 Subject: Move Visal Studio test data into QMTest/TestSConsMSVS.py. --- QMTest/TestSConsMSVS.py | 376 ++++++++++++++++++++++++++++++++++++++++++++++ test/MSVS/vs-7.0-files.py | 123 +-------------- test/MSVS/vs-7.1-files.py | 125 +-------------- test/MSVS/vs-8.0-files.py | 132 +--------------- 4 files changed, 385 insertions(+), 371 deletions(-) diff --git a/QMTest/TestSConsMSVS.py b/QMTest/TestSConsMSVS.py index 4bdc546..6f3f6db 100644 --- a/QMTest/TestSConsMSVS.py +++ b/QMTest/TestSConsMSVS.py @@ -24,6 +24,382 @@ import sys from TestSCons import * from TestSCons import __all__ + + +expected_slnfile_7_0 = """\ +Microsoft Visual Studio Solution File, Format Version 7.00 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Test", "Test.vcproj", "{E5466E26-0003-F18B-8F8A-BCD76C86388D}" +EndProject +Global +\tGlobalSection(SolutionConfiguration) = preSolution +\t\tConfigName.0 = Release +\tEndGlobalSection +\tGlobalSection(ProjectDependencies) = postSolution +\tEndGlobalSection +\tGlobalSection(ProjectConfiguration) = postSolution +\t\t{E5466E26-0003-F18B-8F8A-BCD76C86388D}.Release.ActiveCfg = Release|Win32 +\t\t{E5466E26-0003-F18B-8F8A-BCD76C86388D}.Release.Build.0 = Release|Win32 +\tEndGlobalSection +\tGlobalSection(ExtensibilityGlobals) = postSolution +\tEndGlobalSection +\tGlobalSection(ExtensibilityAddIns) = postSolution +\tEndGlobalSection +EndGlobal +""" + +expected_vcprojfile_7_0 = """\ + + +\t +\t\t +\t +\t +\t\t +\t\t\t +\t\t +\t +\t +\t\t +\t\t\t +\t\t\t +\t\t +\t\t +\t\t\t +\t\t\t +\t\t +\t\t +\t\t\t +\t\t\t +\t\t +\t\t +\t\t\t +\t\t\t +\t\t +\t\t +\t\t\t +\t\t\t +\t\t\t +\t\t\t +\t\t +\t\t +\t\t +\t +\t +\t + +""" + +SConscript_contents_7_0 = """\ +env=Environment(platform='win32', tools=['msvs'], MSVS_VERSION='7.0') + +testsrc = ['test1.cpp', 'test2.cpp'] +testincs = ['sdk.h'] +testlocalincs = ['test.h'] +testresources = ['test.rc'] +testmisc = ['readme.txt'] + +env.MSVSProject(target = 'Test.vcproj', + slnguid = '{SLNGUID}', + srcs = testsrc, + incs = testincs, + localincs = testlocalincs, + resources = testresources, + misc = testmisc, + buildtarget = 'Test.exe', + variant = 'Release') +""" + + + +expected_slnfile_7_1 = """\ +Microsoft Visual Studio Solution File, Format Version 8.00 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Test", "Test.vcproj", "{E5466E26-0003-F18B-8F8A-BCD76C86388D}" +\tProjectSection(ProjectDependencies) = postProject +\tEndProjectSection +EndProject +Global +\tGlobalSection(SolutionConfiguration) = preSolution +\t\tConfigName.0 = Release +\tEndGlobalSection +\tGlobalSection(ProjectConfiguration) = postSolution +\t\t{E5466E26-0003-F18B-8F8A-BCD76C86388D}.Release.ActiveCfg = Release|Win32 +\t\t{E5466E26-0003-F18B-8F8A-BCD76C86388D}.Release.Build.0 = Release|Win32 +\tEndGlobalSection +\tGlobalSection(ExtensibilityGlobals) = postSolution +\tEndGlobalSection +\tGlobalSection(ExtensibilityAddIns) = postSolution +\tEndGlobalSection +EndGlobal +""" + +expected_vcprojfile_7_1 = """\ + + +\t +\t\t +\t +\t +\t\t +\t\t\t +\t\t +\t +\t +\t +\t +\t\t +\t\t\t +\t\t\t +\t\t +\t\t +\t\t\t +\t\t\t +\t\t +\t\t +\t\t\t +\t\t\t +\t\t +\t\t +\t\t\t +\t\t\t +\t\t +\t\t +\t\t\t +\t\t\t +\t\t\t +\t\t\t +\t\t +\t\t +\t\t +\t +\t +\t + +""" + +SConscript_contents_7_1 = """\ +env=Environment(platform='win32', tools=['msvs'], MSVS_VERSION='7.1') + +testsrc = ['test1.cpp', 'test2.cpp'] +testincs = ['sdk.h'] +testlocalincs = ['test.h'] +testresources = ['test.rc'] +testmisc = ['readme.txt'] + +env.MSVSProject(target = 'Test.vcproj', + slnguid = '{SLNGUID}', + srcs = testsrc, + incs = testincs, + localincs = testlocalincs, + resources = testresources, + misc = testmisc, + buildtarget = 'Test.exe', + variant = 'Release') +""" + + + +expected_slnfile_8_0 = """\ +Microsoft Visual Studio Solution File, Format Version 9.00 +# Visual Studio 2005 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Test", "Test.vcproj", "{E5466E26-0003-F18B-8F8A-BCD76C86388D}" +EndProject +Global +\tGlobalSection(SolutionConfigurationPlatforms) = preSolution +\t\tRelease|Win32 = Release|Win32 +\tEndGlobalSection +\tGlobalSection(ProjectConfigurationPlatforms) = postSolution +\t\t{E5466E26-0003-F18B-8F8A-BCD76C86388D}.Release|Win32.ActiveCfg = Release|Win32 +\t\t{E5466E26-0003-F18B-8F8A-BCD76C86388D}.Release|Win32.Build.0 = Release|Win32 +\tEndGlobalSection +\tGlobalSection(SolutionProperties) = preSolution +\t\tHideSolutionNode = FALSE +\tEndGlobalSection +EndGlobal +""" + +expected_vcprojfile_8_0 = """\ + + +\t +\t\t +\t +\t +\t +\t +\t\t +\t\t\t +\t\t +\t +\t +\t +\t +\t\t +\t\t\t +\t\t\t +\t\t +\t\t +\t\t\t +\t\t\t +\t\t +\t\t +\t\t\t +\t\t\t +\t\t +\t\t +\t\t\t +\t\t\t +\t\t +\t\t +\t\t\t +\t\t\t +\t\t\t +\t\t\t +\t\t +\t\t +\t\t +\t +\t +\t + +""" + +SConscript_contents_8_0 = """\ +env=Environment(platform='win32', tools=['msvs'], MSVS_VERSION='8.0') + +testsrc = ['test1.cpp', 'test2.cpp'] +testincs = ['sdk.h'] +testlocalincs = ['test.h'] +testresources = ['test.rc'] +testmisc = ['readme.txt'] + +env.MSVSProject(target = 'Test.vcproj', + slnguid = '{SLNGUID}', + srcs = testsrc, + incs = testincs, + localincs = testlocalincs, + resources = testresources, + misc = testmisc, + buildtarget = 'Test.exe', + variant = 'Release') +""" + + + class TestSConsMSVS(TestSCons): """Subclass for testing MSVS-specific portions of SCons.""" diff --git a/test/MSVS/vs-7.0-files.py b/test/MSVS/vs-7.0-files.py index 5992c8c..abb3445 100644 --- a/test/MSVS/vs-7.0-files.py +++ b/test/MSVS/vs-7.0-files.py @@ -42,126 +42,9 @@ test._msvs_versions = ['7.0'] -expected_slnfile = """\ -Microsoft Visual Studio Solution File, Format Version 7.00 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Test", "Test.vcproj", "{E5466E26-0003-F18B-8F8A-BCD76C86388D}" -EndProject -Global -\tGlobalSection(SolutionConfiguration) = preSolution -\t\tConfigName.0 = Release -\tEndGlobalSection -\tGlobalSection(ProjectDependencies) = postSolution -\tEndGlobalSection -\tGlobalSection(ProjectConfiguration) = postSolution -\t\t{E5466E26-0003-F18B-8F8A-BCD76C86388D}.Release.ActiveCfg = Release|Win32 -\t\t{E5466E26-0003-F18B-8F8A-BCD76C86388D}.Release.Build.0 = Release|Win32 -\tEndGlobalSection -\tGlobalSection(ExtensibilityGlobals) = postSolution -\tEndGlobalSection -\tGlobalSection(ExtensibilityAddIns) = postSolution -\tEndGlobalSection -EndGlobal -""" - -expected_vcprojfile = """\ - - -\t -\t\t -\t -\t -\t\t -\t\t\t -\t\t -\t -\t -\t\t -\t\t\t -\t\t\t -\t\t -\t\t -\t\t\t -\t\t\t -\t\t -\t\t -\t\t\t -\t\t\t -\t\t -\t\t -\t\t\t -\t\t\t -\t\t -\t\t -\t\t\t -\t\t\t -\t\t\t -\t\t\t -\t\t -\t\t -\t\t -\t -\t -\t - -""" - - - -SConscript_contents = """\ -env=Environment(platform='win32', tools=['msvs'], MSVS_VERSION='7.0') - -testsrc = ['test1.cpp', 'test2.cpp'] -testincs = ['sdk.h'] -testlocalincs = ['test.h'] -testresources = ['test.rc'] -testmisc = ['readme.txt'] - -env.MSVSProject(target = 'Test.vcproj', - slnguid = '{SLNGUID}', - srcs = testsrc, - incs = testincs, - localincs = testlocalincs, - resources = testresources, - misc = testmisc, - buildtarget = 'Test.exe', - variant = 'Release') -""" +expected_slnfile = TestSConsMSVS.expected_slnfile_7_0 +expected_vcprojfile = TestSConsMSVS.expected_vcprojfile_7_0 +SConscript_contents = TestSConsMSVS.SConscript_contents_7_0 diff --git a/test/MSVS/vs-7.1-files.py b/test/MSVS/vs-7.1-files.py index b4b4e2d..f6e7136 100644 --- a/test/MSVS/vs-7.1-files.py +++ b/test/MSVS/vs-7.1-files.py @@ -42,128 +42,9 @@ test._msvs_versions = ['7.1'] -expected_slnfile = """\ -Microsoft Visual Studio Solution File, Format Version 8.00 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Test", "Test.vcproj", "{E5466E26-0003-F18B-8F8A-BCD76C86388D}" -\tProjectSection(ProjectDependencies) = postProject -\tEndProjectSection -EndProject -Global -\tGlobalSection(SolutionConfiguration) = preSolution -\t\tConfigName.0 = Release -\tEndGlobalSection -\tGlobalSection(ProjectConfiguration) = postSolution -\t\t{E5466E26-0003-F18B-8F8A-BCD76C86388D}.Release.ActiveCfg = Release|Win32 -\t\t{E5466E26-0003-F18B-8F8A-BCD76C86388D}.Release.Build.0 = Release|Win32 -\tEndGlobalSection -\tGlobalSection(ExtensibilityGlobals) = postSolution -\tEndGlobalSection -\tGlobalSection(ExtensibilityAddIns) = postSolution -\tEndGlobalSection -EndGlobal -""" - -expected_vcprojfile = """\ - - -\t -\t\t -\t -\t -\t\t -\t\t\t -\t\t -\t -\t -\t -\t -\t\t -\t\t\t -\t\t\t -\t\t -\t\t -\t\t\t -\t\t\t -\t\t -\t\t -\t\t\t -\t\t\t -\t\t -\t\t -\t\t\t -\t\t\t -\t\t -\t\t -\t\t\t -\t\t\t -\t\t\t -\t\t\t -\t\t -\t\t -\t\t -\t -\t -\t - -""" - - - -SConscript_contents = """\ -env=Environment(platform='win32', tools=['msvs'], MSVS_VERSION='7.1') - -testsrc = ['test1.cpp', 'test2.cpp'] -testincs = ['sdk.h'] -testlocalincs = ['test.h'] -testresources = ['test.rc'] -testmisc = ['readme.txt'] - -env.MSVSProject(target = 'Test.vcproj', - slnguid = '{SLNGUID}', - srcs = testsrc, - incs = testincs, - localincs = testlocalincs, - resources = testresources, - misc = testmisc, - buildtarget = 'Test.exe', - variant = 'Release') -""" +expected_slnfile = TestSConsMSVS.expected_slnfile_7_1 +expected_vcprojfile = TestSConsMSVS.expected_vcprojfile_7_1 +SConscript_contents = TestSConsMSVS.SConscript_contents_7_1 diff --git a/test/MSVS/vs-8.0-files.py b/test/MSVS/vs-8.0-files.py index f76c90f..bc0ae5d 100644 --- a/test/MSVS/vs-8.0-files.py +++ b/test/MSVS/vs-8.0-files.py @@ -42,135 +42,9 @@ test._msvs_versions = ['8.0'] -expected_slnfile = """\ -Microsoft Visual Studio Solution File, Format Version 9.00 -# Visual Studio 2005 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Test", "Test.vcproj", "{E5466E26-0003-F18B-8F8A-BCD76C86388D}" -EndProject -Global -\tGlobalSection(SolutionConfigurationPlatforms) = preSolution -\t\tRelease|Win32 = Release|Win32 -\tEndGlobalSection -\tGlobalSection(ProjectConfigurationPlatforms) = postSolution -\t\t{E5466E26-0003-F18B-8F8A-BCD76C86388D}.Release|Win32.ActiveCfg = Release|Win32 -\t\t{E5466E26-0003-F18B-8F8A-BCD76C86388D}.Release|Win32.Build.0 = Release|Win32 -\tEndGlobalSection -\tGlobalSection(SolutionProperties) = preSolution -\t\tHideSolutionNode = FALSE -\tEndGlobalSection -EndGlobal -""" - -expected_vcprojfile = """\ - - -\t -\t\t -\t -\t -\t -\t -\t\t -\t\t\t -\t\t -\t -\t -\t -\t -\t\t -\t\t\t -\t\t\t -\t\t -\t\t -\t\t\t -\t\t\t -\t\t -\t\t -\t\t\t -\t\t\t -\t\t -\t\t -\t\t\t -\t\t\t -\t\t -\t\t -\t\t\t -\t\t\t -\t\t\t -\t\t\t -\t\t -\t\t -\t\t -\t -\t -\t - -""" - - - -SConscript_contents = """\ -env=Environment(platform='win32', tools=['msvs'], MSVS_VERSION='8.0') - -testsrc = ['test1.cpp', 'test2.cpp'] -testincs = ['sdk.h'] -testlocalincs = ['test.h'] -testresources = ['test.rc'] -testmisc = ['readme.txt'] - -env.MSVSProject(target = 'Test.vcproj', - slnguid = '{SLNGUID}', - srcs = testsrc, - incs = testincs, - localincs = testlocalincs, - resources = testresources, - misc = testmisc, - buildtarget = 'Test.exe', - variant = 'Release') -""" +expected_slnfile = TestSConsMSVS.expected_slnfile_8_0 +expected_vcprojfile = TestSConsMSVS.expected_vcprojfile_8_0 +SConscript_contents = TestSConsMSVS.SConscript_contents_8_0 -- cgit v0.12