mirror of
https://github.com/rustfs/rustfs.git
synced 2026-10-12 23:52:45 +00:00
ci(e2e): require fresh distributed JUnit reports (#8384)
* ci(e2e): require fresh distributed JUnit reports * test(e2e): emit JUnit from successful workflow mocks
This commit is contained in:
@@ -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()
|
||||
|
||||
@@ -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("<testsuites/>")
|
||||
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)
|
||||
|
||||
Reference in New Issue
Block a user