• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#!/bin/sh
2
3set -x
4
5ln -sf $CI_PROJECT_DIR/install /install
6
7export LD_LIBRARY_PATH=$CI_PROJECT_DIR/install/lib/
8export EGL_PLATFORM=surfaceless
9
10export -p > /crosvm-env.sh
11export GALLIUM_DRIVER="$CROSVM_GALLIUM_DRIVER"
12export GALLIVM_PERF="nopt"
13export LIBGL_ALWAYS_SOFTWARE="true"
14
15CROSVM_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"
16
17# Temporary results dir because from the guest we cannot write to /
18mkdir -p /results
19mount -t tmpfs tmpfs /results
20
21mkdir -p /piglit/.gitlab-ci/piglit
22mount -t tmpfs tmpfs /piglit/.gitlab-ci/piglit
23
24unset DISPLAY
25unset XDG_RUNTIME_DIR
26
27/usr/sbin/iptables-legacy  -t nat -A POSTROUTING -o eth0 -j MASQUERADE
28echo 1 > /proc/sys/net/ipv4/ip_forward
29
30# Crosvm wants this
31syslogd > /dev/null
32
33# We aren't testing LLVMPipe here, so we don't need to validate NIR on the host
34export NIR_VALIDATE=0
35
36crosvm run \
37  --gpu "$CROSVM_GPU_ARGS" \
38  -m 4096 \
39  -c $((FDO_CI_CONCURRENT > 1 ? FDO_CI_CONCURRENT - 1 : 1)) \
40  --disable-sandbox \
41  --shared-dir /:my_root:type=fs:writeback=true:timeout=60:cache=always \
42  --host_ip=192.168.30.1 --netmask=255.255.255.0 --mac "AA:BB:CC:00:00:12" \
43  -p "$CROSVM_KERNEL_ARGS" \
44  /lava-files/bzImage
45
46mkdir -p $CI_PROJECT_DIR/results
47mv /results/* $CI_PROJECT_DIR/results/.
48
49test -f $CI_PROJECT_DIR/results/success
50