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