blob: f956e61f79fd36c6c7b57b0ff9107a3f7cb11b9f [file] [log] [blame]
Eric Anholtcf5ba9d2020-03-03 14:38:09 -08001#!/bin/sh
2
Eric Anholt4bc15e72020-03-03 14:38:09 -08003set -ex
4
Eric Anholtcf5ba9d2020-03-03 14:38:09 -08005mount -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
Eric Anholt8b3452a2020-07-20 10:46:51 -070010mount -t tmpfs tmpfs /tmp
Eric Anholtcf5ba9d2020-03-03 14:38:09 -080011
Eric Anholtc7bbc212020-05-04 13:42:41 -070012. /set-job-env-vars.sh
13
Eric Anholt8b3452a2020-07-20 10:46:51 -070014# Store Mesa's disk cache under /tmp, rather than sending it out over NFS.
15export XDG_CACHE_HOME=/tmp
16
Eric Anholt3b5e71c2020-05-01 09:57:00 -070017echo "nameserver 8.8.8.8" > /etc/resolv.conf
18
Tomeu Vizosod4ca45e2020-07-31 08:13:15 +020019# Not all DUTs have network
20sntp -sS pool.ntp.org || true
21
Eric Anholtcb822742020-07-22 13:59:49 -070022# Start a little daemon to capture the first devcoredump we encounter. (They
23# expire after 5 minutes, so we poll for them).
24./capture-devcoredump.sh &
25
Eric Anholt445f3eb2020-06-08 15:23:52 -070026if sh $BARE_METAL_TEST_SCRIPT; then
Christian Gmeiner096adbe2020-06-10 14:44:17 +020027 OK=1
28else
29 OK=0
30fi
31
32# upload artifacts via webdav
33WEBDAV=$(cat /proc/cmdline | tr " " "\n" | grep webdav | cut -d '=' -f 2 || true)
34if [ -n "$WEBDAV" ]; then
35 find /results -type f -exec curl -T {} $WEBDAV/{} \;
36fi
37
38if [ $OK -eq 1 ]; then
Eric Anholta13209b2020-06-08 14:55:53 -070039 echo "bare-metal result: pass"
Eric Anholtcf5ba9d2020-03-03 14:38:09 -080040else
Eric Anholta13209b2020-06-08 14:55:53 -070041 echo "bare-metal result: fail"
Eric Anholtcf5ba9d2020-03-03 14:38:09 -080042fi
43
44# Wait until the job would have timed out anyway, so we don't spew a "init
45# exited" panic.
46sleep 6000