chiark / gitweb /
test suite: lib-orig-include-exclude: Introduce origs_findls
[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 }
44
45 # check that dgit stripped out the orig update
46 origs_findls >../before
47
48 t-archive-process-incoming sid
49
50 origs_findls >../after
51 diff -u ../before ../after
52
53 test-push-1 1.1-1.2 --ch:-sd
54
55 test-push-2
56
57 t-archive-process-incoming sid
58
59 cd ..
60 mkdir get
61 cd get
62
63 t-dgit clone $p
64 # ^ checks that all the origs are there, ie that dgit added the origs
65
66 cd ..