File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -27,13 +27,21 @@ def _gazelle_embedded_javaparser_impl(ctx):
2727# Therefore, we have to look in the runfiles dir for the real gazelle binary.
2828mkdir $RUNFILES_DIR/hack_for_runtime_path
2929export GAZELLE_JAVA_JAVAHOME="$RUNFILES_DIR/hack_for_runtime_path/{java_home}"
30+
31+ # If both the embedded and non-embedded version of a test are running at the same time, they will collide trying to create the port file and crash.
32+ export TMPDIR="$TMPDIR_embedded"
33+
3034exec $RUNFILES_DIR/_main/{gazelle_bin} "$@"
3135 """
3236
3337 gazelle_runner_script_windows = """@echo off
3438REM Because java_home points to ../<java_repository> but we pass the JDK runfiles in DefaultInfo,
3539REM we insert a non-existent directory to cancel out the `..`.
3640set "GAZELLE_JAVA_JAVAHOME=%RUNFILES_DIR%\\ hack_for_runtime_path\\ {java_home}"
41+
42+ REM If both the embedded and non-embedded version of a test are running at the same time, they will collide trying to create the port file and crash.
43+ set "TMPDIR=%TMPDIR%_embedded"
44+
3745call %RUNFILES_DIR%\\ _main\\ {gazelle_bin} %*
3846"""
3947
You can’t perform that action at this time.
0 commit comments