summaryrefslogtreecommitdiff
path: root/tests
AgeCommit message (Collapse)Author
2013-09-04ComponentTestBase: more verbose output in case of branch mismatchMarkus Lehtonen
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2013-08-28Use open() instead of file()Guido Günther
since the later doesn't exist in python3
2013-08-21dch: make automatic adding of new sections more robustGuido Günther
This code that determined if we found a snapshot header was obuscated by the code that determines the commits to add. Split those and better document their purpose. Also always return the commit to start from so we don't need to repeat the logic in the uper levels.
2013-08-21Move MockedChangelog to testutilsGuido Günther
and allow to specify the content so we can reuse it for other dch tests.
2013-07-04GitRepository.set_upstream_branch: Newer git wants a valid remote repo entryGuido Günther
so set one in the tests before trying to set the upstream branch. Found with git 1.8.3.2
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