|
3 | 3 | set -eo pipefail |
4 | 4 |
|
5 | 5 | if [[ "${CI_OS_NAME}" == "ubuntu"* ]]; then |
6 | | - CONDITIONS=("not (ultraslowtest or pgtest)") |
| 6 | + CONDITION="not (ultraslowtest or pgtest)" |
7 | 7 | elif [[ "${CI_OS_NAME}" == "macos"* ]]; then |
8 | 8 | # detect arch and run slowtest on arm64 only (pgtest is already ultraslow on macOS) |
9 | 9 | if [[ "$(uname -m)" == "arm64" ]]; then |
10 | | - # Split the PyVista/VTK ("pvtest") tests into their own xdist invocation. |
11 | | - # Run all together, a worker that accumulates heavy state (loky pools, |
12 | | - # leftover ipykernel/jupyter_client asyncio loops, tqdm monitors) creates |
13 | | - # the scheduling jitter that trips an xdist loadscope dispatch deadlock at |
14 | | - # end-of-run: workers idle in TestQueue.get, controller loops forever in |
15 | | - # dsession.loop_once without dispatching the remaining scopes or SHUTDOWN |
16 | | - # (see pytest-xdist#1313). Two shorter, lighter invocations avoid it while |
17 | | - # keeping parallelism; pvtest alone under xdist does not hang. |
18 | | - CONDITIONS=("not (ultraslowtest or pgtest or pvtest)" "pvtest and not ultraslowtest") |
| 10 | + CONDITION="not (ultraslowtest or pgtest)" |
19 | 11 | else |
20 | | - CONDITIONS=("not (slowtest or pgtest)") |
| 12 | + CONDITION="not (slowtest or pgtest)" |
21 | 13 | fi |
22 | 14 | elif [[ "${CI_OS_NAME}" == "windows"* ]]; then |
23 | | - CONDITIONS=("not (slowtest or pgtest)") |
| 15 | + CONDITION="not (slowtest or pgtest)" |
24 | 16 | else |
25 | 17 | echo "✕ ERROR: Unrecognized CI_OS_NAME=${CI_OS_NAME}" |
26 | 18 | exit 1 |
@@ -53,29 +45,4 @@ if [[ ! -z "$CONDA_ENV" ]] && [[ "${CI_OS_NAME}" != "windows"* ]] && [[ "${MNE_C |
53 | 45 | fi |
54 | 46 |
|
55 | 47 | # $COV_ARGS is set in github_actions_env_vars.sh (coverage only on Python >= 3.14) |
56 | | -# Run each marker expression as its own pytest invocation (usually just one; on |
57 | | -# macOS arm64 the pvtest tests are split out, see above). Later runs append |
58 | | -# coverage, each gets its own junit file, and we run them all before exiting |
59 | | -# with the first nonzero code so one failing split does not mask the other. |
60 | | -set +e # capture each pytest's exit code manually rather than aborting on it |
61 | | -CODE=0 |
62 | | -COV_APPEND="" |
63 | | -i=0 |
64 | | -for CONDITION in "${CONDITIONS[@]}"; do |
65 | | - if [ "${#CONDITIONS[@]}" -gt 1 ]; then |
66 | | - THIS_JUNIT="${JUNIT_PATH%.xml}-${i}.xml" |
67 | | - else |
68 | | - THIS_JUNIT="$JUNIT_PATH" |
69 | | - fi |
70 | | - set -x |
71 | | - pytest -m "${CONDITION}" -n "$PYTEST_XDIST_N" --dist loadscope --timeout=120 --timeout-method=thread -o faulthandler_timeout=110 ${COV_ARGS} ${COV_APPEND} --color=yes --continue-on-collection-errors --junit-xml="$THIS_JUNIT" -vv ${USE_DIRS} |
72 | | - THIS_CODE=$? |
73 | | - set +x |
74 | | - echo "Exited with code $THIS_CODE for: ${CONDITION}" |
75 | | - if [ "$THIS_CODE" -ne 0 ] && [ "$CODE" -eq 0 ]; then |
76 | | - CODE=$THIS_CODE |
77 | | - fi |
78 | | - COV_APPEND="--cov-append" |
79 | | - i=$((i + 1)) |
80 | | -done |
81 | | -exit $CODE |
| 48 | +pytest -m "${CONDITION}" -n "$PYTEST_XDIST_N" --dist loadscope --timeout=120 --timeout-method=thread -o faulthandler_timeout=110 ${COV_ARGS} --color=yes --continue-on-collection-errors --junit-xml="$JUNIT_PATH" -vv ${USE_DIRS} |
0 commit comments