chiark / gitweb /
git-debrebase: test suite: gdr-import-dgit: test a new upstream non-gdr upload too
[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         t-gdr-good laundered
62
63         t-git-debrebase stitch
64         t-gdr-good stitched
65 }
66
67 nmu-fold
68
69 v=2.0-3
70 t-dch-commit -v $v -m "incorporate nmu"
71 t-dch-commit -r sid
72 t-dgit -wgf push-source
73
74 : 'now test a new upstream'
75
76 t-make-new-upstream-tarball 2.1
77
78 git checkout master
79 v=2.1-0+nmu1
80 nmu-upload-1 nmu2
81
82 gbp import-orig --upstream-version=2.1 --debian-branch=nmu2 ../$ust
83 t-dch-commit -v $v -m "new upstream $v"
84 gbp pq import
85
86 #t-dgit -wgf build-source
87
88 nmu-upload-2
89
90 : 'done the nmu, back to the maintainer'
91
92 nmu-fold
93
94 t-ok