diff options
author | Ibrahim Esmat <iesmat@microsoft.com> | 2017-07-27 13:00:46 (GMT) |
---|---|---|
committer | Ibrahim Esmat <iesmat@microsoft.com> | 2017-07-27 13:00:46 (GMT) |
commit | b9df77702c7c7c669b29e8a23af8932a2f30492e (patch) | |
tree | e4bfe6f4005cc2f6de2b40ef7dcc2b86be2bcbbf | |
parent | d9c5836692f8066b7c4fdf42c5a79c32957bff08 (diff) | |
download | SCons-b9df77702c7c7c669b29e8a23af8932a2f30492e.zip SCons-b9df77702c7c7c669b29e8a23af8932a2f30492e.tar.gz SCons-b9df77702c7c7c669b29e8a23af8932a2f30492e.tar.bz2 |
Fix MSVC_UWP_APP test to take into account the MSVC_VERSION.
Code Review Fixes.
-rw-r--r-- | test/MSVC/MSVC_UWP_APP.py | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/test/MSVC/MSVC_UWP_APP.py b/test/MSVC/MSVC_UWP_APP.py index 6d33567..1ffc917 100644 --- a/test/MSVC/MSVC_UWP_APP.py +++ b/test/MSVC/MSVC_UWP_APP.py @@ -38,11 +38,9 @@ def AreVCStoreLibPathsInLIBPATH(output): lines = output.splitlines() for line in lines: if 'env[ENV][LIBPATH]=' in line: - idx_eq = line.find('=') - libpath = line[idx_eq + 1:] + libpath = line.split('=')[1] elif 'env[MSVC_VERSION]=' in line: - idx_eq = line.find('=') - msvc_version = line[idx_eq + 1:] + msvc_version = line.split('=')[1] if not libpath or not msvc_version: # Couldn't find the libpath or msvc version in the output @@ -100,21 +98,25 @@ test.run(arguments = "MSVC_UWP_APP=1") test.fail_test(msvc_version != greatest_msvc_version_on_system) # VS2015+ if maj >= 14: - test.fail_test((vclibstore_path_present is False) or (vclibstorerefs_path_present is False)) + test.fail_test((vclibstore_path_present is False) or (vclibstorerefs_path_present is False), + message='VC Store LIBPATHs NOT present when MSVC_UWP_APP=1 (msvc_version=%s)' % msvc_version) else: - test.fail_test((vclibstore_path_present is True) or (vclibstorerefs_path_present is True)) + test.fail_test((vclibstore_path_present is True) or (vclibstorerefs_path_present is True), + message='VC Store LIBPATHs present for unsupported version when MSVC_UWP_APP=1 (msvc_version=%s)' % msvc_version) # Test setting MSVC_UWP_APP is '0' (False) test.run(arguments = "MSVC_UWP_APP=0") (vclibstore_path_present, vclibstorerefs_path_present, msvc_version) = AreVCStoreLibPathsInLIBPATH(test.stdout()) test.fail_test(msvc_version != greatest_msvc_version_on_system) -test.fail_test((vclibstore_path_present is True) or (vclibstorerefs_path_present is True)) +test.fail_test((vclibstore_path_present is True) or (vclibstorerefs_path_present is True), + message='VC Store LIBPATHs present when MSVC_UWP_APP=0 (msvc_version=%s)' % msvc_version) # Test not setting MSVC_UWP_APP test.run(arguments = "") (vclibstore_path_present, vclibstorerefs_path_present, msvc_version) = AreVCStoreLibPathsInLIBPATH(test.stdout()) test.fail_test(msvc_version != greatest_msvc_version_on_system) -test.fail_test((vclibstore_path_present is True) or (vclibstorerefs_path_present is True)) +test.fail_test((vclibstore_path_present is True) or (vclibstorerefs_path_present is True), + message='VC Store LIBPATHs present when MSVC_UWP_APP not set (msvc_version=%s)' % msvc_version) test.pass_test() |