aboutsummaryrefslogtreecommitdiff
path: root/.builds
diff options
context:
space:
mode:
authorKenny Levinsen <kl@kl.wtf>2020-08-01 02:47:45 +0200
committerKenny Levinsen <kl@kl.wtf>2020-08-01 16:53:44 +0200
commit509e64a3412985c85f9f58bd2b53434f056cf4c0 (patch)
tree1558aa772eafacbc0a04142a4c28ca7a92ed49e6 /.builds
parent2462284dc5675623083b9c8b67a3cd5bf1d6f878 (diff)
simpletest: Take file to open as argument
Diffstat (limited to '.builds')
-rwxr-xr-x.builds/smoketest-builtin.sh15
-rwxr-xr-x.builds/smoketest-seatd.sh14
2 files changed, 27 insertions, 2 deletions
diff --git a/.builds/smoketest-builtin.sh b/.builds/smoketest-builtin.sh
index acf4640..9673922 100755
--- a/.builds/smoketest-builtin.sh
+++ b/.builds/smoketest-builtin.sh
@@ -1,6 +1,19 @@
#!/bin/sh
res=0
+
+# 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
#
@@ -8,7 +21,7 @@ cnt=0
while [ "$cnt" -lt 5 ]
do
echo "Simpletest run $cnt"
- if ! sudo LIBSEAT_BACKEND=builtin LIBSEAT_LOGLEVEL=debug SEATD_SOCK=./seatd.sock ./build/simpletest
+ if ! sudo LIBSEAT_BACKEND=builtin LIBSEAT_LOGLEVEL=debug SEATD_SOCK=./seatd.sock ./build/simpletest $file
then
echo "Simpletest failed"
res=1
diff --git a/.builds/smoketest-seatd.sh b/.builds/smoketest-seatd.sh
index ec97a1f..4e6e0e8 100755
--- a/.builds/smoketest-seatd.sh
+++ b/.builds/smoketest-seatd.sh
@@ -22,6 +22,18 @@ fi
sudo chmod 777 ./seatd.sock
+# 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
#
@@ -29,7 +41,7 @@ cnt=0
while [ "$cnt" -lt 5 ]
do
echo "Simpletest run $cnt"
- if ! LIBSEAT_LOGLEVEL=debug SEATD_SOCK=./seatd.sock ./build/simpletest
+ if ! LIBSEAT_LOGLEVEL=debug SEATD_SOCK=./seatd.sock ./build/simpletest $file
then
echo "Simpletest failed"
sudo killall seatd