File: task.yaml

package info (click to toggle)
snapd 2.71-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 79,536 kB
  • sloc: ansic: 16,114; sh: 16,105; python: 9,941; makefile: 1,890; exp: 190; awk: 40; xml: 22
file content (48 lines) | stat: -rw-r--r-- 1,968 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
summary: Check that base snaps work

details: |
    Verify the basic functionalities of the base snaps:
    1. Base snap can be installed
    2. Installing a snap, its base is automatically installed
    3. Ensure the bare base works and it is pulled when required

systems: [-opensuse-*]

execute: |
    echo "Ensure a snap that requires a unavailable base snap can not be installed"
    if "$TESTSTOOLS"/snaps-state install-local test-snapd-requires-base; then
        echo "ERROR: test-snapd-requires-base should not be installable without test-snapd-base"
        exit 1
    fi

    echo "Ensure a base snap can be installed"
    "$TESTSTOOLS"/snaps-state install-local test-snapd-base
    snap list | MATCH test-snapd-base

    echo "With test-snapd-base installed we now can install test-snapd-requires-base"
    "$TESTSTOOLS"/snaps-state install-local test-snapd-requires-base
    snap list | MATCH test-snapd-requires-base

    echo "Ensure the bare base works"
    if not os.query is-pc-amd64; then
        echo "This test can only run on amd64 right now because snapcraft "
        echo "cannot current generate binaries without wrapper scripts."
        echo "Check: https://github.com/snapcore/snapcraft/pull/1420"
        echo "and: https://code.launchpad.net/~snappy-dev/snappy-hub/test-snapd-busybox-static"
        exit 0
    fi

    # this tests our "bare" base snap
    snap install --beta --devmode test-snapd-busybox-static
    echo "Ensure we can run a statically linked binary from the bare base"
    test-snapd-busybox-static.busybox-static echo hello | MATCH hello

    echo "Ensure the bare base that test-snapd-busybox-static uses got pulled in"
    snap list | MATCH ^bare
    snap info --verbose test-snapd-busybox-static|MATCH "base:[ ]+bare"

    if test-snapd-busybox-static.busybox-static ls /bin/dd; then
        echo "bare should be empty but it is not:"
        test-snapd-busybox-static.busybox-static ls /bin
        exit 1
    fi