chiark / gitweb /
test suite: Introduce $bpd variable (nfc)
[dgit.git] / tests / lib-orig-include-exclude
1 # designed to be .'d
2
3 t-tstunt-parsechangelog
4
5 t-archive example 1.0-1
6 t-git-none
7
8 t-dgit clone $p
9
10 origs='orig orig-docs'
11 usvsns='1.0 1.1'
12
13 for o in $origs; do
14         cp ${p}_{1.0,1.1}.${o}.tar.gz
15 done
16
17 mkdir -p "$tmp/aq/file_in_archive/%"
18
19 cd $p
20
21 test-push-1 () {
22         v=$1
23         ch=$2
24         suite=$3
25
26         t-commit $v $v $suite
27         t-dgit $ch build
28 }
29
30 test-push-2 () {
31         $test_push_2_hook
32         t-dgit $ch "$@" push
33 }
34
35 test-push-1 1.0-2 --ch:-sa
36
37 grep orig ../${p}_${v}_*.changes
38
39 test-push-2
40
41 origs_findls () {
42         find $tmp/mirror -name '*orig*' -ls \
43         | perl -pe 's/^(\s*\d+\s+\d+\s+\S+\s)\s*\d+(\s)/$1$2/'
44 }
45
46 # check that dgit stripped out the orig update
47 origs_findls >../before
48
49 t-archive-process-incoming sid
50
51 origs_findls >../after
52 diff -u ../before ../after
53
54 test-push-1 1.1-1.2 --ch:-sd
55
56 test-push-2
57
58 t-archive-process-incoming sid
59
60 cd ..
61 mkdir get
62 cd get
63
64 t-dgit clone $p
65 # ^ checks that all the origs are there, ie that dgit added the origs
66
67 cd ..