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. /set-job-env-vars.sh 13 14# Store Mesa's disk cache under /tmp, rather than sending it out over NFS. 15export XDG_CACHE_HOME=/tmp 16 17echo "nameserver 8.8.8.8" > /etc/resolv.conf 18 19# Not all DUTs have network 20sntp -sS pool.ntp.org || true 21 22# 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 26if sh $BARE_METAL_TEST_SCRIPT; then 27 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 39 echo "bare-metal result: pass" 40else 41 echo "bare-metal result: fail" 42fi 43 44# Wait until the job would have timed out anyway, so we don't spew a "init 45# exited" panic. 46sleep 6000 47