]>
Commit | Line | Data |
---|---|---|
1 | #!/bin/sh | |
2 | set -e | |
3 | ||
4 | TESTDIR=$(readlink -f $(dirname $0)) | |
5 | . $TESTDIR/framework | |
6 | setupenvironment | |
7 | configarchitecture 'i386' | |
8 | ||
9 | insertpackage 'unstable' 'cool' 'all' '1.0-1' | |
10 | ||
11 | getcodenamefromsuite() { | |
12 | if [ "$SUITE" = 'unstable' ]; then | |
13 | echo -n 'sid' | |
14 | else | |
15 | echo -n "$SUITE" | |
16 | fi | |
17 | } | |
18 | getreleaseversionfromsuite() { | |
19 | if [ "$SUITE" = 'unstable' ]; then | |
20 | echo -n '42.0' | |
21 | else | |
22 | echo -n '0.8.15' | |
23 | fi | |
24 | } | |
25 | ||
26 | setupaptarchive | |
27 | ||
28 | passdist() { | |
29 | msgtest "Test that target-release is accepted" $1 | |
30 | aptget dist-upgrade -t $1 -qq && msgpass || msgfail | |
31 | } | |
32 | ||
33 | faildist() { | |
34 | msgtest "Test that target-release is refused" $1 | |
35 | aptget dist-upgrade -t $1 -qq 2> /dev/null && msgfail || msgpass | |
36 | } | |
37 | ||
38 | passdist unstable | |
39 | passdist sid | |
40 | faildist sidd | |
41 | faildist stable | |
42 | passdist 42.0 | |
43 | passdist 42.* | |
44 | passdist 42* | |
45 | passdist 4*.0 | |
46 | faildist 21.0 | |
47 | faildist 21* |