ComponentTestBase: close streamhandler when stopping log capture

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
packaging: Add man as dependency

Required by GitRepository._cmd_has_feature() method.

Signed-off-by: Zhang Qiang <qiang.z.zhang@intel.com>
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Add .coveragerc

To get correct report if coverage is invoked directly (not through
nose/disttools) in order to get an xml report, for example.

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
gbp-pull: update tags, too

To make sure that the tags are in sync with the remote.

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
tests/component: pylint fixes

Add module docstring and wrap one overlong line.

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
tests: skip test_Changelog if 'dch' tool is not available

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
setup: possibility to skip nosetest requirements

Makes it possible to not require test requirements by defining
WITHOUT_NOSETESTS environment variable when running setup.

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
ComponentTestBase: capability to check files of repo

Makes it possible to check that the correct files are present in
the working copy of the repo.

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
tests.test_GitRepository: import and setup gbp.log

In order to initialize gbp logging properly. Fixes false positives when
the GitRepository tests are run alone.

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
GitRepository/_cmd_has_feature: more intelligent parsing

More intelligent parsing of the git output (man page). Try to
parse optional options like '--[no-]standard-notes' of git-show
correctly. In this example both 'no-standard-notes' and 'standard-notes'
would be available.

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
GitRepository/rev_parse: use _git_inout()

instead of the deprecated _git_getoutput() method.

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Support unit tests on Ubuntu: allow "ubuntu" as part of version

In tests/11_test_dch_main.py, there are checks for package names. This
change adds "ubuntu" and related release bane strings ORed in regexp
match to the patterns that are expecteds in assert statements.

Signed-off-by: Olev Kartau <olev.kartau@intel.com>
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
GitArgs: utilize the add() method in other add_X methods

Only use the add() method for updating the argument list. This makes the
code more robust and makes all add method variant types support the same
argument types.

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
GitRepository/find_tag: add 'longfmt' and 'always' options

Add 'longfmt' for getting the tag name in the long format (tag, number
of commits and sha1) and 'always' for falling back to sha1 if no
(matching) tag name is found.

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
GitRepository/get_remote_repos: return URLs, too

In addition to the remote name, return remote URLs. Return value is now
a dict with remote name as the key and a list of URLs as the value. The
first value in the list is the effective fetch URL, the rest of the
values are push URLs.

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
GitRepository: Implement status method

Simple wrapper to the git-status command.

Signed-off-by: Ed Bartosh <eduard.bartosh@intel.com>
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
GitRepository: allow repo inititialization from subdir

This allows initialization of a GitRepository object, even if the
current working directory (or path given to GitRepository) is not the
top level directory of the git repository.

Don't guess the git meta data dir, but, take it as reported by git
itself.

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
gbp.git: Reimplement rfc822 date parsing without dateutil

In order to get rid of dependency to dateutil.

Signed-off-by: Ed Bartosh <eduard.bartosh@intel.com>
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
tests: add test for archiving without git submodules

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
common/buildpackage: support for different archive formats

Adds support for defining the archive format of the output of
git_archive_single(), e.g. 'zip'. Defaults to 'tar', as before.

Signed-off-by: Ed Bartosh <eduard.bartosh@intel.com>
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>