Adapt test scripts to newest annobin versions

This commit is contained in:
Václav Kadlčík 2023-01-24 15:15:39 +01:00
parent ec1798ad31
commit 726b5bc7ed
3 changed files with 6 additions and 8 deletions

View File

@ -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

View File

@ -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

View File

@ -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