aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests
diff options
context:
space:
mode:
authorGuido Günther <agx@sigxcpu.org>2011-03-21 14:20:21 +0100
committerGuido Günther <agx@sigxcpu.org>2011-03-21 21:05:34 +0100
commit1021f8439fcdced1699414d686d299b49753eff4 (patch)
treeb72f14784ade8759d5880e0e687839da60d2adab /tests
parent0095808588283b8274aeef1a7670d80ef71438e2 (diff)
git-buildpackage: special case non-submodule tarfile generation
Tarfile generation with submodules is slower since we need to concatenate several tarfiles and compress afterwards. So special case the common non submodule case and add a testcase to check the tarfiles content.
Diffstat (limited to 'tests')
-rw-r--r--tests/04_test_gbp_submodules.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/04_test_gbp_submodules.py b/tests/04_test_gbp_submodules.py
index 160e5b51..5fb5c298 100644
--- a/tests/04_test_gbp_submodules.py
+++ b/tests/04_test_gbp_submodules.py
@@ -2,6 +2,7 @@
import os
import shutil
+import tarfile
import tempfile
import gbp.git
@@ -107,4 +108,11 @@ def test_create_tarball():
"bzip2",
"9")
+def test_chacke_tarfile():
+ """Check the contents of the created tarfile"""
+ t = tarfile.open(os.path.join(tmpdir,"test_0.1.orig.tar.bz2"), 'r:*')
+ files = t.getmembers()
+ assert "test-0.1/.gitmodules" in [ f.name for f in files ]
+ assert len(files) == 6
+
# vim:et:ts=4:sw=4:et:sts=4:ai:set list listchars=tab\:»·,trail\:·: