Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pass execution info to xml generating spawn. Fixes #7794 #7796

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -465,7 +465,9 @@ private Spawn createXmlGeneratingSpawn(TestRunnerAction action, SpawnResult resu
"TEST_TOTAL_SHARDS", Integer.toString(action.getExecutionSettings().getTotalShards()),
"TEST_NAME", action.getTestName(),
"TEST_BINARY", testBinaryName),
ImmutableMap.of(),
// Pass the execution info of the action which is identical to the supported tags set on the
// test target. In particular, this does not set the test timeout on the spawn.
ImmutableMap.copyOf(action.getExecutionInfo()),
null,
ImmutableMap.of(),
/*inputs=*/ ImmutableList.of(action.getTestXmlGeneratorScript(), action.getTestLog()),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -519,6 +519,7 @@ public void testThatTestLogAndOutputAreReturnedWithSplitXmlGeneration() throws E
" name = \"failing_test\",",
" size = \"small\",",
" srcs = [\"failing_test.sh\"],",
" tags = [\"local\"],",
")");
TestRunnerAction testRunnerAction = getTestAction("//standalone:failing_test");

Expand All @@ -538,6 +539,8 @@ public void testThatTestLogAndOutputAreReturnedWithSplitXmlGeneration() throws E
.thenAnswer(
(invocation) -> {
Spawn spawn = invocation.getArgument(0);
// Test that both spawns have the local tag attached as a execution info
assertThat(spawn.getExecutionInfo()).containsKey("local");
ActionExecutionContext context = invocation.getArgument(1);
FileOutErr outErr = context.getFileOutErr();
called.add(outErr);
Expand Down