Skip to content

Commit 5b89d23

Browse files
authored
Arm backend: Output pytest report in trunk jobs (#19555)
When a pytest report is output to $RUNNER_TEST_RESULTS_DIR, the linux_job_v2.yml workflow can pick it up and surface it in github ci.
1 parent 65c7ee2 commit 5b89d23

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

.github/workflows/trunk.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -380,6 +380,11 @@ jobs:
380380
381381
ARM_TEST=${{ matrix.test_arm_baremetal }}
382382
383+
# Output test report on pytest runs so that github can surface failing tests.
384+
if [[ -n "${RUNNER_TEST_RESULTS_DIR:-}" ]]; then
385+
export PYTEST_ADDOPTS="--junit-xml=${RUNNER_TEST_RESULTS_DIR}/${ARM_TEST}.xml ${PYTEST_ADDOPTS:-}"
386+
fi
387+
383388
# Test test_arm_baremetal.sh with test
384389
backends/arm/test/test_arm_baremetal.sh "${ARM_TEST}"
385390
@@ -415,6 +420,11 @@ jobs:
415420
416421
ARM_TEST=${{ matrix.test_arm_baremetal }}
417422
423+
# Output test report on pytest runs so that github can surface failing tests.
424+
if [[ -n "${RUNNER_TEST_RESULTS_DIR:-}" ]]; then
425+
export PYTEST_ADDOPTS="--junit-xml=${RUNNER_TEST_RESULTS_DIR}/${ARM_TEST}.xml ${PYTEST_ADDOPTS:-}"
426+
fi
427+
418428
backends/arm/test/test_arm_baremetal.sh "${ARM_TEST}"
419429
420430
test-arm-ootb-linux:

0 commit comments

Comments
 (0)