Anonymous avatar Anonymous committed aaef380

Merged revisions 3146-3249 from core branch.

Comments (0)

Files changed (4)

test/MSVS/vs-6.0-files.py

 import os
 import sys
 
-import TestCmd
 import TestSCons
 
 test = TestSCons.TestSCons()
 
-if sys.platform != 'win32':
-    msg = "Skipping Visual Studio test on non-Windows platform '%s'\n" % sys.platform
-    test.skip_test(msg)
+# Make the test infrastructure think we have this version of MSVS installed.
+test._msvs_versions = ['6.0']
 
 
 
 
 
 SConscript_contents = """\
-env=Environment(tools=['msvs'], MSVS_VERSION = '6.0')
+env=Environment(platform='win32', tools=['msvs'], MSVS_VERSION='6.0')
 
 testsrc = ['test.c']
 testincs = ['sdk.h']
 test.subdir('work3')
 
 test.write(['work3', 'SConstruct'], """\
-env=Environment(tools=['msvs'], MSVS_VERSION = '6.0')
+env=Environment(platform='win32', tools=['msvs'], MSVS_VERSION='6.0')
 
 testsrc = ['test.c']
 testincs = ['sdk.h']

test/MSVS/vs-7.0-files.py

 import os.path
 import sys
 
-import TestCmd
 import TestSCons
 
 test = TestSCons.TestSCons()
 
-if sys.platform != 'win32':
-    msg = "Skipping Visual Studio test on non-Windows platform '%s'\n" % sys.platform
-    test.skip_test(msg)
+# Make the test infrastructure think we have this version of MSVS installed.
+test._msvs_versions = ['7.0']
+
+
 
 expected_slnfile = """\
 Microsoft Visual Studio Solution File, Format Version 7.00
 
 
 SConscript_contents = """\
-env=Environment(tools=['msvs'], MSVS_VERSION = '7.0')
+env=Environment(platform='win32', tools=['msvs'], MSVS_VERSION='7.0')
 
 testsrc = ['test1.cpp', 'test2.cpp']
 testincs = ['sdk.h']
 test.run(chdir='work2', arguments=".")
 
 vcproj = test.read(['work2', 'src', 'Test.vcproj'], 'r')
