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