chiark / gitweb /
test suite: baredebian-multitar: Check tarball import structure
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 30 Jun 2019 11:16:47 +0000 (12:16 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 30 Jun 2019 20:11:18 +0000 (21:11 +0100)
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
tests/tests/baredebian-multitar

index 74ad64af507b24a97f613a86659b0a198026a033..9ce59575d7c000bee7e2c5eaf938bd1eb1ab4582 100755 (executable)
@@ -20,4 +20,26 @@ git tag -d $uvtag
 
 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