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