chiark / gitweb /
c1e9ba9bd814dd01d60f4de8169d8a23db67ebf7
[dgit.git] / tests / tests / gdr-import-dgit
1 #!/bin/bash
2 set -e
3 . tests/lib
4
5 t-dependencies git-buildpackage libfile-fnmatch-perl faketime
6
7 t-setup-import gdr-convert-gbp
8
9 cd $p
10
11 nmu-upload-1 () {
12         t-git-next-date
13         nmubranch=$1
14         git checkout -f -b $nmubranch
15         t-git-debrebase
16         t-git-debrebase convert-to-gbp
17         t-git-next-date
18         # now we are on a gbp patched-unapplied branch
19 }
20
21
22 nmu-upload-2 () {
23         t-git-next-date
24         t-dch-commit -v $v -m "nmu $nmubranch $v"
25         t-some-changes "nmu $numbranch $v"
26         t-dch-commit -r sid
27
28         t-dgit -wgf build-source
29
30         cd ..
31         c=${p}_${v}_source.changes
32         debsign -kBCD22CD83243B79D3DFAC33EA3DBCBC039B13D8A $c
33         dput -c $tmp/dput.cf test-dummy $c
34
35         t-archive-process-incoming sid
36         t-git-next-date
37         cd $p
38         git checkout master
39 }
40
41 : 'non-dgit upload (but we prepare it with dgit anyway)'
42
43 v=2.0-2+nmu1
44 nmu-upload-1 nmu
45 gbp pq import
46 nmu-upload-2
47
48 : 'done the nmu, switching back to the maintainer hat'
49
50 nmu-fold () {
51         t-git-next-date
52         t-dgit fetch
53         t-git-next-date
54         git merge --ff-only dgit/dgit/sid
55
56         git diff --exit-code patch-queue/$nmubranch
57
58         git branch unlaundered.$nmubranch
59
60         t-git-debrebase
61
62         t-gdr-good laundered
63
64         t-git-debrebase stitch
65         t-gdr-good stitched
66 }
67
68 nmu-fold
69
70 v=2.0-3
71 t-dch-commit -v $v -m "incorporate nmu"
72 t-dch-commit -r sid
73 t-dgit -wgf push-source
74
75 t-ok