panfrost: Avoid minimum stack allocations
[mesa.git] / .gitlab-ci / bare-metal / init.sh
old mode 100644 (file)
new mode 100755 (executable)
index da5006a..f956e61
@@ -1,26 +1,44 @@
 #!/bin/sh
 
+set -ex
+
 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
+mount -t tmpfs tmpfs /tmp
+
+. /set-job-env-vars.sh
+
+# Store Mesa's disk cache under /tmp, rather than sending it out over NFS.
+export XDG_CACHE_HOME=/tmp
+
+echo "nameserver 8.8.8.8" > /etc/resolv.conf
+
+# Not all DUTs have network
+sntp -sS pool.ntp.org || true
+
+# Start a little daemon to capture the first devcoredump we encounter.  (They
+# expire after 5 minutes, so we poll for them).
+./capture-devcoredump.sh &
+
+if sh $BARE_METAL_TEST_SCRIPT; then
+  OK=1
+else
+  OK=0
+fi
 
-export DEQP_NO_SAVE_RESULTS=1
-export DEQP_RUNNER_OPTIONS="--compact-display false"
-export DEQP_VER=DEQP_VER_REPLACE
-export DEQP_PARALLEL=DEQP_PARALLEL_REPLACE
-export CI_NODE_INDEX=CI_NODE_INDEX_REPLACE
-export CI_NODE_TOTAL=CI_NODE_TOTAL_REPLACE
-export DEQP_SKIPS=deqp-skips.txt
-if [ -e /artifacts/deqp-expected-fails.txt ]; then
-  export DEQP_EXPECTED_FAILS=deqp-expected-fails.txt
+# 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 sh /deqp/deqp-runner.sh; then
-    echo "DEQP RESULT: pass"
+if [ $OK -eq 1 ]; then
+    echo "bare-metal result: pass"
 else
-    echo "DEQP RESULT: fail"
+    echo "bare-metal result: fail"
 fi
 
 # Wait until the job would have timed out anyway, so we don't spew a "init