summaryrefslogtreecommitdiff
path: root/tests/tests/baredebian-multitar
blob: 39b6668507ccc52fecacc199bf51fbb25a4cbba4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#!/bin/bash
set -e
. tests/lib
. $troot/lib-baredebian

t-dependencies quilt

t-setup-import baredebian
t-tstunt-parsechangelog

cd $p
baredebian-test-vars
baredebian-tarball-mode

rm -f ../example_1.0.orig.tar.*
cp $troot/pkg-srcs/${p}_${uv}.orig*.tar.* ..
xorigcomps=docs

git tag -d $uvtag

baredebian-test-minimum
baredebian-test-core

combine=$(
	git log --pretty=format:%H \
	--grep "Combine orig tarballs for example $uv" split.p
)

parentnum=0
for comp in '' $xorigcomps; do
	parentnum=$(( $parentnum + 1 ))
	fn=${origbase}${comp:+-}${comp}.tar.gz

	git checkout --orphan imp$parentnum
	git rm -rf .
	tar --strip-components=1 -axf ../$fn
	git add -Af .

	git commit -m P$parentnum
	git diff --stat --exit-code $combine^$parentnum

	count=$(git log $combine^$parentnum | grep -Fc $fn)
	[ $count = 2 ]
done

t-ok