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