ci: Run tests inside Crosvm
Allow running tests within Crosvm for testing the virtio-gpu winsys in Virgl, tested with Piglit only for now. Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10862>
This commit is contained in:
25
.gitlab-ci/crosvm-init.sh
Executable file
25
.gitlab-ci/crosvm-init.sh
Executable file
@@ -0,0 +1,25 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -ex
|
||||
|
||||
mount -t proc none /proc
|
||||
mount -t sysfs none /sys
|
||||
mount -t devtmpfs none /dev || echo possibly already mounted
|
||||
mkdir -p /dev/pts
|
||||
mount -t devpts devpts /dev/pts
|
||||
mount -t tmpfs tmpfs /tmp
|
||||
|
||||
. /crosvm-env.sh
|
||||
|
||||
# / is ro
|
||||
export PIGLIT_REPLAY_EXTRA_ARGS="$PIGLIT_REPLAY_EXTRA_ARGS --db-path /tmp/replayer-db"
|
||||
|
||||
if sh $CROSVM_TEST_SCRIPT; then
|
||||
touch /results/success
|
||||
fi
|
||||
|
||||
poweroff -d -n -f || true
|
||||
|
||||
sleep 10 # Just in case init would exit before the kernel shuts down the VM
|
||||
|
||||
exit 1
|
||||
Reference in New Issue
Block a user