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.
This commit is contained in:
Kenny Levinsen 2021-09-21 13:11:55 +02:00
parent e2baadc230
commit 1c376ca9b1
5 changed files with 6 additions and 67 deletions

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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"

View file

@ -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"