diff options
author | 2017-07-17 11:42:02 +0200 | |
---|---|---|
committer | 2017-07-17 13:41:32 +0200 | |
commit | 8ed126b66fc3c06bfa597aa84a4d031b1669c02c (patch) | |
tree | e8255c2a2bdb38b4ad676d28fc8c4c9373dbee3e | |
parent | ccbe40abeea5621a60c8998fbe38e5a23864e1b5 (diff) |
test_base.py: add path of VC++ Build Tools 2017
Change-Id: Iaa957c8ad597c2f4fedb5beb4bd8bc4df89fdbe1
PiperOrigin-RevId: 162186695
-rw-r--r-- | src/test/py/bazel/test_base.py | 17 |
1 files 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')} |