From 1a450bf22870919c793467059b9a4c6c81508ae9 Mon Sep 17 00:00:00 2001 From: Chris Date: Thu, 8 Oct 2026 06:21:19 -0700 Subject: [PATCH] ci(e2e): require fresh distributed JUnit reports (#8384) * ci(e2e): require fresh distributed JUnit reports * test(e2e): emit JUnit from successful workflow mocks --- .github/workflows/e2e-distributed.yml | 2 ++ scripts/test_e2e_binary.py | 7 ++++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/workflows/e2e-distributed.yml b/.github/workflows/e2e-distributed.yml index 76ea2f061..9ef617ec7 100644 --- a/.github/workflows/e2e-distributed.yml +++ b/.github/workflows/e2e-distributed.yml @@ -168,11 +168,13 @@ jobs: FILTER: ${{ inputs.filter }} run: | set -euo pipefail + rm -f target/nextest/e2e-distributed/junit.xml if [ -n "${FILTER}" ]; then python3 scripts/e2e_binary.py run -- cargo nextest run --profile e2e-distributed -p e2e_test -E "${FILTER}" else python3 scripts/e2e_binary.py run -- cargo nextest run --profile e2e-distributed -p e2e_test --no-tests=fail fi + test -s target/nextest/e2e-distributed/junit.xml - name: Upload distributed e2e diagnostics if: always() diff --git a/scripts/test_e2e_binary.py b/scripts/test_e2e_binary.py index e9a278e06..e73c1209e 100644 --- a/scripts/test_e2e_binary.py +++ b/scripts/test_e2e_binary.py @@ -42,7 +42,12 @@ if args[:2] == ["nextest", "run"]: if os.environ.get("RUSTFS_E2E_STARTUP_CAS_BINARY"): assert pathlib.Path(receipt["binary"]) == pathlib.Path(os.environ["RUSTFS_E2E_STARTUP_CAS_BINARY"]).resolve() pathlib.Path("target/nextest-command.json").write_text(json.dumps(args)) - raise SystemExit(int(os.environ.get("FAKE_TEST_EXIT", "0"))) + status = int(os.environ.get("FAKE_TEST_EXIT", "0")) + if status == 0: + junit = pathlib.Path("target/nextest") / args[args.index("--profile") + 1] / "junit.xml" + junit.parent.mkdir(parents=True, exist_ok=True) + junit.write_text("") + raise SystemExit(status) target = pathlib.Path(args[args.index("--target-dir") + 1]) binary = target / ("release" if "--release" in args else "debug") / "rustfs" binary.parent.mkdir(parents=True, exist_ok=True)