From e16fd18d15cd0952d47bbf4d9f43550cfd089cd8 Mon Sep 17 00:00:00 2001 From: Chi Wang Date: Tue, 12 Jan 2021 13:54:29 +0800 Subject: [PATCH] Reset outputs if test.xml doesn't exists --- .../google/devtools/build/lib/exec/StandaloneTestStrategy.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/main/java/com/google/devtools/build/lib/exec/StandaloneTestStrategy.java b/src/main/java/com/google/devtools/build/lib/exec/StandaloneTestStrategy.java index 0f31a01ad4dfe6..100be2c9e618a3 100644 --- a/src/main/java/com/google/devtools/build/lib/exec/StandaloneTestStrategy.java +++ b/src/main/java/com/google/devtools/build/lib/exec/StandaloneTestStrategy.java @@ -784,6 +784,9 @@ public TestAttemptContinuation execute() metadataHandler.getMetadata(testAction.getTestXml()); testXmlExists = true; } catch (IOException ignored) { + // If test.xml doesn't exist, A call to getMetadata above will insert a MISSING_FILE_MARKER value + // into the store. We need to reset the outputs. + metadataHandler.resetOutputs(ImmutableList.of(testAction.getTestXml())); } }