Commit 736b9d88 authored by Markus Lehtonen's avatar Markus Lehtonen Committed by Guido Günther

Introduce git-import-srpm tool

Initial version of the git-import-srpm: a tool for importing source
rpms.
Signed-off-by: 's avatarMarkus Lehtonen <markus.lehtonen@linux.intel.com>
Signed-off-by: 's avatarEd Bartosh <eduard.bartosh@intel.com>
parent 00db052c
[submodule "tests/component/deb/data"]
path = tests/component/deb/data
url = git://honk.sigxcpu.org/git/gbp/deb-testdata
[submodule "tests/component/rpm/data"]
path = tests/component/rpm/data
url = git://github.com/marquiz/git-buildpackage-rpm-testdata.git
......@@ -516,4 +516,34 @@ class GbpOptionParserDebian(GbpOptionParser):
'cleaner' : '/bin/true',
} )
class GbpOptionParserRpm(GbpOptionParser):
"""
Handles commandline options and parsing of config files for rpm tools
"""
defaults = dict(GbpOptionParser.defaults)
defaults.update({
'tmp-dir' : '/var/tmp/gbp/',
'packaging-branch' : 'master',
'packaging-dir' : '',
'packaging-tag' : 'packaging/%(version)s',
})
help = dict(GbpOptionParser.help)
help.update({
'tmp-dir':
"Base directory under which temporary directories are "
"created, default is '%(tmp-dir)s'",
'packaging-branch':
"Branch the packaging is being maintained on, rpm counterpart "
"of the 'debian-branch' option, default is "
"'%(packaging-branch)s'",
'packaging-dir':
"Subdir for RPM packaging files, default is "
"'%(packaging-dir)s'",
'packaging-tag':
"Format string for packaging tags, RPM counterpart of the "
"'debian-tag' option, default is '%(packaging-tag)s'",
})
# vim:et:ts=4:sw=4:et:sts=4:ai:set list listchars=tab\:»·,trail\:·:
This diff is collapsed.
......@@ -25,4 +25,13 @@ class TestHelp(unittest.TestCase):
m.main,
['doesnotmatter', '--help'])
"""Test help output of RPM-specific commands"""
def testHelpRpm(self):
for script in ['import_srpm']:
module = 'gbp.scripts.%s' % script
m = __import__(module, globals(), locals(), ['main'], -1)
self.assertRaises(SystemExit,
m.main,
['doesnotmatter', '--help'])
# vim:et:ts=4:sw=4:et:sts=4:ai:set list listchars=tab\:»·,trail\:·:
# vim: set fileencoding=utf-8 :
#
# (C) 2012 Intel Corporation <markus.lehtonen@linux.intel.com>
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
"""Test module for RPM command line tools of the git-buildpackage suite"""
import os
from tests.component import ComponentTestGitRepository
RPM_TEST_DATA_SUBMODULE = os.path.join('tests', 'component', 'rpm', 'data')
RPM_TEST_DATA_DIR = os.path.abspath(RPM_TEST_DATA_SUBMODULE)
def setup():
"""Test Module setup"""
ComponentTestGitRepository.check_testdata(RPM_TEST_DATA_SUBMODULE)
# vim:et:ts=4:sw=4:et:sts=4:ai:set list listchars=tab\:»·,trail\:·:
Subproject commit 90bf36d7981fdd1677cf7e734d9e1056a5fced1c
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment