Unconditionally include the "message", if any, in SimpleSpawnResult. This is the same logic as used in Google-internal code. This allows us to stop passing the verboseFailures boolean around everywhere, since it's then only needed in one place in AbstractSpawnStrategy.
I don't think this justifies a RELNOTES, but ok if you'd prefer one.
#11151
PiperOrigin-RevId: 333156319
diff --git a/src/test/java/com/google/devtools/build/lib/standalone/StandaloneSpawnStrategyTest.java b/src/test/java/com/google/devtools/build/lib/standalone/StandaloneSpawnStrategyTest.java
index 32154dc..eefdbc8 100644
--- a/src/test/java/com/google/devtools/build/lib/standalone/StandaloneSpawnStrategyTest.java
+++ b/src/test/java/com/google/devtools/build/lib/standalone/StandaloneSpawnStrategyTest.java
@@ -151,7 +151,8 @@
(env, binTools1, fallbackTmpDir) -> ImmutableMap.copyOf(env),
binTools,
/*processWrapper=*/ null,
- Mockito.mock(RunfilesTreeUpdater.class)));
+ Mockito.mock(RunfilesTreeUpdater.class)),
+ /*verboseFailures=*/ false);
this.executor =
new TestExecutorBuilder(fileSystem, directories, binTools)
.addStrategy(strategy, "standalone")
@@ -313,8 +314,7 @@
@Test
public void testVerboseFailures() {
ExecException e = assertThrows(ExecException.class, () -> run(createSpawn(getFalseCommand())));
- ActionExecutionException actionExecutionException =
- e.toActionExecutionException("", /* verboseFailures= */ true, null);
+ ActionExecutionException actionExecutionException = e.toActionExecutionException("", null);
assertWithMessage("got: " + actionExecutionException.getMessage())
.that(actionExecutionException.getMessage().contains("failed: error executing command"))
.isTrue();