diff options
author | Kenny Levinsen <kl@kl.wtf> | 2021-09-21 13:11:55 +0200 |
---|---|---|
committer | Kenny Levinsen <kl@kl.wtf> | 2021-09-21 13:11:55 +0200 |
commit | 1c376ca9b13458b1e4ad0da20c8d35729fa09d4b (patch) | |
tree | 7612bb54fafc83538d78a8d1c8189e6ff18cb63a | |
parent | e2baadc23047edaccc4a7d3d95e6ba8c30f75851 (diff) |
ci: Inline smoketest into build scripts
The smoketest script has gotten significantly simpler, and can simply be
inlined into the build scripts if we don't care about running the tests
twice.
This should fix CI for mailing list patches.
-rw-r--r-- | .builds/alpine.yml | 4 | ||||
-rw-r--r-- | .builds/archlinux.yml | 4 | ||||
-rw-r--r-- | .builds/freebsd.yml | 4 | ||||
-rwxr-xr-x | .builds/smoketest-builtin.sh | 30 | ||||
-rwxr-xr-x | .builds/smoketest-seatd.sh | 31 |
5 files changed, 6 insertions, 67 deletions
diff --git a/.builds/alpine.yml b/.builds/alpine.yml index 20f5fef..bb8904a 100644 --- a/.builds/alpine.yml +++ b/.builds/alpine.yml @@ -20,9 +20,9 @@ tasks: ninja -C build scan-build [ -z "$(ls -A build/meson-logs/scanbuild/ 2>/dev/null)" ] - smoketest: | - timeout -s KILL 30s ./seatd/.builds/smoketest-seatd.sh + timeout -s KILL 30s sudo SEATD_LOGLEVEL=debug ./build/seatd-launch ./build/simpletest /dev/dri/card0 - smoketest-builtin: | - timeout -s KILL 30s ./seatd/.builds/smoketest-builtin.sh + timeout -s KILL 30s sudo LIBSEAT_BACKEND=builtin ./build/simpletest /dev/dri/card0 - check-format: | ninja -C build clang-format git -C seatd diff --exit-code diff --git a/.builds/archlinux.yml b/.builds/archlinux.yml index 3f7463c..bc3229a 100644 --- a/.builds/archlinux.yml +++ b/.builds/archlinux.yml @@ -19,6 +19,6 @@ tasks: ninja -C build scan-build [ -z "$(ls -A build/meson-logs/scanbuild/ 2>/dev/null)" ] - smoketest: | - timeout -s KILL 30s ./seatd/.builds/smoketest-seatd.sh + timeout -s KILL 30s sudo SEATD_LOGLEVEL=debug ./build/seatd-launch ./build/simpletest /dev/input/event0 - smoketest-builtin: | - timeout -s KILL 30s ./seatd/.builds/smoketest-builtin.sh + timeout -s KILL 30s sudo LIBSEAT_BACKEND=builtin ./build/simpletest /dev/input/event0 diff --git a/.builds/freebsd.yml b/.builds/freebsd.yml index 79bee15..b4bc7da 100644 --- a/.builds/freebsd.yml +++ b/.builds/freebsd.yml @@ -15,6 +15,6 @@ tasks: meson -Db_lundef=false -Db_sanitize=address -Dlibseat-seatd=enabled -Dlibseat-builtin=enabled -Dexamples=enabled -Dlibseat-logind=disabled build seatd ninja -C build sudo ninja -C build install - timeout -s KILL 30s ./seatd/.builds/smoketest-seatd.sh + timeout -s KILL 30s sudo SEATD_LOGLEVEL=debug ./build/seatd-launch ./build/simpletest /dev/input/event0 - smoketest-builtin: | - timeout -s KILL 30s ./seatd/.builds/smoketest-builtin.sh + timeout -s KILL 30s sudo LIBSEAT_BACKEND=builtin ./build/simpletest /dev/input/event0 diff --git a/.builds/smoketest-builtin.sh b/.builds/smoketest-builtin.sh deleted file mode 100755 index 332c3f9..0000000 --- a/.builds/smoketest-builtin.sh +++ /dev/null @@ -1,30 +0,0 @@ -#!/bin/sh - -# Devices that exist on sr.ht -if [ -e "/dev/input/event0" ] -then - file="/dev/input/event0" -elif [ -e "/dev/dri/card0" ] -then - file="/dev/dri/card0" -else - echo "No useful device file found" - exit 1 -fi - -# -# Run simpletest a few times -# -cnt=0 -while [ "$cnt" -lt 2 ] -do - echo "Simpletest run $((cnt+1))" - if ! sudo LIBSEAT_BACKEND=builtin ./build/simpletest $file - then - echo "Simpletest failed" - exit $res - fi - cnt=$((cnt+1)) -done - -echo "smoketest-builtin completed" diff --git a/.builds/smoketest-seatd.sh b/.builds/smoketest-seatd.sh deleted file mode 100755 index f471928..0000000 --- a/.builds/smoketest-seatd.sh +++ /dev/null @@ -1,31 +0,0 @@ -#!/bin/sh - -# Devices that exist on sr.ht -if [ -e "/dev/input/event0" ] -then - file="/dev/input/event0" -elif [ -e "/dev/dri/card0" ] -then - file="/dev/dri/card0" -else - echo "No useful device file found" - exit 1 -fi - -export SEATD_LOGLEVEL=debug -# -# Run simpletest a few times -# -cnt=0 -while [ "$cnt" -lt 2 ] -do - echo "Simpletest run $((cnt+1))" - if ! sudo -E ./build/seatd-launch ./build/simpletest $file - then - echo "Simpletest failed" - exit 1 - fi - cnt=$((cnt+1)) -done - -echo "smoketest-seatd completed" |