Skip to content

Commit

Permalink
Export runfiles environment for non-Windows tests. (bazel-contrib#183)
Browse files Browse the repository at this point in the history
Windows runfile support is sufficiently different that it will need a
different mechanism.

Part of bazel-contrib#182.

Co-authored-by: Chuck Grindel <[email protected]>
  • Loading branch information
katre and cgrindel committed Sep 27, 2023
1 parent 647fe4d commit 448ad84
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions bazel_integration_test/py/test_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -252,8 +252,10 @@ def _EnvMap(self, env_remove = None, env_add = None):
java_home = TestBase.GetEnv('JAVA_HOME', '')
if java_home:
env['JAVA_HOME'] = java_home
# TODO(GH182): figure out Windows runfiles_dir.
else:
env = {'HOME': os.path.join(self._temp, 'home')}
env['RUNFILES_DIR'] = self._runfiles

env['PATH'] = TestBase.GetEnv('PATH')
# The inner Bazel must know that it's running as part of a test (so that it
Expand Down

0 comments on commit 448ad84

Please sign in to comment.