Skip to content

Commit c044959

Browse files
authored
Merge pull request #34074 from def-/pr-cargo-test-junit
ci: Clear junit xml file before building
2 parents 233afe5 + dbd3e9e commit c044959

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

ci/test/cargo-test/mzcompose.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,13 @@ def workflow_default(c: Composition, parser: WorkflowArgumentParser) -> None:
110110
extra_env = {}
111111
clusterd_thread: PropagatingThread | None = None
112112

113+
# Don't upload an out of date junit xml when the build fails
114+
junit_path = (
115+
os.getenv("CARGO_TARGET_DIR", "target") + "/nextest/ci/junit_cargo-test.xml"
116+
)
117+
if os.path.exists(junit_path):
118+
os.remove(junit_path)
119+
113120
if coverage:
114121
# TODO(def-): For coverage inside of clusterd called from unit tests need
115122
# to set LLVM_PROFILE_FILE in test code invoking clusterd and later

0 commit comments

Comments
 (0)