diff options
author | Daniel <dmoody256@gmail.com> | 2019-02-05 03:21:16 (GMT) |
---|---|---|
committer | Daniel <dmoody256@gmail.com> | 2019-02-05 03:21:16 (GMT) |
commit | 68069af22c502e61439b006a1c6e0d2431f20949 (patch) | |
tree | db69729fb882a1eaa8c0a9037861f1be2b1599a0 /test/MSVC | |
parent | 5e859ac7a1aee773e23679ffdeaabdd4a957cf4c (diff) | |
download | SCons-68069af22c502e61439b006a1c6e0d2431f20949.zip SCons-68069af22c502e61439b006a1c6e0d2431f20949.tar.gz SCons-68069af22c502e61439b006a1c6e0d2431f20949.tar.bz2 |
fix for case where nothing is return from vswhere
Diffstat (limited to 'test/MSVC')
-rw-r--r-- | test/MSVC/no_msvc.py | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/test/MSVC/no_msvc.py b/test/MSVC/no_msvc.py new file mode 100644 index 0000000..d1161c6 --- /dev/null +++ b/test/MSVC/no_msvc.py @@ -0,0 +1,51 @@ +#!/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 scons when no MSVCs are present. +""" + +import sys + +import TestSCons + +test = TestSCons.TestSCons() + +if sys.platform != 'win32': + test.skip_test("Not win32 platform. Skipping test\n") + +# test find_vc_pdir_vswhere by removing all other VS's reg keys +test.file_fixture('no_msvc/no_regs_sconstruct.py', 'SConstruct') +test.run(arguments='-Q -s', stdout='') + +# test no msvc's +test.file_fixture('no_msvc/no_msvcs_sconstruct.py', 'SConstruct') +test.run(arguments='-Q -s') + +if 'MSVC_VERSION=None' not in test.stdout(): + test.fail_test() + +test.pass_test()
\ No newline at end of file |