File: task.yaml

package info (click to toggle)
snapd 2.72-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 80,412 kB
  • sloc: sh: 16,506; ansic: 16,211; python: 11,213; makefile: 1,919; exp: 190; awk: 58; xml: 22
file content (65 lines) | stat: -rw-r--r-- 1,432 bytes parent folder | download | duplicates (3)
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
summary: Check different completions

details: |
    Check bash completion functionality.

# takes >6min to run in total
backends: [-autopkgtest]

# ppc64el disabled because of https://bugs.launchpad.net/snappy/+bug/1655594
# amazon-linux-2023: ships with gnupg2-minimal which is missing options
systems: [-ubuntu-core-*, -ubuntu-*-ppc64el, -amazon-linux-2023-*]

environment:
    NAMES: /var/cache/snapd/names

prepare: |
    tests.systemd stop-unit snapd.service snapd.socket
    if [ -e "$NAMES" ]; then
        mv "$NAMES" "$NAMES.orig"
    fi

    cat >"$NAMES" <<EOF
    test-assumes
    test-snapd-thumbnailer
    test-snapd-tools
    EOF

    chattr +i "$NAMES"
    systemctl start snapd.service

    mkdir -p testdir
    touch testdir/foo.snap
    touch bar.snap
    touch baz.comp

    snap install core
    snap install test-snapd-tools

    #shellcheck source=tests/lib/mkpinentry.sh
    . "$TESTSLIB"/mkpinentry.sh
    #shellcheck source=tests/lib/random.sh
    . "$TESTSLIB"/random.sh

    kill_gpg_agent
    expect -d -f key.exp0

restore: |
    systemctl stop snapd.service
    chattr -i "$NAMES"
    rm "$NAMES"
    if [ -e "$NAMES.orig" ]; then
        mv "$NAMES.orig" "$NAMES"
    fi
    systemctl start snapd.service

debug: |
    #shellcheck source=tests/lib/random.sh
    . "$TESTSLIB"/random.sh
    debug_random || true

execute: |
    for i in *.exp; do
        echo "$i"
        expect -d -f "$i"
    done