From f45bd71eb38d48872e9706c6eafeaa89a23e95e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=A1clav=20Kadl=C4=8D=C3=ADk?= Date: Tue, 24 Jan 2023 15:15:39 +0100 Subject: [PATCH] Adapt test scripts to newest annobin versions --- .../runtest.sh | 5 +---- tests/Regression/testsuite/runtest.sh | 2 +- .../runtest.sh | 7 ++++--- 3 files changed, 6 insertions(+), 8 deletions(-) diff --git a/tests/Regression/annobin-fails-to-skip-endbr64-entry-point-check/runtest.sh b/tests/Regression/annobin-fails-to-skip-endbr64-entry-point-check/runtest.sh index 41312a4..91fa544 100755 --- a/tests/Regression/annobin-fails-to-skip-endbr64-entry-point-check/runtest.sh +++ b/tests/Regression/annobin-fails-to-skip-endbr64-entry-point-check/runtest.sh @@ -28,13 +28,10 @@ # Include Beaker environment . /usr/share/beakerlib/beakerlib.sh || exit 1 -PACKAGE="annobin" - rlJournalStart rlPhaseStartSetup rlRun "TmpDir=\$(mktemp -d)" 0 "Creating tmp directory" rlRun "pushd $TmpDir" - rlRun "rpm -q annobin-annocheck gcc" rlPhaseEnd rlPhaseStartTest @@ -43,7 +40,7 @@ rlJournalStart rlRun "gcc `rpm --eval %build_cflags` -fpic -c f1.c" rlRun "gcc `rpm --eval %build_cflags` -fpic -c f2.c" rlRun "gcc `rpm --eval %build_ldflags` -shared f1.o f2.o" - rlRun "annocheck -v a.out" + rlRun "annocheck -v --skip-lto a.out" rlPhaseEnd rlPhaseStartCleanup diff --git a/tests/Regression/testsuite/runtest.sh b/tests/Regression/testsuite/runtest.sh index c8016ad..1507c45 100755 --- a/tests/Regression/testsuite/runtest.sh +++ b/tests/Regression/testsuite/runtest.sh @@ -62,7 +62,7 @@ rlJournalStart rlRun "pushd $TMP" rlFetchSrcForInstalled $PACKAGE - rlRun "yum-builddep -y *src.rpm" + rlRun "dnf builddep -y *src.rpm" rlRun "rpm --define='_topdir $TMP' -Uvh *src.rpm" rlRun "rpmbuild --define='_topdir $TMP' -bc SPECS/annobin.spec" rlPhaseEnd diff --git a/tests/Sanity/annocheck-silently-ignores-any-file-parameter/runtest.sh b/tests/Sanity/annocheck-silently-ignores-any-file-parameter/runtest.sh index ca991af..bb1a436 100755 --- a/tests/Sanity/annocheck-silently-ignores-any-file-parameter/runtest.sh +++ b/tests/Sanity/annocheck-silently-ignores-any-file-parameter/runtest.sh @@ -28,8 +28,6 @@ # Include Beaker environment . /usr/share/beakerlib/beakerlib.sh || exit 1 -PACKAGE="annobin" - rlJournalStart rlPhaseStartSetup rlRun "TMP=$(mktemp -d)" @@ -41,7 +39,10 @@ rlJournalStart samplecnt=$(ls *.sample | wc -l) testcnt=$(ls *.sample | \ xargs annocheck |& \ - fgrep '.sample: is not an ELF format file' | wc -l) + grep -F \ + -e '.sample: unable to read magic number' \ + -e '.sample: is not an ELF format file' \ + | wc -l) rlRun "test $samplecnt -eq 300" rlRun "test $testcnt -eq 300" rlPhaseEnd