chiark / gitweb /
f38682224504490a199e984c33504af30a7151ac
[dgit.git] / tests / tests / baredebian-push
1 #!/bin/bash
2 set -e
3 . tests/lib
4
5 t-dependencies GDR
6
7 t-setup-import baredebian
8 t-tstunt-parsechangelog
9
10 cd $p
11
12 t-expect-fail 'contradicts clean mode git-ff' \
13 t-dgit -wgf --dgit-view-save=split.f1 --baredebian quilt-fixup
14
15 t-dgit -wn --dgit-view-save=split.f1 --baredebian quilt-fixup
16
17 v=1.0-1
18 suite=sid
19
20 tar --strip-components=1 -axf ../${p}_${v%-*}.orig.tar.*
21
22 cd debian
23 git clean -xdff
24 git checkout HEAD -- .
25 cd ..
26
27 # Now we are in this insane state that people seem to expect
28
29 export QUILT_PATCHES=debian/patches
30 quilt push -a
31
32 git add -Af .
33 git reset .pc
34 git diff --cached --exit-code split.f1 -- :/ :!/debian
35 git diff --exit-code HEAD..split.f1 -- :/debian
36 git reset
37
38 quilt new made-with-quilt
39 quilt add src.c
40 echo //omg >>src.c
41 quilt refresh
42
43 git add debian/patches/.
44 t-commit 'extra patch made with quilt' 1.0-2
45
46 dpkg-buildpackage -uc -us --build=source
47 # ^ Do this by hand here not because we expect users to do this
48 #   (rather than dgit build), but so that we can check that our
49 #   output is the same as users are used to.
50
51 t-dgit -wn --quilt=baredebian --dgit-view-save=split.b quilt-fixup
52 t-dgit -wn --quilt=baredebian --dgit-view-save=split.p --new push
53
54 git merge-base --is-ancestor v${v%-*} split.p
55 git merge-base --is-ancestor HEAD     split.p
56 set +e; git merge-base HEAD v${v%-*}; rc=$?; set -e; [ $rc = 1 ]
57
58 git clean -xdff
59 # t-pushed-good-* wants a clean tree to start with, but this
60 #  workflow expects a mess
61
62 t-splitbrain-pushed-good-start
63 t-splitbrain-pushed-good--unpack
64
65 find . -mindepth 1 -maxdepth 1          \
66         \! -path ./debian               \
67         \! -path ./.git                 \
68         -print0                         \
69         | xargs -0r rm -rf --
70
71 t-splitbrain-pushed-good-end-made-dep14
72
73 t-ok