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