From: Patrick Talbert <ptalbert(a)redhat.com>
redhat: fix selftest git command so it picks the right commit
The current git command used to fetch the latest release string may end
up finding the latest release string of a different branch such as
ark-latest and then comparing it to the version string in the
changelog-9.99 file of the current branch. These two strings won't
necessarily match so the test fails.
Fix this by dropping '--all' from the git command so we end up finding
the latest release commit of the current branch and comparing it to the
changelog-9.99 file's string in the same current branch. These should be
the same.
Signed-off-by: Patrick Talbert <ptalbert(a)redhat.com>
diff --git a/redhat/self-test/2001-dist-release.bats
b/redhat/self-test/2001-dist-release.bats
index blahblah..blahblah 100644
--- a/redhat/self-test/2001-dist-release.bats
+++ b/redhat/self-test/2001-dist-release.bats
@@ -36,7 +36,7 @@ _dist-release_test_2() {
# release number in Makefile.rhelver.
# and above in prologue.
cd $BATS_TMPDIR/distrelease
- title="$(git log --oneline --all --grep "\[redhat\] kernel" -n 1
--pretty="format:%s")"
+ title="$(git log --oneline --grep "\[redhat\] kernel" -n 1
--pretty="format:%s")"
# title = ... [redhat] kernel-5.11.0-0.rc0.20201220git467f8165a2b0.104
# Just the title message part AFTER "[redhat] ":
title=${title##*\[redhat\] }
--
https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2142