2020-03-03 22:38:09 +00:00
|
|
|
#!/bin/sh
|
|
|
|
|
2020-03-03 22:38:09 +00:00
|
|
|
set -ex
|
|
|
|
|
2020-03-03 22:38:09 +00:00
|
|
|
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
|
2020-07-20 18:46:51 +01:00
|
|
|
mount -t tmpfs tmpfs /tmp
|
2020-03-03 22:38:09 +00:00
|
|
|
|
2020-05-04 21:42:41 +01:00
|
|
|
. /set-job-env-vars.sh
|
|
|
|
|
2020-07-20 18:46:51 +01:00
|
|
|
# Store Mesa's disk cache under /tmp, rather than sending it out over NFS.
|
|
|
|
export XDG_CACHE_HOME=/tmp
|
|
|
|
|
2020-05-01 17:57:00 +01:00
|
|
|
echo "nameserver 8.8.8.8" > /etc/resolv.conf
|
|
|
|
|
2020-07-21 14:46:06 +01:00
|
|
|
# Overwrite traces.yml file with the baremetal version
|
|
|
|
cp /install/traces-baremetal.yml /install/traces.yml
|
|
|
|
|
2020-06-08 23:23:52 +01:00
|
|
|
if sh $BARE_METAL_TEST_SCRIPT; then
|
2020-06-10 13:44:17 +01:00
|
|
|
OK=1
|
|
|
|
else
|
|
|
|
OK=0
|
|
|
|
fi
|
|
|
|
|
|
|
|
# upload artifacts via webdav
|
|
|
|
WEBDAV=$(cat /proc/cmdline | tr " " "\n" | grep webdav | cut -d '=' -f 2 || true)
|
|
|
|
if [ -n "$WEBDAV" ]; then
|
|
|
|
find /results -type f -exec curl -T {} $WEBDAV/{} \;
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ $OK -eq 1 ]; then
|
2020-06-08 22:55:53 +01:00
|
|
|
echo "bare-metal result: pass"
|
2020-03-03 22:38:09 +00:00
|
|
|
else
|
2020-06-08 22:55:53 +01:00
|
|
|
echo "bare-metal result: fail"
|
2020-03-03 22:38:09 +00:00
|
|
|
fi
|
|
|
|
|
|
|
|
# Wait until the job would have timed out anyway, so we don't spew a "init
|
|
|
|
# exited" panic.
|
|
|
|
sleep 6000
|