Skip to content

Commit

Permalink
tests: run spread tests in fedora-40 (canonical#14099)
Browse files Browse the repository at this point in the history
* Adding new backends

As we cannot update the spread.yaml with the new backends, because
spread from master does not supported them. I added the new file with
the definitions which can be merged when it needs to be used.
A merging tool is comming next

* Add env details to openstack spread.yaml

* update disk for openstack

* update testflinger yaml config files

* openstack systems updated

* new script to add backend to spread.yaml

* add backend also to get failed tests

* add more workers to run fedora-40 tests
  • Loading branch information
sergiocazzolato authored Jun 20, 2024
1 parent 6647c77 commit 7f9afe8
Show file tree
Hide file tree
Showing 5 changed files with 180 additions and 0 deletions.
14 changes: 14 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -631,6 +631,10 @@ jobs:
backend: google-distro-1
systems: 'fedora-38-64 fedora-39-64'
tests: 'tests/...'
- group: fedora-os
backend: openstack
systems: 'fedora-40-64'
tests: 'tests/...'
- group: opensuse
backend: google-distro-2
systems: 'opensuse-15.5-64 opensuse-tumbleweed-64'
Expand Down Expand Up @@ -784,6 +788,11 @@ jobs:
export NO_DELTA=1
fi
# Add openstack backend definition to spread.yaml
if [ "${{ matrix.backend }}" = openstack ]; then
./tests/lib/spread/add-backend tests/lib/spread/backend.openstack.yaml spread.yaml
fi
RUN_TESTS=""
# Save previous failed test results in FAILED_TESTS env var
if [ -n "$FAILED_TESTS" ]; then
Expand Down Expand Up @@ -853,6 +862,11 @@ jobs:
RUN_TESTS="$FAILED_TESTS"
fi
# Add openstack backend definition to spread.yaml
if [ "${{ matrix.backend }}" = openstack ]; then
./tests/lib/spread/add-backend tests/lib/spread/backend.openstack.yaml spread.yaml
fi
echo "Running spread log analyzer"
./tests/lib/external/snapd-testing-tools/utils/log-analyzer list-reexecute-tasks "$RUN_TESTS" spread-results.json > "$FAILED_TESTS_FILE"
Expand Down
7 changes: 7 additions & 0 deletions tests/lib/spread/add-backend
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/bash

BACKENDS_PATH=$1
SPREAD_YAML=$2

echo "adding backend defined in $BACKENDS_PATH to the spread.yaml"
sed "/^backends:/r $BACKENDS_PATH" -i "$SPREAD_YAML"
31 changes: 31 additions & 0 deletions tests/lib/spread/backend.openstack.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
openstack:
key: '$(HOST: echo "$SPREAD_OPENSTACK_ENV")'
plan: staging-cpu2-ram4-disk50
halt-timeout: 2h
groups: [default]
environment:
HTTP_PROXY: 'http://squid.internal:3128'
HTTPS_PROXY: 'http://squid.internal:3128'
http_proxy: 'http://squid.internal:3128'
https_proxy: 'http://squid.internal:3128'
systems:
- ubuntu-22.04-arm-64:
image: ubuntu-jammy-22.04-arm64
workers: 1

- fedora-40-64:
image: fedora-40-64
workers: 6

- opensuse-15.5-64:
image: opensuse-15.5-64
workers: 1

- centos-9-64:
image: centos-9-64
workers: 1

- debian-12-64:
image: debian-12-64
workers: 1

82 changes: 82 additions & 0 deletions tests/lib/spread/backend.testflinger.beta.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
#this backend is used for edge validation
testflinger:
environment:
TRUST_TEST_KEYS: "false"
halt-timeout: 15h
wait-timeout: 3h
warn-timeout: 5m
kill-timeout: 14h
systems:
- ubuntu-core-16-arm-32-rpi2:
queue: cert-rpi2
image: https://storage.googleapis.com/snapd-spread-tests/images/pi2-16-stable-core_beta/pi2.img.xz
workers: 1
username: ubuntu
password: ubuntu
- ubuntu-core-18-arm-32-rpi2:
queue: cert-rpi2
image: https://storage.googleapis.com/snapd-spread-tests/images/pi2-18-stable-snapd_beta/pi.img.xz
workers: 1
username: ubuntu
password: ubuntu
- ubuntu-core-16-arm-64-dragonboard:
queue: dragonboard
image: https://storage.googleapis.com/snapd-spread-tests/images/dragonboard-16-stable-core_beta/dragonboard.img.xz
workers: 1
username: ubuntu
password: ubuntu
- ubuntu-core-18-arm-64-dragonboard:
queue: dragonboard
image: https://storage.googleapis.com/snapd-spread-tests/images/dragonboard-18-stable-snapd_beta/dragonboard.img.xz
workers: 1
username: ubuntu
password: ubuntu
- ubuntu-core-18-64-nuc:
queue: dawson-i-uc20-fde
image: https://storage.googleapis.com/snapd-spread-tests/images/pc-amd64-20-stable-snapd_beta/pc.img.xz
workers: 1
username: ubuntu
password: ubuntu
- ubuntu-core-16-arm-32-rpi3:
queue: rpi3b
image: https://storage.googleapis.com/snapd-spread-tests/images/pi3-16-stable-core_beta/pi3.img.xz
workers: 1
username: ubuntu
password: ubuntu
- ubuntu-core-18-arm-32-rpi3:
queue: rpi3b
image: https://storage.googleapis.com/snapd-spread-tests/images/pi3-18-stable-snapd_beta/pi.img.xz
workers: 1
username: ubuntu
password: ubuntu
- ubuntu-core-20-arm-32-rpi3:
queue: rpi3b
image: https://storage.googleapis.com/snapd-spread-tests/images/pi3-20-stable-snapd_beta/pi.img.xz
workers: 1
username: ubuntu
password: ubuntu
- ubuntu-core-22-arm-32-rpi3:
queue: rpi3b
image: https://storage.googleapis.com/snapd-spread-tests/images/pi3-22-stable-snapd_beta/pi.img.xz
workers: 1
username: ubuntu
password: ubuntu
- ubuntu-core-20-arm-64-rpi4:
queue: rpi4b8g
image: https://storage.googleapis.com/snapd-spread-tests/images/pi4-20-stable-snapd_beta/pi.img.xz
workers: 1
username: ubuntu
password: ubuntu
- ubuntu-core-22-arm-64-rpi4:
queue: rpi4b8g
image: https://storage.googleapis.com/snapd-spread-tests/images/pi4-22-stable-snapd_beta/pi.img.xz
workers: 1
username: ubuntu
password: ubuntu
- ubuntu-core-24-arm-64-rpi4:
queue: rpi4b8g
image: https://cdimage.ubuntu.com/ubuntu-core/24/beta/pending/ubuntu-core-24-arm64+raspi.img.xz
workers: 1
username: ubuntu
password: ubuntu

46 changes: 46 additions & 0 deletions tests/lib/spread/backend.testflinger.edge.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
#this backend is used for edge validation
testflinger:
environment:
TRUST_TEST_KEYS: "false"
halt-timeout: 3h
wait-timeout: 1h30m
warn-timeout: 5m
kill-timeout: 3h
systems:
- ubuntu-core-18-arm-32-rpi3:
queue: rpi3b
image: https://storage.googleapis.com/snapd-spread-tests/images/pi3-18-stable-core18_edge/pi.img.xz
workers: 1
username: ubuntu
password: ubuntu
- ubuntu-core-20-arm-32-rpi3:
queue: rpi3b
image: https://storage.googleapis.com/snapd-spread-tests/images/pi3-20-stable-core20_edge/pi.img.xz
workers: 1
username: ubuntu
password: ubuntu
- ubuntu-core-22-arm-32-rpi3:
queue: rpi3b
image: https://storage.googleapis.com/snapd-spread-tests/images/pi3-22-stable-core22_edge/pi.img.xz
workers: 1
username: ubuntu
password: ubuntu
- ubuntu-core-20-arm-64-rpi4:
queue: rpi4b8g
image: https://storage.googleapis.com/snapd-spread-tests/images/pi4-20-stable-core20_edge/pi.img.xz
workers: 1
username: ubuntu
password: ubuntu
- ubuntu-core-22-arm-64-rpi4:
queue: rpi4b8g
image: https://storage.googleapis.com/snapd-spread-tests/images/pi4-22-stable-core22_edge/pi.img.xz
workers: 1
username: ubuntu
password: ubuntu
- ubuntu-core-24-arm-64-rpi4:
queue: rpi4b8g
image: https://storage.googleapis.com/snapd-spread-tests/images/pi4-24-edge-core24_edge/pi.img.xz
workers: 1
username: ubuntu
password: ubuntu

0 comments on commit 7f9afe8

Please sign in to comment.