aboutsummaryrefslogtreecommitdiffstats
path: root/.gitlab-ci/bare-metal/fastboot.sh
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2020-05-15 09:57:25 -0700
committerMarge Bot <[email protected]>2020-05-29 16:46:44 +0000
commitc89a749f66527caf72c43b433dc27de1594a87f6 (patch)
treedc277279c87a7949400e757cb0f23158f693464b /.gitlab-ci/bare-metal/fastboot.sh
parent3a1010e21ac426736fb9af289570d3fbbaaa1884 (diff)
ci: Add scripts for controlling bare-metal chezas.
This will let us: - deploy kernels for testing code depending on new kernel featuers - Ensure a pristine state in the HW before starting our tests - Avoid disk rot on the chezas taking them out (we'd lost 3/9 in a few months). Reviewed-by: Kristian H. Kristensen <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5247>
Diffstat (limited to '.gitlab-ci/bare-metal/fastboot.sh')
-rwxr-xr-x.gitlab-ci/bare-metal/fastboot.sh54
1 files changed, 3 insertions, 51 deletions
diff --git a/.gitlab-ci/bare-metal/fastboot.sh b/.gitlab-ci/bare-metal/fastboot.sh
index 221d8efc26e..124309e8abe 100755
--- a/.gitlab-ci/bare-metal/fastboot.sh
+++ b/.gitlab-ci/bare-metal/fastboot.sh
@@ -44,57 +44,9 @@ fi
set -ex
-# Copy the rootfs to a temporary for our setup, as I believe changes to the
-# container can end up impacting future runs.
-cp -Rp $BM_ROOTFS rootfs
-
-# Set up the init script that brings up the system.
-cp $BM/init.sh rootfs/init
-
-set +x
-# Pass through relevant env vars from the gitlab job to the baremetal init script
-touch rootfs/set-job-env-vars.sh
-chmod +x rootfs/set-job-env-vars.sh
-for var in \
- CI_COMMIT_BRANCH \
- CI_COMMIT_TITLE \
- CI_JOB_ID \
- CI_JOB_URL \
- CI_MERGE_REQUEST_SOURCE_BRANCH_NAME \
- CI_MERGE_REQUEST_TITLE \
- CI_NODE_INDEX \
- CI_NODE_TOTAL \
- CI_PIPELINE_ID \
- CI_RUNNER_DESCRIPTION \
- DEQP_CASELIST_FILTER \
- DEQP_EXPECTED_RENDERER \
- DEQP_NO_SAVE_RESULTS \
- DEQP_PARALLEL \
- DEQP_RUN_SUFFIX \
- DEQP_VER \
- FD_MESA_DEBUG \
- FLAKES_CHANNEL \
- IR3_SHADER_DEBUG \
- NIR_VALIDATE \
- ; do
- val=`echo ${!var} | sed 's|"||g'`
- echo "export $var=\"${val}\"" >> rootfs/set-job-env-vars.sh
-done
-echo "Variables passed through:"
-cat rootfs/set-job-env-vars.sh
-set -x
-
-# Add the Mesa drivers we built, and make a consistent symlink to them.
-mkdir -p rootfs/$CI_PROJECT_DIR
-tar -C rootfs/$CI_PROJECT_DIR/ -xf $CI_PROJECT_DIR/artifacts/install.tar
-ln -sf $CI_PROJECT_DIR/install rootfs/install
-
-# Copy the deqp runner script and metadata.
-cp .gitlab-ci/deqp-runner.sh rootfs/deqp/.
-cp .gitlab-ci/$DEQP_SKIPS rootfs/$CI_PROJECT_DIR/install/deqp-skips.txt
-if [ -n "$DEQP_EXPECTED_FAILS" ]; then
- cp .gitlab-ci/$DEQP_EXPECTED_FAILS rootfs/$CI_PROJECT_DIR/install/deqp-expected-fails.txt
-fi
+# Create the rootfs in a temp dir
+mkdir rootfs
+. .gitlab-ci/bare-metal/rootfs-setup.sh rootfs
# Finally, pack it up into a cpio rootfs.
pushd rootfs