From 6d0d99f48ed6b6c80f81842ccfc547db62b46fd1 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Sun, 30 Jun 2019 12:16:47 +0100 Subject: [PATCH] test suite: baredebian-multitar: Check tarball import structure Signed-off-by: Ian Jackson --- tests/tests/baredebian-multitar | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/tests/tests/baredebian-multitar b/tests/tests/baredebian-multitar index fce1599c..79d74f85 100755 --- a/tests/tests/baredebian-multitar +++ b/tests/tests/baredebian-multitar @@ -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 -- 2.30.2