From 4c1eb64467388a1712648e29ff9a7ed616da3611 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Milo=C5=A1=20Prchl=C3=ADk?= Date: Tue, 16 Jan 2024 15:09:33 +0100 Subject: [PATCH] Update tests to pass smoothly when running against recent Fedora --- .../bugs/when-mistaking-argument-of-strings/test.sh | 12 ++++++++++-- tests/rebuilds/wget/main.fmf | 13 +++++++++++++ tests/rebuilds/wget/test.sh | 4 +++- 3 files changed, 26 insertions(+), 3 deletions(-) diff --git a/tests/bugs/when-mistaking-argument-of-strings/test.sh b/tests/bugs/when-mistaking-argument-of-strings/test.sh index 5dd4033..b2ebef1 100755 --- a/tests/bugs/when-mistaking-argument-of-strings/test.sh +++ b/tests/bugs/when-mistaking-argument-of-strings/test.sh @@ -41,12 +41,20 @@ rlJournalStart rlPhaseStartTest "#3: strings -n 0" rlRun "strings -n 0 2>&1 | tee output" - rlAssertGrep "invalid minimum string length 0" output + if rlIsFedora "> 39"; then + rlAssertGrep "minimum string length is too small: 0" output + else + rlAssertGrep "invalid minimum string length 0" output + fi rlPhaseEnd rlPhaseStartTest "#4: strings --bytes 0" rlRun "strings --bytes 0 2>&1 | tee output" - rlAssertGrep "invalid minimum string length 0" output + if rlIsFedora "> 39"; then + rlAssertGrep "minimum string length is too small: 0" output + else + rlAssertGrep "invalid minimum string length 0" output + fi rlPhaseEnd rlPhaseStartCleanup diff --git a/tests/rebuilds/wget/main.fmf b/tests/rebuilds/wget/main.fmf index 8ee8938..a7ef164 100644 --- a/tests/rebuilds/wget/main.fmf +++ b/tests/rebuilds/wget/main.fmf @@ -7,3 +7,16 @@ tag+: require+: - wget + +environment+: + WGET_PACKAGE: "wget" + REQUIRES: "wget" + +adjust+: + - when: distro >= fedora-39 + require+: + - wget2 + + environment+: + WGET_PACKAGE: "wget2" + REQUIRES: "wget2" diff --git a/tests/rebuilds/wget/test.sh b/tests/rebuilds/wget/test.sh index 04533b3..b0dea4e 100755 --- a/tests/rebuilds/wget/test.sh +++ b/tests/rebuilds/wget/test.sh @@ -35,9 +35,11 @@ rlJournalStart rlPhaseStartSetup buTestHeader + rlLogInfo "WGET_PACKAGE=$WGET_PACKAGE" + buEnterTmpDir - buPrepareSRPM "wget" + buPrepareSRPM "$WGET_PACKAGE" rlPhaseEnd rlPhaseStartTest