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