|
| 1 | +# SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. |
| 2 | +# SPDX-License-Identifier: Apache-2.0 |
| 3 | + |
| 4 | +project: openshell |
| 5 | + |
| 6 | +backends: |
| 7 | + garden: |
| 8 | + type: adhoc |
| 9 | + allocate: | |
| 10 | + if [ -n "${SPREAD_HOST_PATH-}" ]; then |
| 11 | + PATH="${SPREAD_HOST_PATH}" |
| 12 | + fi |
| 13 | + export QEMU_MEM_OPTION="-m 6144" |
| 14 | + export QEMU_SMP_OPTION="-smp $(nproc)" |
| 15 | + exec image-garden allocate --spread "$SPREAD_SYSTEM"."$(uname -m)" |
| 16 | + discard: | |
| 17 | + if [ -n "${SPREAD_HOST_PATH-}" ]; then |
| 18 | + PATH="${SPREAD_HOST_PATH}" |
| 19 | + fi |
| 20 | + image-garden discard "$SPREAD_SYSTEM_ADDRESS" |
| 21 | + systems: |
| 22 | + - ubuntu-cloud-24.04: |
| 23 | + username: ubuntu |
| 24 | + password: ubuntu |
| 25 | + - ubuntu-cloud-26.04: |
| 26 | + username: ubuntu |
| 27 | + password: ubuntu |
| 28 | + - debian-cloud-13: |
| 29 | + username: debian |
| 30 | + password: debian |
| 31 | + - fedora-cloud-44: |
| 32 | + username: fedora |
| 33 | + password: fedora |
| 34 | + - centos-cloud-10: |
| 35 | + username: centos |
| 36 | + password: centos |
| 37 | + |
| 38 | +exclude: |
| 39 | + - ".cache/*" |
| 40 | + - ".image-garden/*" |
| 41 | + - "target/*" |
| 42 | + |
| 43 | +path: /root/openshell |
| 44 | + |
| 45 | +prepare: | |
| 46 | + # Install the openshell snap that was copied into the test environment. |
| 47 | + snap install $(ls ./openshell_*.snap | sort -r | head -n 1) --dangerous |
| 48 | +
|
| 49 | + # Connect snap interfaces. When installing from the store this |
| 50 | + # is auto-connected by the snap declaration assertion, but locally |
| 51 | + # we need to do it manually. |
| 52 | + snap connect openshell:docker docker:docker-daemon |
| 53 | + snap connect openshell:log-observe |
| 54 | + snap connect openshell:system-observe |
| 55 | + snap connect openshell:ssh-keys |
| 56 | +
|
| 57 | + # Add the local gateway to user configuration. |
| 58 | + openshell gateway add http://127.0.0.1:17670 --local --name snap-docker |
| 59 | + openshell gateway select snap-docker |
| 60 | + openshell status |
| 61 | +
|
| 62 | +debug-each: | |
| 63 | + echo "Kernel and architecture:" |
| 64 | + uname -a |
| 65 | +
|
| 66 | + echo "OS release info:" |
| 67 | + cat /etc/os-release |
| 68 | +
|
| 69 | + echo "Installed snaps:" |
| 70 | + snap list |
| 71 | +
|
| 72 | + set +e |
| 73 | +
|
| 74 | + echo "Snap connections of the openshell snap:" |
| 75 | + snap connections openshell |
| 76 | +
|
| 77 | + echo "Openshell version:" |
| 78 | + snap run openshell --version |
| 79 | +
|
| 80 | +suites: |
| 81 | + tests/: |
| 82 | + summary: Smoke tests for OpenShell snap |
0 commit comments