chiark / gitweb /
7dfee4bc47bcbdb98140e3df58ae73b6e081906e
[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 clean -xdff
52 # t-pushed-good-* wants a clean tree to start with, but this
53 #  workflow expects a mess
54
55 t-splitbrain-pushed-good-start
56 t-splitbrain-pushed-good--unpack
57
58 find . -mindepth 1 -maxdepth 1          \
59         \! -path ./debian               \
60         \! -path ./.git                 \
61         -print0                         \
62         | xargs -0r rm -rf --
63
64 t-splitbrain-pushed-good-end-made-dep14
65
66 t-ok