chiark / gitweb /
test suite: baredebian: Break out baredebian-test-minimum
[dgit.git] / tests / tests / baredebian-multitar
1 #!/bin/bash
2 set -e
3 . tests/lib
4 . $troot/lib-baredebian
5
6 t-dependencies quilt
7
8 t-setup-import baredebian
9 t-tstunt-parsechangelog
10
11 cd $p
12 baredebian-test-vars
13 baredebian-tarball-mode
14
15 rm -f ../example_1.0.orig.tar.*
16 cp $troot/pkg-srcs/${p}_${uv}.orig*.tar.* ..
17 xorigcomps=docs
18
19 git tag -d $uvtag
20
21 baredebian-test-minimum
22 baredebian-test-core
23
24 combine=$(
25         git log --pretty=format:%H \
26         --grep "Combine orig tarballs for example $uv" split.p
27 )
28
29 parentnum=0
30 for comp in '' $xorigcomps; do
31         parentnum=$(( $parentnum + 1 ))
32         fn=${origbase}${comp:+-}${comp}.tar.gz
33
34         git checkout --orphan imp$parentnum
35         git rm -rf .
36         tar --strip-components=1 -axf ../$fn
37         git add -Af .
38
39         git commit -m P$parentnum
40         git diff --stat --exit-code $combine^$parentnum
41
42         count=$(git log $combine^$parentnum | grep -Fc $fn)
43         [ $count = 2 ]
44 done
45
46 t-ok