]> git.saurik.com Git - apt.git/blame - test/integration/test-bug-407511-fail-invalid-default-release
CMake: Add coverage build type
[apt.git] / test / integration / test-bug-407511-fail-invalid-default-release
CommitLineData
a3bbbab7
DK
1#!/bin/sh
2set -e
3
3abb6a6a
DK
4TESTDIR="$(readlink -f "$(dirname "$0")")"
5. "$TESTDIR/framework"
a3bbbab7
DK
6setupenvironment
7configarchitecture 'i386'
8
9insertpackage 'unstable' 'cool' 'all' '1.0-1'
10
11getcodenamefromsuite() {
12 if [ "$SUITE" = 'unstable' ]; then
13 echo -n 'sid'
14 else
15 echo -n "$SUITE"
16 fi
17}
18getreleaseversionfromsuite() {
19 if [ "$SUITE" = 'unstable' ]; then
20 echo -n '42.0'
21 else
22 echo -n '0.8.15'
23 fi
24}
25
061c58b6
DK
26getlabelfromsuite() {
27 if [ "$SUITE" = 'unstable' ]; then
28 echo -n 'UnstableTestcases'
29 else
30 echo -n 'Testcases'
31 fi
32}
33
a3bbbab7
DK
34setupaptarchive
35
36passdist() {
061c58b6 37 msgtest 'Test that target-release is accepted' $1
0440d936 38 testsuccess --nomsg aptget dist-upgrade -t $1
061c58b6
DK
39 msgtest 'Test that target-release pins with' $1
40 aptcache policy -t $1 | grep -q ' 990' && msgpass || msgfail
a3bbbab7
DK
41}
42
43faildist() {
061c58b6 44 msgtest 'Test that target-release is refused' $1
0440d936 45 testfailure --nomsg aptget dist-upgrade -t $1
a3bbbab7
DK
46}
47
061c58b6
DK
48msgtest 'Test that no default-release is active in this test' 'setup'
49aptcache policy | grep -q ' 990' && msgfall || msgpass
50
a3bbbab7
DK
51passdist unstable
52passdist sid
53faildist sidd
54faildist stable
55passdist 42.0
56passdist 42.*
57passdist 42*
58passdist 4*.0
59faildist 21.0
60faildist 21*
061c58b6
DK
61# we accept, but don't validate the following
62passdist a=unstable
63passdist n=sid
64passdist v=42.0
65passdist c=main
66passdist l=UnstableTestcases