summaryrefslogtreecommitdiff
path: root/tests
AgeCommit message (Collapse)Author
2013-06-30Test succesful import tooGuido Günther
and make sure we don't spew to stderr during this test
2013-06-26import-dsc: print filename instead of object nameGuido Günther
2013-06-26Consistently call gbp the supercommandGuido Günther
and robustify against invalid modules names.
2013-06-19GbpOptionParser: add test for 'filter' option handlingGuido Günther
2013-06-19GbpOptionParser: Make sure we parse the old config sectionsGuido Günther
For backward compatibility between {gbp,git}-<subcommand> and "gbp <subcommand>" make sure we parse the former sections if using the later.
2013-06-18Add wrapper for all gbp commandsGuido Günther
So like git you can now use gbp <command> instead of git-<command> or gbp-<command>. The manpages and docs aren't adjusted yet.
2013-06-11GitRepository.get_subject: use get_commit_infoGuido Günther
This kills another _git_getoutput. Also deprecate the method since we don't need to special case the subject.
2013-06-11buildpackage: use get_commit_info() instead of get_subject()Markus Lehtonen
Utilize the get_commit_info() method of GitRepository instead of the deprecated get_subject(). Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2013-06-11Remove unused importsGuido Günther
2013-06-06GitRepository/get_commit_info: add patchname to infoMarkus Lehtonen
Add a new 'patchname' field to the information returned by get_commit_info. That is, the subject in a sanitized format, similar to what git-format-patch uses. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2013-06-06gitmodifier: make the datetime object always have timezoneMarkus Lehtonen
To be consistent with the date property and for easier compatibility with git dates. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2013-04-30trivial: simplify option assignmentGuido Günther
to ease readability
2013-04-30Silence test_debian_missing_authorGuido Günther
and better use the output for verification
2013-04-29Make parse_dsc a classmethod of DscFileGuido Günther
so we have the object creation close to the object itself.
2013-04-29ChangeLog: Remove is_nativeGuido Günther
to avoid accidental usage. Use DebianSource.is_native instead.
2013-04-27GitRepository.has_feature: capture stderrGuido Günther
to avoid spurious output on the console and add the error message to the exception intead.
2013-04-27Silence GitRepository.grep_logGuido Günther
None of the gbp script rely on the output being printed. In fact we improve the exception by appending the stderr output.
2013-04-2610_test_get_upstream_tree: Fix test descriptionsGuido Günther
2013-04-2614_test_gbp_import_dscs: Mock gbp.log.errGuido Günther
to get rid of the spurious error message
2013-04-26tests: Fix tests for UbuntuMarkus Lehtonen
On Ubuntu dch produces different version numbering. Adapt tests for this. Adds a jew class to parse '/etc/lsb-release' to determine the distribution and it's codename to dynamically adapt tests accordingly. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2013-04-26tests: add missing import in test_ChangelogMarkus Lehtonen
That was erroneously removed in 3d6b68ae541d6020ff747628b3e44196999e0a50. and breaks without dch installed Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2013-04-25GitRepository: add describe() methodMarkus Lehtonen
Provides more output options than find_tag(). - longfmt: for getting the tag name in the long format (tag, number of commits and sha1) - always: for falling back to sha1 if no (matching) tag name is found - abbrev: for defining the length of sha1 returned Change GitRepository.find_tag() to use the the new method. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2013-04-25tests: another fix for older dchMarkus Lehtonen
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2013-04-25tests: fix for older dchMarkus Lehtonen
Prevent dch from asking user input during tests. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2013-04-13Honor debian/source/formatGuido Günther
when checking if a package is a native package Closes: #669267
2013-04-13Introduce Source classGuido Günther
so we don't have to expose all the details of Debian's different files and conventions.
2013-04-13Add minimal vfs interfaceGuido Günther
so we can access blobs in git as file like objects
2013-04-08tests: Use tempfile.mkdtemp to create temp dirs for testsThomas Koch
This puts test dirs below /tmp which often is a tmpfs. All tests include the context module which consolidates tmpdir creation and cleanup, undoes a chdir in teardown and silences log messages.
2013-04-06Add urgency management.Daniel Dehennin
* tests/11_test_dch_main.py: test the new --urgency option to dch.main(). Add only meaningful tests, i.e. options alone and combined with --release and --snapshot. * git-dch (fixup_section): Manage "urgency" option. (main): Add version_group option "-U" and "--urgency" to set the urgency level of the entry. * docs/manpages/git-dch.sgml: Update documentation for new option.
2013-04-06Add option to manage distribution fields for non snapshot mode.Daniel Dehennin
The snapshot mode fails to merge two "debian/changelog" entries if the distribution is not "UNRELEASED". * tests/11_test_dch_main.py: test the new --distribution option to dch.main(). Add only meaningful tests, i.e. options alone and combined with --release and --snapshot. * git-dch (fixup_section): Rename as it's used to fix header in addition to trailer, this require a new named parameter "options". (main): Add version_group option "-D" and "--distribution" to specify the distribution name. Add version_group option "--force-distribution" to force the provided distribution to be used, used by "dch". Rename fixup_trailer() to fixup_section() and add options as parameters. * docs/manpages/git-dch.sgml: Update documentation for new options. Closes: #646684
2013-03-29Move debian/changelog manipulation to gbp.deb.changelog.ChangeLog.Daniel Dehennin
spawn_dch switch gbp.command.wrappers.Command. * gbp/deb/changelog.py (ChangeLog.spawn_dch): static method adapted from gbp.scripts.dch and converted to gbp.command_wrappers.Command. (add_entry): New method adapted from gbp.scripts.dch.add_changelog_entry. (add_section): New method adapted from gbp.scripts.dch.add_changelog_entry. Remove DebianGitRepository and options, this has nothing to do with changelog management. * tests/test_Changelog.py: Test new methods. * gbp/scripts/dch.py: Remove useless functions: system(), spawn_dch(), add_changelog_section() and add_changelog_entry(). Update calls accordingly. (fixup_trailer): Use spawn_dch() method of ChangeLog class. (process_options): dch_options became a list. (main): Use add_section() and add_entry() methods of ChangeLog object. Take care of upstream version since ChangeLog.add_section() does not manage it anymore. Update exception handling, ChangeLog.spawn_dch() can raise "CommandExecFailed" exception. Closes: #672954
2013-03-27tests.test_GitRepository: import and setup gbp.logMarkus Lehtonen
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>
2013-03-27Split out building a debian version from an upstream commitGuido Günther
based on a patch by Daniel Dehennin Needed for #672954, #646684, #669171
2013-03-22ComponentTestBase: capability to check files of repoMarkus Lehtonen
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>
2013-03-22GitRepository/_cmd_has_feature: more intelligent parsingMarkus Lehtonen
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>
2013-03-22tests: skip test_Changelog if 'dch' tool is not availableMarkus Lehtonen
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2013-03-22tests/component: pylint fixesMarkus Lehtonen
Add module docstring and wrap one overlong line. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2013-03-22ComponentTestBase: close streamhandler when stopping log captureMarkus Lehtonen
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Guido Günther <agx@sigxcpu.org>
2013-01-16Move over import dsc test from external test suiteGuido Günther
Move over the first test from our external (shell based) test suite to the component tests.
2013-01-16Add test data submoduleGuido Günther
2013-01-16Add component test initializationGuido Günther
very heavily based on code by Markus Lehtonen
2013-01-16tests.testutils: baseclass for testing commandline toolsMarkus Lehtonen
Introduce a new baseclass to be utilized in testing the git-buildpackage command line tools. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2013-01-16pq: do author guessing outside the apply_patch functionsMarkus Lehtonen
Call the author parsing/guessing function outside the apply patch functions. This way, the caller can decide when to do the guessing, and with which parameters. Now the apply_patch functions do what their name suggests. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2012-11-24git-import-dscs: Properly catch import errorsGuido Günther
Closes: #694113
2012-11-24Test gbp.pq.common.write_patchGuido Günther
2012-11-23GitRepository/get_submodules: use correct pathMarkus Lehtonen
By default, run git in the repo path, not current cwd. Also, now returns submodule paths without leading './'. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2012-11-23GitRepository/get_commits: more flexible revision rangesMarkus Lehtonen
Support getting the complete history of an arbitrary commit-ish (since=None, until=COMMIT-ISH). Formerly this was only possible for the current git HEAD. Now, get_commits(since=None, until='COMMIT') translates to 'git log COMMIT'. Also, for consistency, add support for getting the history from an arbitrary commit until the current HEAD (since=COMMIT-ISH, until=None). Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2012-11-23Test if setting a topic worksGuido Günther
2012-11-23pq: Allow to pass in custom fucntion to fetch authorship informationGuido Günther
so the RPM based tools don't need to rely on a control file but can e.g. look at the spec file.
2012-11-23Test apply_and_commit_patchGuido Günther