summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorMarkus Lehtonen <markus.lehtonen@linux.intel.com>2013-05-20 10:45:25 +0300
committerMarkus Lehtonen <markus.lehtonen@linux.intel.com>2014-11-14 14:46:24 +0200
commit6be238273731abb1e7b9aa8ecfcb665f68520b76 (patch)
treeacb4162cc993bb10adf4a1d97a218fb1766a54b8 /tests
parenteccb50be944f62264415c534aa8d649d9011f6ae (diff)
downloadgit-buildpackage-6be238273731abb1e7b9aa8ecfcb665f68520b76.tar.gz
git-buildpackage-6be238273731abb1e7b9aa8ecfcb665f68520b76.tar.bz2
git-buildpackage-6be238273731abb1e7b9aa8ecfcb665f68520b76.zip
rpm: support importing bzip2 compressed patches
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/component/rpm/test_import_srpm.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/component/rpm/test_import_srpm.py b/tests/component/rpm/test_import_srpm.py
index 6659d369..5515707e 100644
--- a/tests/component/rpm/test_import_srpm.py
+++ b/tests/component/rpm/test_import_srpm.py
@@ -113,6 +113,20 @@ class TestImportPacked(ComponentTestBase):
# Only one commit: packaging files
eq_(len(repo.get_commits()), 1)
+ def test_import_compressed_patches(self):
+ """Test importing of non-native src.rpm with compressed patches"""
+ srpm = os.path.join(DATA_DIR, 'gbp-test-1.1-2.src.rpm')
+ eq_(import_srpm(['arg0', srpm]), 0)
+ # Check repository state
+ repo = GitRepository('gbp-test')
+ files = set(['Makefile', 'README', 'AUTHORS', 'NEWS', 'bar.tar.gz',
+ 'dummy.sh', 'foo.txt', 'gbp-test.spec', 'my.patch',
+ 'mydir/myfile.txt'])
+ self._check_repo_state(repo, 'master', ['master', 'upstream'], files)
+ # Four commits: upstream, packaging files, three patches and the removal
+ # of imported patches
+ eq_(len(repo.get_commits()), 6)
+
def test_multiple_versions(self):
"""Test importing of multiple versions"""
srpms = [ os.path.join(DATA_DIR, 'gbp-test-1.0-1.src.rpm'),