chiark / gitweb /
test suite: Separate t-gdr-gbp-import-core from -with-queue
[dgit.git] / tests / setup / gdr-convert-gbp
1 #!/bin/bash
2 set -e
3 autoimport=
4 . tests/lib
5 . $troot/lib-gdr
6
7 $ifarchive t-setup-import gnupg
8
9 t-dependencies GDR
10
11 t-tstunt-parsechangelog
12
13 not-gdr-processable () {
14         git branch gdr-unprocessable/$1
15         t-git-debrebase analyse | grep 'Unknown Unprocessable'
16 }
17
18 t-gdr-gbp-import-core-with-queue
19
20 not-gdr-processable origin
21
22 : 'fake up an upstream 2.0'
23 git branch make-upstream upstream
24 t-make-new-upstream-tarball 2.0
25
26 for b in \
27                 quilt-tip-2             \
28                 gitish-only             \
29                 quilt-tip-1.1           \
30                 patch-queue/quilt-tip   \
31                 indep-arch              \
32 ; do
33         git branch -D $b
34 done
35
36 : 'see what gbp import-orig does'
37 git checkout master
38 gbp import-orig --upstream-version=2.0 ../$ust
39
40 not-gdr-processable merge
41
42 t-dch-commit -v 2.0-1 -m 'new upstream (did gbp import-orig)'
43 t-dch-commit-r
44
45 echo garbage >debian/patches/garbage
46 git add debian/patches/garbage
47 git commit -m 'add garbage' debian/patches/garbage
48
49 $ifarchive t-archive-none $p
50 $ifarchive t-git-none
51 $ifarchive t-dgit -wgf --gbp push-source --new
52
53 t-salsa-add-remote
54 git push --set-upstream origin master
55
56 # OK now this looks like something more normal.
57 # We have:
58 #  maintainer (gbp) view                dgit view
59 #    master
60 #    debian/2.0-1                          archive/debian/2.0-1
61 #    remotes/origin/master                 remotes/dgit/dgit/sid
62
63 t-expect-fail E:'identical in upstream files' \
64 t-git-debrebase -fupstream-has-debian convert-from-gbp upstream/2.0~
65
66 t-expect-fail E:'Unused patch file garbage will be discarded' \
67 t-git-debrebase -fupstream-has-debian convert-from-gbp
68
69 t-git-debrebase -fupstream-has-debian -funused-patches convert-from-gbp
70
71 git branch converted-from-gbp
72
73 v=2.0-2
74 t-dch-commit -v $v -m 'switch to git-debrebase, no other changes'
75 t-dch-commit-r
76
77 $ifarchive t-dgit -wgf push-source --new
78 git push
79
80 cd ..
81
82 $ifarchive t-archive-process-incoming sid
83
84 t-setup-done '' "$(echo $p*) salsa $($ifarchive echo git mirror aq)" '
85         . $troot/lib-gdr
86         t-tstunt-parsechangelog
87         p=example
88         t-git-next-date
89 '