summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorMarkus Lehtonen <markus.lehtonen@linux.intel.com>2014-11-19 17:19:20 +0200
committerMarkus Lehtonen <markus.lehtonen@linux.intel.com>2014-11-21 10:33:36 +0200
commitda5daecccc31697ff9338024cb55a2bf25bb9aab (patch)
tree2b0e85d5d2f72a8fb57a574497157f767a232dd5 /tests
parent4d6fbbbe2a87cc0943ff231d7b2ff8d74f468c92 (diff)
downloadgit-buildpackage-da5daecccc31697ff9338024cb55a2bf25bb9aab.tar.gz
git-buildpackage-da5daecccc31697ff9338024cb55a2bf25bb9aab.tar.bz2
git-buildpackage-da5daecccc31697ff9338024cb55a2bf25bb9aab.zip
buildpackage-rpm: look for remote upstream branches
Consider remote branches, too, while looking for the upstream branch when trying to guess if a package is native or not. Change-Id: I3dbbb49816d1d294d81209ea5ab5870e053fd66a Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/component/rpm/test_buildpackage_rpm.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/tests/component/rpm/test_buildpackage_rpm.py b/tests/component/rpm/test_buildpackage_rpm.py
index 3060f84b..88a66fc0 100644
--- a/tests/component/rpm/test_buildpackage_rpm.py
+++ b/tests/component/rpm/test_buildpackage_rpm.py
@@ -139,10 +139,16 @@ class TestGbpRpm(RpmRepoTestBase):
def test_non_native_build(self):
"""Basic test of non-native pkg"""
- self.init_test_repo('gbp-test')
+ repo = self.init_test_repo('gbp-test')
eq_(mock_gbp([]), 0)
self.check_rpms('../rpmbuild/RPMS/*')
+ # Test nativity guessing from remote branches by creating a dummy
+ # remote branch
+ repo.update_ref('refs/remotes/fooremote/foobranch',
+ 'srcdata/gbp-test/upstream')
+ eq_(mock_gbp(['--git-upstream-branch=foobranch']), 0)
+
def test_option_native(self):
"""Test the --git-native option"""
self.init_test_repo('gbp-test2')