Skip to content

Commit 1a3d36a

Browse files
authored
[ci] Test pytest-forked boxing (#12312)
This wraps all tests in pytest-forked (with n=1) so that segfaults and other process-terminations are properly reported by pytest. With this reporting on issues like #12311 should be much better (segfaults become like any other test failure) Co-authored-by: driazati <[email protected]>
1 parent 06ac5cd commit 1a3d36a

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

tests/scripts/setup-pytest-env.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,11 @@ function run_pytest() {
7373
fi
7474

7575
suite_name="${test_suite_name}-${current_shard}-${ffi_type}"
76+
77+
if [[ ! "${extra_args[@]}" == *" -n"* ]]; then
78+
extra_args+=("-n=1")
79+
fi
80+
7681
exit_code=0
7782
TVM_FFI=${ffi_type} python3 -m pytest \
7883
-o "junit_suite_name=${suite_name}" \

0 commit comments

Comments
 (0)