aboutsummaryrefslogtreecommitdiff
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* tests: add tests for Closes tags with resolutionLucio Sauer2024-07-201-0/+30
| | | | | Signed-off-by: Lucio Sauer <watermanpaint@posteo.net> Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
* mask: fix test & improve error messagesArthur Zamarin2024-06-021-1/+2
| | | | | Resolves: https://github.com/pkgcore/pkgdev/issues/188 Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
* mask: update removal line to match GLEP-84Arthur Zamarin2024-05-171-1/+1
| | | | Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
* reformat with black 24Arthur Zamarin2024-01-266-143/+258
| | | | Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
* test_pkgdev_manifest: skip broken tests [wip]Arthur Zamarin2023-12-291-0/+4
| | | | | | | | | | Were broken by [1]. Understanding what and why happened is not trivial. Many manual tests I've performed show that `pkgdev manifest` still works as expected. I'm not sure if the tests are broken or the code is broken. [1] https://github.com/pkgcore/pkgcore/commit/bb7b8ec465060dfc754e9115c6e8a03e040272fd Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
* bugs: mention age of packages in the bug descriptionArthur Zamarin2023-12-151-3/+3
| | | | | Resolves: https://github.com/pkgcore/pkgdev/issues/140 Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
* push: `--ask` stops for confirmation on warningsArthur Zamarin2023-08-241-0/+23
| | | | | Resolves: https://github.com/pkgcore/pkgdev/issues/150 Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
* commit: add support to enable/disable gpg signingArthur Zamarin2023-07-051-0/+18
| | | | | | | | | | | | You can use "--gpg-sign" and "--no-gpg-sign" to enable/disable gpg signing. If you don't specify any of them, pkgdev will use the value listed in metadata/layout.conf. You can also set this in configuration, using `commit.no-gpg-sign=` or `commit.gpg-sign=`. Resolves: https://github.com/pkgcore/pkgdev/issues/146 Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
* tests/bugs: fix tests after addition of blocks_bugArthur Zamarin2023-05-281-3/+3
| | | | | Fixes: f5b955018af5715bdd72ce6b094bf901be2d8ced Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
* format using blackArthur Zamarin2023-03-0411-1149/+1241
| | | | Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
* pkgdev bugs: new tool for filing stable bugsArthur Zamarin2023-03-011-0/+104
| | | | | | | | | This new tool isn't complete, and any usage should be manually monitored for failures or incorrect results. This tool will be improved in the future, but for now it's a good start. Resolves: https://github.com/pkgcore/pkgdev/issues/113 Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
* commit: use same summary for multiple ebuildsArthur Zamarin2023-01-131-2/+3
| | | | | | | | | If 2 or more ebuilds are being modified, and same summary is generated for both of them, use it for both ebuilds instead of giving up. Reported-by: Joonas Niilola <juippis@gentoo.org> Resolves: https://github.com/pkgcore/pkgdev/issues/116 Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
* tests/scripts/test_pkgdev_showkw.py: fix NOCOLOR testArthur Zamarin2022-11-191-1/+2
| | | | | | | | Fix the test for systems which predefine NOCOLOR, like in case of ebuild test environment (by epytest). Follows: 9714e4785e1ffc56a08f042011b5a966c7520a1f Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
* cli: add support for NOCOLOR to disable colorsArthur Zamarin2022-11-191-18/+42
| | | | Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
* build backend: use custom wrapper around flitArthur Zamarin2022-11-161-10/+0
| | | | | | | | | | | For pkgcore we need to run multiple preparations of generating files before creating sdist or wheel. Flit is a very simple and nice build backend, much more than setuptools. Also migrate to use snakeoil.dist sphinx extension for generating man and html, to remove various logic from `doc/conf.py`. Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
* commit: mention `-e` as nice optionArthur Zamarin2022-10-261-1/+3
| | | | | | | | | Even though just passing `-e` works (as it is just passed to git), many users don't know the existence of this option, so now I publish it in help. Closes: https://bugs.gentoo.org/846785 Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
* commit: don't show disable for targets that are no-opArthur Zamarin2022-10-161-8/+15
| | | | | | | | | For PYTHON_COMPAT, LUA_COMPAT and USE_RUBY, show the "disable" target after "enable" only if this target exists. For example, if I enable py3.11 and disable py3.7 (which is no-op), it will show only "enable py3.11". If there is no "enable", it will still show "disable py3.7". Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
* manifest: better handling of path targetArthur Zamarin2022-10-141-0/+32
| | | | | | | | | | | | When passing a `.` path while inside a package directory, it passed to path restrict generator as a simple path, which resulted in broken restrict which collected all ebuilds in the repository. By using `os.path.relpath` to base of repository, we make sure the correct path is passed and the correct restricts are generated. Fixes: https://github.com/pkgcore/pkgdev/issues/85 Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
* scripts/test_pkgdev_mask.py: unset VISUALArthur Zamarin2022-09-201-13/+22
| | | | | | | | - add test for using VISUAL instead of EDITOR - Always unset VISUAL when setting EDITOR Bug: https://bugs.gentoo.org/871576 Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
* config: per-repo configuration supportArthur Zamarin2022-09-202-2/+23
| | | | | Resolves: https://github.com/pkgcore/pkgdev/issues/89 Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
* mask: better format for last rites with bugsArthur Zamarin2022-09-101-5/+3
| | | | Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
* mask: improve parsing of empty header lineArthur Zamarin2022-09-091-0/+23
| | | | | | | If the header of mask had a break, which looked like `#`, it would fail to parse, which is somewhat wrong. So add it as exception. Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
* mask: add tests for invalid authorArthur Zamarin2022-09-091-0/+26
| | | | Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
* tests: use staticmethod to decrease warningsArthur Zamarin2022-09-096-6/+6
| | | | Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
* pkgdev commit: make sign-off off by defaultArthur Zamarin2022-05-131-0/+8
| | | | | | | Make sign-off off by default, and enable the user to pass if manually using `--signoff`, or by setting `commit.signoff` in config file. Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
* pkgdev manifest: add --ignore-fetch-restrictedArthur Zamarin2022-05-051-1/+23
| | | | | Resolves: https://github.com/pkgcore/pkgdev/issues/64 Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
* pkgdev manifest: add --if-modifiedArthur Zamarin2022-05-051-0/+50
| | | | | | | | Restrict targets for manifest to only targets that have uncommitted modifications. Resolves: https://github.com/pkgcore/pkgdev/issues/65 Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
* pkgdev mask: offer to send email to gentoo-dev MLArthur Zamarin2022-04-271-0/+38
| | | | | Resolves: https://github.com/pkgcore/pkgdev/issues/36 Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
* pkgdev commit: new summary for stabilize ALLARCHESArthur Zamarin2022-04-191-18/+70
| | | | | Resolves: https://github.com/pkgcore/pkgdev/issues/45 Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
* Add configuration supportArthur Zamarin2022-04-194-12/+125
| | | | | Resolves: https://github.com/pkgcore/pkgdev/issues/26 Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
* Improve pkgdev commit testsArthur Zamarin2022-04-151-0/+29
| | | | Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
* pkgdev mask: test optional days arg for -r/--ritesThomas Bracht Laumann Jespersen2022-04-131-16/+18
|
* pkgdev mask: Add tests for -b/--bugThomas Bracht Laumann Jespersen2022-04-071-0/+33
| | | | Signed-off-by: Thomas Bracht Laumann Jespersen <t@laumann.xyz>
* pkgdev mask: Test both -r and --ritesThomas Bracht Laumann Jespersen2022-04-071-12/+14
| | | | Signed-off-by: Thomas Bracht Laumann Jespersen <t@laumann.xyz>
* Improve commit message for new package importArthur Zamarin2022-04-021-1/+6
| | | | Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
* Add pkgdev showkw testsArthur Zamarin2022-03-251-0/+156
| | | | Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
* Add tests for keywords manglerArthur Zamarin2022-03-251-1/+22
| | | | Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
* pkgdev commit: turn copyright headers into date range when appropriateThomas Bracht Laumann Jespersen2022-03-241-0/+1
| | | | | | | | | | | | | | In commit 303e3bde8a1d273b85395541a7f266d7e4f8a6c0 the behaviour of "pkgdev commit" was modified to turn single copyright year lines into year ranges, but the following commit 51c0f9a8ba88b776551057f08a1dc0278d4b1eb3 reverted that behaviour. This is a simplified version of the date handling where a single year is turned into a year range when the given year is not the current year. This mirrors the behaviour of "repoman commit" Fixes: https://bugs.gentoo.org/835333 Signed-off-by: Thomas Bracht Laumann Jespersen <t@laumann.xyz>
* pkgdev commit: run mangling across change objects instead of raw pathsTim Harder2021-07-281-10/+15
| | | | | | | This allows for inspecting change attributes to alter potential mangling. For example, now the entire date range in the copyright header is replaced for new files instead of keeping the original start date from the old files they were based on.
* tests: add more metadata summary checksTim Harder2021-06-301-0/+81
|
* tests: add initial generated summary checks for metadata changesTim Harder2021-06-301-0/+85
|
* tests: add `pkgdev commit` non-generated message testTim Harder2021-06-301-2/+9
|
* tests: add `pkgdev commit` check for footer with no generated summaryTim Harder2021-06-301-0/+21
|
* pkgdev commit: properly generate pkg rename summariesTim Harder2021-06-301-2/+7
|
* pkgdev commit: use `git diff-index` instead of `git diff`Tim Harder2021-06-121-2/+2
| | | | | | | | To avoid config settings affecting output. Note that this forces nonempty repo usage since the HEAD ref isn't valid on newly initialized git repos, but this shouldn't be an issue in most cases.
* pkgdev showkw: initial import, moved from pkgcore's pshowkwTim Harder2021-03-311-0/+19
|
* tests: update git repo default branch nameTim Harder2021-03-312-5/+5
|
* pkgdev mask: change removal format to a 'tag: value' styleTim Harder2021-03-261-1/+1
|
* tests: add simple `pkgdev mask -r` validationTim Harder2021-03-241-0/+19
|
* tests: add check for masking a specific ebuild version via its pathTim Harder2021-03-241-0/+8
|