EXIT_ERR_SERVICE = 1
EXIT_ERR_RPM_EXPORT = 2
EXIT_ERR_DEB_EXPORT = 3
+EXIT_ERR_GBP_CRASH = 4
class ExportError(Exception):
LOGGER.error('Unhandled exception in GBP:\n'
'%s', err.prettyprint_tb())
raise ExportError('Failed to export packaging files',
- EXIT_ERR_SERVICE)
+ EXIT_ERR_GBP_CRASH)
except GbpServiceError as err:
LOGGER.error('Internal service error when trying to run GBP: %s', err)
raise ExportError('This is most likely a configuration error (or a '
@mock.patch('obs_service_gbp.command.gbp_deb', _mock_gbp)
def test_deb_crash(self):
"""Test crash in git-buildpackage"""
- eq_(service(['--url', self.orig_repo.path, '--revision=deb']), 1)
+ eq_(service(['--url', self.orig_repo.path, '--revision=deb']), 4)
@mock.patch('obs_service_gbp.command.gbp_rpm', _mock_gbp)
def test_rpm_crash(self):
"""Test crash in git-buildpackage-rpm"""
- eq_(service(['--url', self.orig_repo.path, '--revision=rpm']), 1)
+ eq_(service(['--url', self.orig_repo.path, '--revision=rpm']), 4)
@mock.patch('obs_service_gbp.command.fork_call', _mock_fork_call)
def test_service_error(self):