From 011813ff5c46ff706cd8994bdd1a03a61a2f0841 Mon Sep 17 00:00:00 2001 From: Kir Kolyshkin Date: Tue, 8 Jul 2025 22:33:28 -0700 Subject: [PATCH] tests: run all py tests with cgroupfs and systemd Many python tests do not run with systemd, and it makes sense to do so. Signed-off-by: Kir Kolyshkin --- tests/run_all_tests.sh | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/tests/run_all_tests.sh b/tests/run_all_tests.sh index e869470653..7864d6d1db 100755 --- a/tests/run_all_tests.sh +++ b/tests/run_all_tests.sh @@ -13,9 +13,19 @@ if [ -t 1 ]; then COLOR="yes" fi -for i in test_*.py -do - ./tap-driver.sh --test-name "$i" --log-file "$i.log" --trs-file "$i.trs" --color-tests "${COLOR}" --enable-hard-errors yes --expect-failure no -- /usr/bin/python "$i" +managers="cgroupfs" +if grep -q systemd /proc/1/comm && $OCI_RUNTIME --version | grep -qF +SYSTEMD; then + managers="$managers systemd" +fi + +for cm in cgroupfs systemd; do + export CGROUP_MANAGER=$cm + echo "#" + echo "# CGROUP_MANAGER=$cm" + echo "#" + for i in test_*.py; do + ./tap-driver.sh --test-name "$i" --log-file "${i}_${cm}.log" --trs-file "${i}_${cm}.trs" --color-tests "${COLOR}" --enable-hard-errors yes --expect-failure no -- /usr/bin/python "$i" + done done if grep FAIL -- *.trs; then