1#!/bin/sh
2
3set -ex
4
5mount -t proc none /proc
6mount -t sysfs none /sys
7mount -t devtmpfs none /dev || echo possibly already mounted
8mkdir -p /dev/pts
9mount -t devpts devpts /dev/pts
10mount -t tmpfs tmpfs /tmp
11
12. /crosvm-env.sh
13
14# / is ro
15export PIGLIT_REPLAY_EXTRA_ARGS="$PIGLIT_REPLAY_EXTRA_ARGS --db-path /tmp/replayer-db"
16
17if sh $CROSVM_TEST_SCRIPT; then
18    touch /results/success
19fi
20
21sleep 5   # Leave some time to get the last output flushed out
22
23poweroff -d -n -f || true
24
25sleep 10   # Just in case init would exit before the kernel shuts down the VM
26
27exit 1
28