From 578ba4aca112f9f115f0dd8c72119c4105aebb46 Mon Sep 17 00:00:00 2001 From: Daniel Baston Date: Sun, 29 Oct 2023 16:25:46 -0400 Subject: [PATCH] CI: Have Ubuntu 20.04 config run Python tests in random order, parallel --- .github/workflows/ubuntu_20.04/test.sh | 10 +++++++++- autotest/requirements.txt | 3 +++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ubuntu_20.04/test.sh b/.github/workflows/ubuntu_20.04/test.sh index 99fddfe23d8d..dd94aed00ba5 100755 --- a/.github/workflows/ubuntu_20.04/test.sh +++ b/.github/workflows/ubuntu_20.04/test.sh @@ -4,4 +4,12 @@ set -eu export OGR_HANA_CONNECTION_STRING='DRIVER=/usr/sap/hdbclient/libodbcHDB.so;HOST=917df316-4e01-4a10-be54-eac1b6ab15fb.hana.prod-us10.hanacloud.ondemand.com;PORT=443;USER=GDALCI;PASSWORD=u7t!Ukeugzq7' -ctest -V -j $(nproc) +# run all tests except python tests (prefixed with "autotest") +ctest -V -j $(nproc) -E autotest + +# run python tests in random order / parallel where possible +. ../scripts/setdevenv.sh +cd autotest +pytest --timeout 120 gnm pyscripts/gdal2tiles +pytest --timeout 120 --random-order alg gcore gdrivers ogr +pytest --timeout 120 --random-order -n $(nproc) pyscripts utilities diff --git a/autotest/requirements.txt b/autotest/requirements.txt index 61697e503875..15ef0fdb9c71 100644 --- a/autotest/requirements.txt +++ b/autotest/requirements.txt @@ -3,6 +3,9 @@ pytest-sugar<=0.9.6; python_version < '3.7' pytest-sugar; python_version >= '3.7' pytest-env pytest-benchmark +pytest-random-order +pytest-timeout +pytest-xdist lxml jsonschema filelock