From 9791b47d1067056167e49a6ea2789a5c87c63c1d Mon Sep 17 00:00:00 2001 From: Maciek Borzecki Date: Tue, 30 Jan 2024 16:14:40 +0100 Subject: [PATCH] spread: add suite for testing with hosted repository Signed-off-by: Maciek Borzecki --- spread.yaml | 28 ++++++++++++++++++++++++++++ spread/prebuilt-repo | 1 + 2 files changed, 29 insertions(+) create mode 120000 spread/prebuilt-repo diff --git a/spread.yaml b/spread.yaml index 6991a16..3714f84 100644 --- a/spread.yaml +++ b/spread.yaml @@ -7,6 +7,7 @@ environment: PATH: $PATH:/home/spread/spread/tests/lib/bin LANG: "C.UTF-8" LANGUAGE: "en" + BASE_REPO_URL: https://bboozzoo.github.io/snapd-amazon-linux backends: google: @@ -84,5 +85,32 @@ suites: rm -f /etc/yum.repos.d/spread.repo rm -rfv "$SPREAD_PATH/repo-unpacked" + spread/prebuilt-repo/: + summary: run tests with prebuilt packages in the repository + prepare: | + # set up a place to unpack the repo + case "$SPREAD_SYSTEM" in + amazon-linux-2-*) + repo_suffix=amzn2 + ;; + amazon-linux-2023-*) + repo_suffix=al2023 + ;; + *) + echo "unsupported $SPREAD_SYSTEM system" + exit 1 + ;; + esac + wget -O /etc/yum.repos.d/snapd.repo ${BASE_REPO_URL}/${repo_suffix}/snapd.repo + # install snapd + yum install -y snapd + systemctl start snapd.socket + # wait for snapd to become ready + snap wait system seed.loaded + + restore: | + yum erase -y snapd snap-confine + rm -f /etc/yum.repos.d/snapd.repo + spread/build/: summary: package build diff --git a/spread/prebuilt-repo b/spread/prebuilt-repo new file mode 120000 index 0000000..06fa9af --- /dev/null +++ b/spread/prebuilt-repo @@ -0,0 +1 @@ +prebuilt \ No newline at end of file