[Rpm-maint] [rpm-software-management/rpm] rpmspec: Use NEVRA for binary packages queries (PR #2995)
Panu Matilainen
notifications at github.com
Tue Apr 2 09:56:22 UTC 2024
@pmatilai commented on this pull request.
> @@ -180,6 +180,34 @@ runroot rpmspec \
[])
RPMTEST_CLEANUP
+AT_SETUP([rpmspec -q --rpms])
+AT_KEYWORDS([query])
+RPMTEST_CHECK([
+RPMDB_INIT
+runroot rpmspec --rpms \
+ -q /data/SPECS/hello.spec | grep src
+runroot rpmspec --rpms \
+ -q /data/SPECS/hello.spec | cut -d. -f-2
Put these two checks into separate RPMTEST_CHECK() blocks, it makes the tests far more reliable when you don't need to guess which part output what. There are a bunch of tests that do this before we learned that you can have many checks inside a setup/clean pair :sweat_smile: but it's a bad practise we should not do in new tests.
Also, these are not writing anything so you don't need RPMDB_INIT (which has non-zero cost).
--
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/2995#pullrequestreview-1973236150
You are receiving this because you are subscribed to this thread.
Message ID: <rpm-software-management/rpm/pull/2995/review/1973236150 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20240402/931eb1a1/attachment.html>
More information about the Rpm-maint
mailing list