File tree Expand file tree Collapse file tree 3 files changed +6
-0
lines changed
base/src/com/google/idea/blaze/base/command
src/com/google/idea/blaze/java/run
tests/unittests/com/google/idea/blaze/java/run Expand file tree Collapse file tree 3 files changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -40,6 +40,9 @@ public final class BlazeFlags {
4040 // It expands to: --test_arg=--wrapper_script_flag=--debug --test_output=streamed
4141 // --test_strategy=exclusive --test_timeout=9999 --nocache_test_results
4242 public static final String JAVA_TEST_DEBUG = "--java_debug" ;
43+ // Debugging tests should only run locally, so make sure no remote executor is defined
44+ // while debugging tests
45+ public static final String RUN_LOCALLY = "--remote_executor=" ;
4346 // Streams stdout/stderr output from each test in real-time.
4447 // Implies --test_strategy=exclusive and --test_sharding_strategy=disabled
4548 public static final String TEST_OUTPUT_STREAMED = "--test_output=streamed" ;
Original file line number Diff line number Diff line change @@ -286,6 +286,7 @@ static BlazeCommand.Builder getBlazeCommandBuilder(
286286 }
287287 else {
288288 command .addBlazeFlags (BlazeFlags .JAVA_TEST_DEBUG );
289+ command .addBlazeFlags (BlazeFlags .RUN_LOCALLY );
289290 command .addBlazeFlags (debugPortFlag (true , debugPort ));
290291 }
291292 if (kotlinxCoroutinesJavaAgent != null ) {
Original file line number Diff line number Diff line change @@ -236,6 +236,7 @@ public void debugFlagShouldBeIncludedForJavaTest() {
236236 "command" ,
237237 BlazeFlags .getToolTagFlag (),
238238 "--java_debug" ,
239+ "--remote_executor=" ,
239240 "--test_arg=--wrapper_script_flag=--debug=127.0.0.1:5005" ,
240241 "--" ,
241242 "//label:rule" ));
@@ -263,6 +264,7 @@ public void debugFlagShouldBeIncludedForJavaTestSuite() {
263264 "test" ,
264265 BlazeFlags .getToolTagFlag (),
265266 "--java_debug" ,
267+ "--remote_executor=" ,
266268 "--test_arg=--wrapper_script_flag=--debug=127.0.0.1:5005" ,
267269 "--" ,
268270 "//label:java_test_suite_rule" ));
You can’t perform that action at this time.
0 commit comments