-expect = test.msvs_substitute(expected_vcprojfile, '7.0', 'work2', 'SConstruct')
+expect = test.msvs_substitute(expected_vcprojfile, '7.0', 'work2', 'SConstruct',
+                              python=python)
 # don't compare the pickled data
 assert vcproj[:len(expect)] == expect, test.diff_substr(expect, vcproj)
 
 test.subdir('work3')
 
 test.write(['work3', 'SConstruct'], """\
-env=Environment(tools=['msvs'], MSVS_VERSION = '7.0')
+env=Environment(platform='win32', tools=['msvs'], MSVS_VERSION='7.0')
 
 testsrc = ['test1.cpp', 'test2.cpp']
 testincs = ['sdk.h']
 
 test.must_exist(test.workpath('work3', 'Test.vcproj'))
 vcproj = test.read(['work3', 'Test.vcproj'], 'r')
-expect = test.msvs_substitute(expected_vcprojfile, '7.0', 'work3', 'SConstruct')
+expect = test.msvs_substitute(expected_vcprojfile, '7.0', 'work3', 'SConstruct',
+                              python=python)
 # don't compare the pickled data
 assert vcproj[:len(expect)] == expect, test.diff_substr(expect, vcproj)
 

test/MSVS/vs-7.1-files.py

 import os.path
 import sys
 
-import TestCmd
 import TestSCons
 
 test = TestSCons.TestSCons()
 
-if sys.platform != 'win32':
-    msg = "Skipping Visual Studio test on non-Windows platform '%s'\n" % sys.platform
-    test.skip_test(msg)
+# Make the test infrastructure think we have this version of MSVS installed.
+test._msvs_versions = ['7.1']
+
+
 
 expected_slnfile = """\
 Microsoft Visual Studio Solution File, Format Version 8.00
 
 
 SConscript_contents = """\
-env=Environment(tools=['msvs'], MSVS_VERSION = '7.1')
+env=Environment(platform='win32', tools=['msvs'], MSVS_VERSION='7.1')
 
 testsrc = ['test1.cpp', 'test2.cpp']
 testincs = ['sdk.h']
 test.run(chdir='work2', arguments=".")
 
 vcproj = test.read(['work2', 'src', 'Test.vcproj'], 'r')
-expect = test.msvs_substitute(expected_vcprojfile, '7.0', 'work2', 'SConstruct')
+expect = test.msvs_substitute(expected_vcprojfile, '7.0', 'work2', 'SConstruct',
+                              python=python)
 # don't compare the pickled data
 assert vcproj[:len(expect)] == expect, test.diff_substr(expect, vcproj)
 
 test.subdir('work3')
 
 test.write(['work3', 'SConstruct'], """\
-env=Environment(tools=['msvs'], MSVS_VERSION = '7.1')
+env=Environment(platform='win32', tools=['msvs'], MSVS_VERSION='7.1')
 
 testsrc = ['test1.cpp', 'test2.cpp']
 testincs = ['sdk.h']
 
 test.must_exist(test.workpath('work3', 'Test.vcproj'))
 vcproj = test.read(['work3', 'Test.vcproj'], 'r')
-expect = test.msvs_substitute(expected_vcprojfile, '7.1', 'work3', 'SConstruct')
+expect = test.msvs_substitute(expected_vcprojfile, '7.1', 'work3', 'SConstruct',
+                              python=python)
 # don't compare the pickled data
 assert vcproj[:len(expect)] == expect, test.diff_substr(expect, vcproj)
 

test/MSVS/vs-8.0-files.py

 import os.path
 import sys
 
-import TestCmd
 import TestSCons
 
 test = TestSCons.TestSCons()
 
-if sys.platform != 'win32':
-    msg = "Skipping Visual Studio test on non-Windows platform '%s'\n" % sys.platform
-    test.skip_test(msg)
+# Make the test infrastructure think we have this version of MSVS installed.
+test._msvs_versions = ['8.0']
+
+
 
 expected_slnfile = """\
 Microsoft Visual Studio Solution File, Format Version 9.00
 
 
 SConscript_contents = """\
-env=Environment(tools=['msvs'], MSVS_VERSION = '8.0')
+env=Environment(platform='win32', tools=['msvs'], MSVS_VERSION='8.0')
 
 testsrc = ['test1.cpp', 'test2.cpp']
 testincs = ['sdk.h']
 
 vcproj = test.read(['work2', 'src', 'Test.vcproj'], 'r')
 expect = test.msvs_substitute(expected_vcprojfile,
-                              '7.0',
+                              '8.0',
                               'work2',
                               'SConstruct',
-                              project_guid="{25F6CE89-8E22-2910-8B6E-FFE6DC1E2792}")
+                              project_guid="{FC63FE9E-71B3-06CC-11AF-2077D8108DFE}",
+                              python=python)
 # don't compare the pickled data
 assert vcproj[:len(expect)] == expect, test.diff_substr(expect, vcproj)
 
 test.must_exist(test.workpath('work2', 'src', 'Test.sln'))
 sln = test.read(['work2', 'src', 'Test.sln'], 'r')
-expect = test.msvs_substitute(expected_slnfile, '7.0',
+expect = test.msvs_substitute(expected_slnfile, '8.0',
                               os.path.join('work2', 'src'))
 # don't compare the pickled data
 assert sln[:len(expect)] == expect, test.diff_substr(expect, sln)
 test.subdir('work3')
 
 test.write(['work3', 'SConstruct'], """\
-env=Environment(tools=['msvs'], MSVS_VERSION = '8.0')
+env=Environment(platform='win32', tools=['msvs'], MSVS_VERSION='8.0')
 
 testsrc = ['test1.cpp', 'test2.cpp']
 testincs = ['sdk.h']
 
 test.must_exist(test.workpath('work3', 'Test.vcproj'))
 vcproj = test.read(['work3', 'Test.vcproj'], 'r')
-expect = test.msvs_substitute(expected_vcprojfile, '8.0', 'work3', 'SConstruct')
+expect = test.msvs_substitute(expected_vcprojfile, '8.0', 'work3', 'SConstruct',
+                              python=python)
 # don't compare the pickled data
 assert vcproj[:len(expect)] == expect, test.diff_substr(expect, vcproj)
 
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.