5 # `dgit build-source` cleans before applying patches. However, the
6 # clean targets of 3.0 (quilt) packages are allowed to assume that
7 # patches are applied. If they are not, the clean targets can
8 # misbehave in basically two ways:
10 # - fail to clean everything
11 # - error out and stop the build
13 # In this test, what we want to see is whether dgit detects that quilt
14 # fixup cannot be linear because the user has failed to pass --gbp.
15 # So we need to ensure the package's clean target does not error out,
16 # because that blocks dgit attempting quilt linearisation. This
17 # environment variable tells the example package's clean target not to
18 # error out if it notices that patches have not yet been applied.
19 export DGIT_TEST_TOLERATE_UNPATCHED_CLEAN=true
21 t-tstunt-parsechangelog
25 t-expect-fail 'quilt fixup cannot be linear' \
28 t-git-config dgit-distro.test-dummy.dgit-tag-format new
29 t-expect-fail 'requires split view so server needs to support' \
30 t-dgit -wgf --quilt=gbp build-source
33 t-dgit --quilt=gbp --dgit-view-save=split.b1 build-source
34 git rev-parse split.b1
36 t-dgit --quilt=gbp --gbp-pq=no-such-command-gbp build-source
38 echo spong >debian/pointless-for-dgit-test
39 git add debian/pointless-for-dgit-test
40 git commit -m Pointless
42 t-expect-fail no-such-command-gbp \
43 t-dgit --quilt=gbp --clean=git --gbp-pq=no-such-command-gbp build-source
51 t-dgit --quilt=gbp --dgit-view-save=split.p push
58 t-dgit --quilt=gbp --clean=git --dgit-view-save=split.b build-source
60 t-expect-fail "HEAD specifies a different tree to $p" \
65 echo wombat >>debian/pointless-for-dgit-test
66 git add debian/pointless-for-dgit-test
67 git commit -m 'Pointless 2'
69 t-commit 'Check pseudomerge' 1.0-3
73 t-dgit --quilt=gbp --clean=git --dgit-view-save=split.b build-source