forked from bazelbuild/rules_python
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: add missing +x to runtime env toolchain interpreter script (baze…
…lbuild#2086) The `runtime_env_toolchain_interpreter.sh` file was missing the executable bit, which prevented the file from actually be runnable later. To fix, just `chmod +x` it. I also added tests to actually run using it and verify that it is the toolchain used by the test. Fixes bazelbuild#2085
- Loading branch information
Showing
6 changed files
with
114 additions
and
10 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
Empty file.
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,28 @@ | ||
import json | ||
import pathlib | ||
import platform | ||
import unittest | ||
|
||
from python.runfiles import runfiles | ||
|
||
|
||
class RunTest(unittest.TestCase): | ||
def test_ran(self): | ||
rf = runfiles.Create() | ||
settings_path = rf.Rlocation( | ||
"rules_python/tests/support/current_build_settings.json" | ||
) | ||
settings = json.loads(pathlib.Path(settings_path).read_text()) | ||
if platform.system() == "Windows": | ||
self.assertEqual( | ||
"/_magic_pyruntime_sentinel_do_not_use", settings["interpreter_path"] | ||
) | ||
else: | ||
self.assertIn( | ||
"runtime_env_toolchain_interpreter.sh", | ||
settings["interpreter"]["short_path"], | ||
) | ||
|
||
|
||
if __name__ == "__main__": | ||
unittest.main() |
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