diff options
author | Joseph Brill <48932340+jcbrill@users.noreply.github.com> | 2024-10-08 10:18:33 (GMT) |
---|---|---|
committer | Joseph Brill <48932340+jcbrill@users.noreply.github.com> | 2024-10-08 10:18:33 (GMT) |
commit | 357ce53b076feba224507053641d3de175a82429 (patch) | |
tree | 435bb136ab947cf38309317b090a4ff3f872105c /test | |
parent | 518b512cc15dcfe6c905fac9b006410b72125710 (diff) | |
download | SCons-357ce53b076feba224507053641d3de175a82429.zip SCons-357ce53b076feba224507053641d3de175a82429.tar.gz SCons-357ce53b076feba224507053641d3de175a82429.tar.bz2 |
Add safe HOST_ARCH to sconstruct/sconscript environment for MSVS test scripts.
Scripts affected:
* /test/MSVS/vs-7.0-scc-files.py
* /test/MSVS/vs-7.0-scc-legacy-files.py
* /test/MSVS/vs-7.1-scc-files.py
* /test/MSVS/vs-7.1-scc-legacy-files.py
* /test/MSVS/vs-scc-files.py
* /test/MSVS/vs-scc-legacy-files.py
Diffstat (limited to 'test')
-rw-r--r-- | test/MSVS/vs-7.0-scc-files.py | 6 | ||||
-rw-r--r-- | test/MSVS/vs-7.0-scc-legacy-files.py | 6 | ||||
-rw-r--r-- | test/MSVS/vs-7.1-scc-files.py | 6 | ||||
-rw-r--r-- | test/MSVS/vs-7.1-scc-legacy-files.py | 6 | ||||
-rw-r--r-- | test/MSVS/vs-scc-files.py | 9 | ||||
-rw-r--r-- | test/MSVS/vs-scc-legacy-files.py | 9 |
6 files changed, 30 insertions, 12 deletions
diff --git a/test/MSVS/vs-7.0-scc-files.py b/test/MSVS/vs-7.0-scc-files.py index a1f3c43..b87bb9a 100644 --- a/test/MSVS/vs-7.0-scc-files.py +++ b/test/MSVS/vs-7.0-scc-files.py @@ -33,6 +33,7 @@ solution (.sln) files that contain SCC information and look correct. 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 = ['7.0'] @@ -47,7 +48,8 @@ r"""env=Environment(platform='win32', tools=['msvs'], MSVS_VERSION='7.0', MSVS_SCC_CONNECTION_ROOT='.', MSVS_SCC_PROVIDER='MSSCCI:Perforce SCM', MSVS_SCC_PROJECT_NAME='Perforce Project', - MSVS_SCC_AUX_PATH='AUX') + MSVS_SCC_AUX_PATH='AUX', + HOST_ARCH='%(HOST_ARCH)s') testsrc = ['test1.cpp', 'test2.cpp'] testincs = ['sdk.h'] @@ -64,7 +66,7 @@ env.MSVSProject(target = 'Test.vcproj', misc = testmisc, buildtarget = 'Test.exe', variant = 'Release') -""" % {'MSVS_PROJECT_GUID': TestSConsMSVS.MSVS_PROJECT_GUID} +""" % {'HOST_ARCH':host_arch, 'MSVS_PROJECT_GUID': TestSConsMSVS.MSVS_PROJECT_GUID} expected_sln_sccinfo = """\ \tGlobalSection(SourceCodeControl) = preSolution diff --git a/test/MSVS/vs-7.0-scc-legacy-files.py b/test/MSVS/vs-7.0-scc-legacy-files.py index d579102..5b900f8 100644 --- a/test/MSVS/vs-7.0-scc-legacy-files.py +++ b/test/MSVS/vs-7.0-scc-legacy-files.py @@ -33,6 +33,7 @@ solution (.sln) files that contain SCC information and look correct. 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 = ['7.0'] @@ -45,7 +46,8 @@ env=Environment(platform='win32', tools=['msvs'], MSVS_VERSION='7.0', CPPDEFINES=['DEF1', 'DEF2',('DEF3','1234')], CPPPATH=['inc1', 'inc2'], MSVS_SCC_LOCAL_PATH=r'C:\\MyMsVsProjects', - MSVS_SCC_PROJECT_NAME='Perforce Project') + MSVS_SCC_PROJECT_NAME='Perforce Project', + HOST_ARCH='%(HOST_ARCH)s') testsrc = ['test1.cpp', 'test2.cpp'] testincs = ['sdk.h'] @@ -62,7 +64,7 @@ env.MSVSProject(target = 'Test.vcproj', misc = testmisc, buildtarget = 'Test.exe', variant = 'Release') -""" % {'MSVS_PROJECT_GUID': TestSConsMSVS.MSVS_PROJECT_GUID} +""" % {'HOST_ARCH':host_arch, 'MSVS_PROJECT_GUID': TestSConsMSVS.MSVS_PROJECT_GUID} expected_vcproj_sccinfo = """\ \tSccProjectName="Perforce Project" diff --git a/test/MSVS/vs-7.1-scc-files.py b/test/MSVS/vs-7.1-scc-files.py index fbc83de..3af668f 100644 --- a/test/MSVS/vs-7.1-scc-files.py +++ b/test/MSVS/vs-7.1-scc-files.py @@ -33,6 +33,7 @@ solution (.sln) files that contain SCC information and look correct. 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 = ['7.1'] @@ -47,7 +48,8 @@ env=Environment(platform='win32', tools=['msvs'], MSVS_VERSION='7.1', MSVS_SCC_CONNECTION_ROOT='.', MSVS_SCC_PROVIDER='MSSCCI:Perforce SCM', MSVS_SCC_PROJECT_NAME='Perforce Project', - MSVS_SCC_AUX_PATH='AUX') + MSVS_SCC_AUX_PATH='AUX', + HOST_ARCH='%(HOST_ARCH)s') testsrc = ['test1.cpp', 'test2.cpp'] testincs = ['sdk.h'] @@ -64,7 +66,7 @@ env.MSVSProject(target = 'Test.vcproj', misc = testmisc, buildtarget = 'Test.exe', variant = 'Release') -""" % {'MSVS_PROJECT_GUID': TestSConsMSVS.MSVS_PROJECT_GUID} +""" % {'HOST_ARCH':host_arch, 'MSVS_PROJECT_GUID': TestSConsMSVS.MSVS_PROJECT_GUID} expected_sln_sccinfo = """\ \tGlobalSection(SourceCodeControl) = preSolution diff --git a/test/MSVS/vs-7.1-scc-legacy-files.py b/test/MSVS/vs-7.1-scc-legacy-files.py index 335ef8b..9e0d0ea 100644 --- a/test/MSVS/vs-7.1-scc-legacy-files.py +++ b/test/MSVS/vs-7.1-scc-legacy-files.py @@ -33,6 +33,7 @@ solution (.sln) files that contain SCC information and look correct. 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 = ['7.1'] @@ -45,7 +46,8 @@ env=Environment(platform='win32', tools=['msvs'], MSVS_VERSION='7.1', CPPDEFINES=['DEF1', 'DEF2',('DEF3','1234')], CPPPATH=['inc1', 'inc2'], MSVS_SCC_LOCAL_PATH=r'C:\\MyMsVsProjects', - MSVS_SCC_PROJECT_NAME='Perforce Project') + MSVS_SCC_PROJECT_NAME='Perforce Project', + HOST_ARCH='%(HOST_ARCH)s') testsrc = ['test1.cpp', 'test2.cpp'] testincs = ['sdk.h'] @@ -62,7 +64,7 @@ env.MSVSProject(target = 'Test.vcproj', misc = testmisc, buildtarget = 'Test.exe', variant = 'Release') -""" % {'MSVS_PROJECT_GUID': TestSConsMSVS.MSVS_PROJECT_GUID} +""" % {'HOST_ARCH':host_arch, 'MSVS_PROJECT_GUID': TestSConsMSVS.MSVS_PROJECT_GUID} expected_vcproj_sccinfo = """\ \tSccProjectName="Perforce Project" diff --git a/test/MSVS/vs-scc-files.py b/test/MSVS/vs-scc-files.py index 1cbbd8c..1b4ad22 100644 --- a/test/MSVS/vs-scc-files.py +++ b/test/MSVS/vs-scc-files.py @@ -35,6 +35,7 @@ test = None 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] @@ -53,7 +54,8 @@ env=Environment(platform='win32', tools=['msvs'], MSVS_VERSION='{vc_version}', CPPPATH=['inc1', 'inc2'], MSVS_SCC_CONNECTION_ROOT='.', MSVS_SCC_PROVIDER='MSSCCI:Perforce SCM', - MSVS_SCC_PROJECT_NAME='Perforce Project') + MSVS_SCC_PROJECT_NAME='Perforce Project', + HOST_ARCH='{host_arch}') testsrc = ['test1.cpp', 'test2.cpp'] testincs = [r'sdk_dir\\sdk.h'] @@ -69,7 +71,10 @@ env.MSVSProject(target = '{project_file}', misc = testmisc, buildtarget = 'Test.exe', variant = 'Release') -""".format(vc_version=vc_version, project_file=project_file, project_guid=TestSConsMSVS.MSVS_PROJECT_GUID) +""".format( + vc_version=vc_version, project_file=project_file, + host_arch=host_arch, project_guid=TestSConsMSVS.MSVS_PROJECT_GUID, +) expected_sln_sccinfo = """\ \tGlobalSection(SourceCodeControl) = preSolution diff --git a/test/MSVS/vs-scc-legacy-files.py b/test/MSVS/vs-scc-legacy-files.py index 88efca8..49ea2ac 100644 --- a/test/MSVS/vs-scc-legacy-files.py +++ b/test/MSVS/vs-scc-legacy-files.py @@ -35,6 +35,7 @@ test = None 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] @@ -53,7 +54,8 @@ 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', - MSVS_SCC_PROJECT_NAME='Perforce Project') + MSVS_SCC_PROJECT_NAME='Perforce Project', + HOST_ARCH='{host_arch}') testsrc = ['test1.cpp', 'test2.cpp'] testincs = [r'sdk_dir\\sdk.h'] @@ -69,7 +71,10 @@ env.MSVSProject(target = '{project_file}', misc = testmisc, buildtarget = 'Test.exe', variant = 'Release') -""".format(vc_version=vc_version, project_file=project_file, project_guid=TestSConsMSVS.MSVS_PROJECT_GUID) +""".format( + vc_version=vc_version, project_file=project_file, + host_arch=host_arch, project_guid=TestSConsMSVS.MSVS_PROJECT_GUID, +) if major < 10: # VC8 and VC9 used key-value pair format. |