ci/lava: Use common stage-2 init
Now that our job-execution scripts look very similar for LAVA and bare-metal, we can just tell LAVA to use the same stage-2 init we use for bare-metal and delete a bunch of duplication. Signed-off-by: Daniel Stone <daniels@collabora.com> Acked-by: Martin Peres <martin.peres@mupuf.org> Acked-by: Emma Anholt <emma@anholt.net> Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11337>
This commit is contained in:
parent
759dcb482d
commit
8f934e96e1
|
@ -63,10 +63,17 @@ if sh $HWCI_TEST_SCRIPT; then
|
|||
RESULT=pass
|
||||
fi
|
||||
|
||||
# upload artifacts via webdav
|
||||
# upload artifacts
|
||||
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
|
||||
|
||||
MINIO=$(cat /proc/cmdline | tr ' ' '\n' | grep minio_results | cut -d '=' -f 2 || true)
|
||||
if [ -n "$MINIO" ]; then
|
||||
tar -czf results.tar.gz results/;
|
||||
ci-fairy minio login "$CI_JOB_JWT";
|
||||
ci-fairy minio cp results.tar.gz minio://"$MINIO"/results.tar.gz;
|
||||
fi
|
||||
|
||||
echo "hwci: mesa: $RESULT"
|
||||
|
|
|
@ -18,6 +18,7 @@ mkdir -p results/job-rootfs-overlay/
|
|||
# from the DUT
|
||||
export PIGLIT_REPLAY_UPLOAD_TO_MINIO=1
|
||||
cp artifacts/ci-common/capture-devcoredump.sh results/job-rootfs-overlay/
|
||||
cp artifacts/ci-common/init-*.sh results/job-rootfs-overlay/
|
||||
artifacts/ci-common/generate-env.sh > results/job-rootfs-overlay/set-job-env-vars.sh
|
||||
|
||||
tar zcf job-rootfs-overlay.tar.gz -C results/job-rootfs-overlay/ .
|
||||
|
|
|
@ -85,62 +85,8 @@ actions:
|
|||
- mkdir -p $CI_PROJECT_DIR
|
||||
- wget -S --progress=dot:giga -O- {{ mesa_build_url }} | tar -xz -C $CI_PROJECT_DIR
|
||||
- wget -S --progress=dot:giga -O- {{ job_rootfs_overlay_url }} | tar -xz -C /
|
||||
- . /set-job-env-vars.sh
|
||||
- ln -sf $CI_PROJECT_DIR/install /install
|
||||
|
||||
# Set up our devices
|
||||
- '[ -z "$HWCI_KERNEL_MODULES" ] || (echo -n $HWCI_KERNEL_MODULES | xargs -d, -n1 /usr/sbin/modprobe)'
|
||||
|
||||
# Disable GPU frequency scaling
|
||||
- DEVFREQ_GOVERNOR=`find /sys/devices -name governor | grep gpu || true`
|
||||
- echo performance > $DEVFREQ_GOVERNOR || true
|
||||
|
||||
# Disable CPU frequency scaling
|
||||
- echo performance | tee -a /sys/devices/system/cpu/cpufreq/policy*/scaling_governor || true
|
||||
|
||||
# Disable GPU runtime PM
|
||||
- GPU_AUTOSUSPEND=`find /sys/devices -name autosuspend_delay_ms | grep gpu | head -1`
|
||||
- echo -1 > $GPU_AUTOSUSPEND || true
|
||||
|
||||
- ./capture-devcoredump.sh &
|
||||
|
||||
- export CI_JOB_JWT="{{ jwt }}"
|
||||
# Store Mesa's disk cache under /tmp, rather than sending it out over NFS.
|
||||
- export XDG_CACHE_HOME=/tmp
|
||||
|
||||
- export PYTHONPATH=$(python3 -c "import sys;print(\":\".join(sys.path))")
|
||||
- export LD_LIBRARY_PATH=/install/lib/
|
||||
- export LIBGL_DRIVERS_PATH=/install/lib/dri
|
||||
|
||||
# If we want Xorg to be running for the test, then we start it up before the
|
||||
# HWCI_TEST_SCRIPT because we need to use xinit to start X (otherwise
|
||||
# without using -displayfd you can race with Xorg's startup), but xinit will eat
|
||||
# your client's return code
|
||||
- "if [ -n $HWCI_START_XORG ]; then
|
||||
echo 'touch /xorg-started; sleep 100000' > /xorg-script;
|
||||
env xinit /bin/sh /xorg-script -- /usr/bin/Xorg -noreset -s 0 -dpms -logfile /Xorg.0.log &
|
||||
for i in 1 2 3 4 5; do
|
||||
if [ -e /xorg-started ]; then
|
||||
break;
|
||||
fi;
|
||||
sleep 5;
|
||||
done;
|
||||
export DISPLAY=:0;
|
||||
fi"
|
||||
|
||||
- "export RESULT=fail;
|
||||
if sh $HWCI_TEST_SCRIPT; then
|
||||
export RESULT=pass;
|
||||
fi"
|
||||
|
||||
- "MINIO=$(cat /proc/cmdline | tr ' ' '\n' | grep minio_results | cut -d '=' -f 2 || true)
|
||||
if [ -n $MINIO ]; then
|
||||
tar -czf results.tar.gz results/;
|
||||
ci-fairy minio login $CI_JOB_JWT;
|
||||
ci-fairy minio cp results.tar.gz minio://$MINIO/results.tar.gz;
|
||||
fi"
|
||||
|
||||
- "echo hwci: mesa: $RESULT"
|
||||
- exec /init-stage2.sh
|
||||
parse:
|
||||
pattern: 'hwci: (?P<test_case_id>\S*):\s+(?P<result>(pass|fail))'
|
||||
from: inline
|
||||
|
|
Loading…
Reference in New Issue