chiark / gitweb /
test suite: Add --force-reusing-version to many tests
[dgit.git] / tests / tests / baredebian-multitar
index 74ad64af507b24a97f613a86659b0a198026a033..39b6668507ccc52fecacc199bf51fbb25a4cbba4 100755 (executable)
@@ -3,7 +3,7 @@ set -e
 . tests/lib
 . $troot/lib-baredebian
 
-t-dependencies GDR DEBORIG quilt
+t-dependencies quilt
 
 t-setup-import baredebian
 t-tstunt-parsechangelog
@@ -18,6 +18,29 @@ 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