Skip to content

Commit 59c4b7a

Browse files
authored
CI Use pytest-xdist in debian 32 build (#32031)
1 parent 1a783c9 commit 59c4b7a

File tree

5 files changed

+12
-5
lines changed

5 files changed

+12
-5
lines changed

azure-pipelines.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -213,8 +213,6 @@ jobs:
213213
DISTRIB: 'debian-32'
214214
COVERAGE: "true"
215215
LOCK_FILE: './build_tools/azure/debian_32bit_lock.txt'
216-
# disable pytest xdist due to unknown bug with 32-bit container
217-
PYTEST_XDIST_VERSION: 'none'
218216
SKLEARN_TESTS_GLOBAL_RANDOM_SEED: '4' # non-default seed
219217

220218
- template: build_tools/azure/posix.yml

build_tools/azure/debian_32bit_lock.txt

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,11 @@ coverage[toml]==7.10.5
88
# via pytest-cov
99
cython==3.1.3
1010
# via -r build_tools/azure/debian_32bit_requirements.txt
11+
execnet==2.1.1
12+
# via pytest-xdist
1113
iniconfig==2.1.0
1214
# via pytest
13-
joblib==1.5.1
15+
joblib==1.5.2
1416
# via -r build_tools/azure/debian_32bit_requirements.txt
1517
meson==1.9.0
1618
# via meson-python
@@ -35,7 +37,10 @@ pytest==8.4.1
3537
# via
3638
# -r build_tools/azure/debian_32bit_requirements.txt
3739
# pytest-cov
40+
# pytest-xdist
3841
pytest-cov==6.2.1
3942
# via -r build_tools/azure/debian_32bit_requirements.txt
43+
pytest-xdist==3.8.0
44+
# via -r build_tools/azure/debian_32bit_requirements.txt
4045
threadpoolctl==3.6.0
4146
# via -r build_tools/azure/debian_32bit_requirements.txt

build_tools/azure/debian_32bit_requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ cython
55
joblib
66
threadpoolctl
77
pytest
8+
pytest-xdist
89
pytest-cov
910
ninja
1011
meson-python

build_tools/azure/test_script.sh

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,10 @@ if [[ "$COVERAGE" == "true" ]]; then
5959
fi
6060

6161
if [[ "$PYTEST_XDIST_VERSION" != "none" ]]; then
62-
XDIST_WORKERS=$(python -c "import joblib; print(joblib.cpu_count(only_physical_cores=True))")
63-
TEST_CMD="$TEST_CMD -n$XDIST_WORKERS"
62+
XDIST_WORKERS=$(python -c "import joblib; print(joblib.cpu_count())")
63+
if [[ "$XDIST_WORKERS" != 1 ]]; then
64+
TEST_CMD="$TEST_CMD -n$XDIST_WORKERS"
65+
fi
6466
fi
6567

6668
if [[ -n "$SELECTED_TESTS" ]]; then

build_tools/update_environments_and_lock_files.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -409,6 +409,7 @@ def remove_from(alist, to_remove):
409409
"joblib",
410410
"threadpoolctl",
411411
"pytest",
412+
"pytest-xdist",
412413
"pytest-cov",
413414
"ninja",
414415
"meson-python",

0 commit comments

Comments
 (0)