aboutsummaryrefslogtreecommitdiff
path: root/run_unittests.py
diff options
context:
space:
mode:
authorNirbheek Chauhan <nirbheek@centricular.com>2019-04-18 04:05:02 +0530
committerNirbheek Chauhan <nirbheek.chauhan@gmail.com>2019-04-18 09:01:23 +0000
commit2e93ed58c30d63da8527ff16375ff9e0642e7533 (patch)
tree1a264f8248164b76b87bd88484dd172102f42813 /run_unittests.py
parent7654db511c9341ae4e1b1ccca09d88c6554599b6 (diff)
downloadmeson-2e93ed58c30d63da8527ff16375ff9e0642e7533.zip
meson-2e93ed58c30d63da8527ff16375ff9e0642e7533.tar.gz
meson-2e93ed58c30d63da8527ff16375ff9e0642e7533.tar.bz2
unit tests: Skip toolset version test on VS2015 and older
Diffstat (limited to 'run_unittests.py')
-rwxr-xr-xrun_unittests.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/run_unittests.py b/run_unittests.py
index b28eab2..941280d 100755
--- a/run_unittests.py
+++ b/run_unittests.py
@@ -968,6 +968,9 @@ class InternalTests(unittest.TestCase):
raise unittest.SkipTest('Test only applies to MSVC-like compilers')
toolset_ver = cc.get_toolset_version()
self.assertIsNotNone(toolset_ver)
+ # Visual Studio 2015 and older versions do not define VCToolsVersion
+ if int(''.join(cc.version.split('.')[0:2])) < 1910:
+ return
self.assertIn('VCToolsVersion', os.environ)
vctools_ver = os.environ['VCToolsVersion']
self.assertTrue(vctools_ver.startswith(toolset_ver),