7 # This test script tests each of the split brain quilt modes, and
8 # --quilt=linear, with a tree suitable for each of those, and pushes
9 # them in sequence. The idea is to check that each tree is rejected
10 # by the wrong quilt modes, and accepted and processed correctly by
13 t-tstunt-parsechangelog
17 # Easiest way to make a patches-unapplied but not-gbp tree is
18 # to take the patches-unapplied tree and by-hand commit the .gitignore
19 # changes as a debian patch.
29 t-dgit "$@" --quilt=$qmode --dgit-view-save=split.b build-source
31 t-dgit "$@" --quilt=$qmode --dgit-view-save=split.p push
36 echo "===== testing tree suitable for --quilt=gbp (only) ====="
38 t-expect-fail 'git tree differs from result of applying' \
39 t-dgit -wgf --quilt=dpm build-source
41 t-expect-fail 'git tree differs from orig in upstream files' \
42 t-dgit -wgf --quilt=unapplied build-source
44 t-expect-fail 'This might be a patches-unapplied branch' \
45 t-dgit -wgf build-source
47 # testing success with --quilt=gbp are done in quilt-gbp test case
50 echo "===== making tree suitable for --quilt=unapplied (only) ====="
52 pf=debian/patches/test-gitignore
55 From: Senatus <spqr@example.com>
56 Subject: Add .gitignore
61 git diff /dev/null .gitignore >>$pf || test $? = 1
62 echo ${pf##*/} >>debian/patches/series
64 git add debian/patches
66 git commit -m 'Turn gitignore into a debian patch'
67 gitigncommit=`git rev-parse HEAD`
69 t-commit unapplied 1.0-3
71 echo "----- testing tree suitable for --quilt=unapplied (only) -----"
73 t-expect-fail 'git tree differs from result of applying' \
74 t-dgit -wgf --quilt=dpm build-source
76 t-expect-fail 'gitignores: but, such patches exist' \
77 t-dgit -wgf --quilt=gbp build-source
79 t-expect-fail 'This might be a patches-unapplied branch' \
80 t-dgit -wgf build-source
82 want-success unapplied -wgf
85 echo "===== making fully-applied tree suitable for --quilt-check ====="
88 git merge --ff-only dgit/dgit/sid
90 t-commit vanilla 1.0-4
92 echo "----- testing fully-applied tree suitable for --quilt-check -----"
94 t-expect-fail 'gitignores: but, such patches exist' \
95 t-dgit --quilt=dpm build-source
97 t-expect-fail 'git tree differs from orig in upstream files' \
98 t-dgit --quilt=gbp build-source
100 t-expect-fail 'git tree differs from orig in upstream files' \
101 t-dgit --quilt=unapplied build-source
103 t-dgit --quilt=nofix build-source
106 t-dgit --quilt=nofix push
110 echo "===== making tree suitable for --quilt=dpm (only) ====="
113 git merge --ff-only dgit/dgit/sid
115 git revert --no-edit $gitigncommit
117 t-commit dpmish 1.0-5
119 echo "----- testing tree suitable for --quilt=dpm (only) -----"
121 t-expect-fail 'git tree differs from orig in upstream files' \
122 t-dgit -wgf --quilt=gbp build-source
124 t-expect-fail 'git tree differs from orig in upstream files' \
125 t-dgit -wgf --quilt=unapplied build-source
127 t-expect-fail 'This might be a patches-applied branch' \
128 t-dgit -wgf build-source
133 t-commit dpmish-stable 1.0-6 $suite
135 want-success dpm --new