From 8ed126b66fc3c06bfa597aa84a4d031b1669c02c Mon Sep 17 00:00:00 2001 From: Laszlo Csomor Date: Mon, 17 Jul 2017 11:42:02 +0200 Subject: test_base.py: add path of VC++ Build Tools 2017 Change-Id: Iaa957c8ad597c2f4fedb5beb4bd8bc4df89fdbe1 PiperOrigin-RevId: 162186695 --- src/test/py/bazel/test_base.py | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/src/test/py/bazel/test_base.py b/src/test/py/bazel/test_base.py index 6baa443b90..cabbeaf47e 100644 --- a/src/test/py/bazel/test_base.py +++ b/src/test/py/bazel/test_base.py @@ -246,13 +246,18 @@ class TestBase(unittest.TestCase): 'CC_CONFIGURE_DEBUG': '1' } - # TODO(pcloudy): Remove this hardcoded path after resolving + # TODO(pcloudy): Remove these hardcoded paths after resolving # https://github.com/bazelbuild/bazel/issues/3273 - vc_path = (r'C:\Program Files (x86)\Microsoft Visual ' - r'Studio\2017\Professional\VC') - if not os.path.exists(vc_path): - vc_path = r'C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC' - env['BAZEL_VC'] = vc_path + env['BAZEL_VC'] = 'visual-studio-not-found' + for p in [ + (r'C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional' + r'\VC'), + r'C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC', + r'C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC' + ]: + if os.path.exists(p): + env['BAZEL_VC'] = p + break else: env = {'HOME': os.path.join(self._temp, 'home')} -- cgit v1.2.3