summaryrefslogtreecommitdiffhomepage
path: root/tests/11_test_dch_main.py
Commit message (Collapse)AuthorAge
* dch: Create changelog if missingGuido Günther2017-11-27
| | | | | Closes: #669171 Thanks: Daniel Dehennin for the groundwork on this
* Use assertRaises as context managerGuido Günther2017-11-12
| | | | | | for better readability Gbp-Dch: Ignore
* tests: use encoding when opening files for checks and fixturesGuido Günther2017-11-06
| | | | so we don't fail on non utf-8 locales
* Unbreack dch tests with newer devscriptsGuido Günther2017-09-14
| | | | | | | | | | | | | | | | | | | | | Due to #842468 debchange now produces shorter output omitting empty blocks if there weren't any changes by the maintainer invoking debchange (which is nice): diff --git a/../old b/../new index 7c61312b..3823def2 100644 --- a/../old +++ b/../new @@ -5,8 +5,6 @@ test-package (1.0-1~1.gbpa26a34) UNRELEASED; urgency=medium [ Guido Günther ] * added debian/control - [ gbp test user ] - -- gbp test user <gbp@example.com> Thu, 14 Sep 2017 19:18:45 +0200 So check for the matching lines in both the old and new location.
* dch: Allow to run from subdirectoryGuido Günther2017-01-23
| | | | Resolves #1
* Always set a mainttrailer optionGuido Günther2017-01-10
| | | | | | | | | | to honor --[no]-git-author This basically reverts c3258c19c6cfa291c8bebac1dae230f6e3ccca36 but also adds a test case to not break it again that easily. Closes: #796913 Thanks: David Kalnischkies for investigating
* dch: avoid adding section in snapshot mode if distribution is UNRELEASEDLinn Crosetto2016-10-02
| | | | | | | | | | | | | When using git-dch in snapshot mode, a section is added without checking whether the distribution is set to UNRELEASED. If the distribution is UNRELEASED, the version will be incremented but a new section will not be added, resulting in a skipped version in the changelog. Change this behavior to add a new section in snapshot mode only if the distribution is not set to UNRELEASED. Signed-off-by: Linn Crosetto <linn@hpe.com> Closes: #838714
* pep8/pyflakes cleanupsGuido Günther2016-09-12
|
* Fix simple spelling errors in comments and stringsOtto Kekäläinen2016-07-03
|
* gbp-dch: allow bug number format to be overriddenJonathan Toppins2015-08-27
| | | | | | | | | | | | | | | | | | | | | Some derivatives and non Debian exclusive projects don't use just numbers for their bug numbers. gbp-dch should still be able to parse these bug numbers and generate useful changelog entries. This doesn't solve dpkg-parsechangelog but is a start. Examples of non-Debian bug numbers are: example change header Example: EX-12345 Should produce the following change log: * example change header (Example: EX-12345) This also helps in pulling CVE numbers simply by letting the user modify the regex to something like 'cve-\d+-\d+'. Signed-off-by: Jonathan Toppins <jtoppins@cumulusnetworks.com> Signed-off-by: Guido Günther <agx@sigxcpu.org>
* call debchange instead of dchEvgeni Golov2015-06-30
| | | | | | | | | Call the tool by its actual name instead of the abbriviation. dch is a symlink to debchange, which is not present on Fedora [1]. [1] https://bugzilla.redhat.com/show_bug.cgi?id=1236122 Signed-off-by: Guido Günther <agx@sigxcpu.org>
* Guess upstream-tag based on merge-baseDaniel Gollub2015-04-25
| | | | | | | | | | | | | | | | | | | | | In some unfortunate cases you might have something like this: $ git tag v1.0 vyatta/1.0-0something1 ... where later tag is closer to describe current HEAD. With upstream-tag set to v%(version)s find_tag() is going to propose something based on vyatta/1.0-0something1 which is not expected. The problem is that find_tag() returns tags, which match the upstream-tag format, but which are not on the upstream-branch at all. To fix this find_tag()/git-describe should not be used to determine the closest upstream-tag. Closes: gh#7
* testutils: Add a context manager to capture stderrGuido Günther2015-03-27
| | | | and use it to test the help output
* tests: minor test case cleanupsGuido Günther2015-03-27
| | | | Remove unused imports, remove unused variables or actually use them
* Use relative import for testutilsGuido Günther2015-02-20
|
* tests: adapt dch tests for older devscriptsMarkus Lehtonen2014-01-07
| | | | | | | Determine the default urgency level by determining the version number of the dch tool from command line. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
* Adjust test cases to newer devscriptsGuido Günther2013-12-17
| | | | Closes: #732384
* Use open() instead of file()Guido Günther2013-08-28
| | | | since the later doesn't exist in python3
* trivial: simplify option assignmentGuido Günther2013-04-30
| | | | to ease readability
* tests: Fix tests for UbuntuMarkus Lehtonen2013-04-26
| | | | | | | | | | 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>
* tests: fix for older dchMarkus Lehtonen2013-04-25
| | | | | | Prevent dch from asking user input during tests. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
* tests: Use tempfile.mkdtemp to create temp dirs for testsThomas Koch2013-04-08
| | | | | | | 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.
* Add urgency management.Daniel Dehennin2013-04-06
| | | | | | | | | | | | * 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.
* Add option to manage distribution fields for non snapshot mode.Daniel Dehennin2013-04-06
| | | | | | | | | | | | | | | | | | | | | 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
* tests: make tests a Python moduleMarkus Lehtonen2012-11-23
| | | | | | Makes it possible to reuse code between various tests. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
* Skip tests requiring devscripts if dch is not thereGuido Günther2012-08-01
| | | | so tests don't fail on rpm based systems.
* Test behavior of gbp.scripts.dch.main().Daniel Dehennin2012-07-31
* tests/11_test_dch_main.py: Test common cases with "--release" and "--snapshot". Try 2 consecutive snapshots to check for merged entries.