mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-01-07 22:35:06 +08:00
f1b952fa73
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>
44 lines
1.1 KiB
Bash
Executable File
44 lines
1.1 KiB
Bash
Executable File
#!/bin/sh
|
|
|
|
set -x
|
|
|
|
ln -sf $CI_PROJECT_DIR/install /install
|
|
|
|
export LD_LIBRARY_PATH=$CI_PROJECT_DIR/install/lib/
|
|
export EGL_PLATFORM=surfaceless
|
|
|
|
export -p > /crosvm-env.sh
|
|
|
|
CROSVM_KERNEL_ARGS="root=my_root rw rootfstype=virtiofs loglevel=3 init=$CI_PROJECT_DIR/install/crosvm-init.sh ip=192.168.30.2::192.168.30.1:255.255.255.0:crosvm:eth0"
|
|
|
|
# Temporary results dir because from the guest we cannot write to /
|
|
mkdir -p /results
|
|
mount -t tmpfs tmpfs /results
|
|
|
|
mkdir -p /piglit/.gitlab-ci/piglit
|
|
mount -t tmpfs tmpfs /piglit/.gitlab-ci/piglit
|
|
|
|
unset DISPLAY
|
|
unset XDG_RUNTIME_DIR
|
|
|
|
/usr/sbin/iptables-legacy -t nat -A POSTROUTING -o eth0 -j MASQUERADE
|
|
echo 1 > /proc/sys/net/ipv4/ip_forward
|
|
|
|
# Crosvm wants this
|
|
syslogd > /dev/null
|
|
|
|
crosvm run \
|
|
--gpu gles=false,backend=3d,egl=true,surfaceless=true \
|
|
-m 4096 \
|
|
-c 4 \
|
|
--disable-sandbox \
|
|
--shared-dir /:my_root:type=fs:writeback=true:timeout=60:cache=always \
|
|
--host_ip=192.168.30.1 --netmask=255.255.255.0 --mac "AA:BB:CC:00:00:12" \
|
|
-p "$CROSVM_KERNEL_ARGS" \
|
|
/lava-files/bzImage
|
|
|
|
mkdir -p $CI_PROJECT_DIR/results
|
|
mv /results/* $CI_PROJECT_DIR/results/.
|
|
|
|
test -f $CI_PROJECT_DIR/results/success
|