-
Notifications
You must be signed in to change notification settings - Fork 4.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Windows: no error if python is not found on PATH
Fixes #6463 Closes #6466. Change-Id: I51f8c5e48657f10377345aa7bacab6e05dbed471 PiperOrigin-RevId: 218305465
- Loading branch information
1 parent
12987e8
commit 2fda17d
Showing
3 changed files
with
47 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
# Copyright 2018 The Bazel Authors. All rights reserved. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
import unittest | ||
|
||
from src.test.py.bazel import test_base | ||
|
||
|
||
class FirstTimeUseTest(test_base.TestBase): | ||
|
||
def _FailWithOutput(self, output): | ||
self.fail('FAIL:\n | %s\n---' % '\n | '.join(output)) | ||
|
||
def testNoPythonRequirement(self): | ||
"""Regression test for https://github.com/bazelbuild/bazel/issues/6463.""" | ||
self.ScratchFile('WORKSPACE') | ||
exit_code, stdout, stderr = self.RunBazel(['info', 'release']) | ||
self.AssertExitCode(exit_code, 0, stderr) | ||
for line in stdout + stderr: | ||
if 'python' in line and 'not found on PATH' in line: | ||
self._FailWithOutput(stdout + stderr) | ||
|
||
|
||
if __name__ == '__main__': | ||
unittest.main() |