rust-rpmmacros: Make test compatible with rpm 4.20+
This commit is contained in:
parent
b4fdda2408
commit
b3ea9f2461
2 changed files with 4 additions and 5 deletions
|
|
@ -4,9 +4,9 @@
|
|||
|
||||
PACKAGES="rust cargo"
|
||||
if rlIsFedora; then
|
||||
PACKAGES+=" cargo-rpm-macros"
|
||||
PACKAGES+=" cargo-rpm-macros"
|
||||
else
|
||||
PACKAGES+=" rust-toolset"
|
||||
PACKAGES+=" rust-toolset"
|
||||
fi
|
||||
SPECFILE="rust-rpmtest.spec"
|
||||
PKGNAME="$(rpmspec -q --srpm --qf "%{name}-%{version}-%{release}.%{arch}" $SPECFILE)"
|
||||
|
|
@ -31,14 +31,12 @@ rlJournalStart
|
|||
|
||||
# Set the spec file
|
||||
rlRun "cp $SPECFILE $tmp/SPECS"
|
||||
rlRun "cp rust-rpmtest.spec $tmp/SPECS"
|
||||
rlRun "pushd $tmp"
|
||||
rlRun "set -o pipefail"
|
||||
rlPhaseEnd
|
||||
|
||||
rlPhaseStartTest
|
||||
rlRun "rpmbuild --define '_topdir $tmp' -bi $tmp/SPECS/$SPECFILE"
|
||||
rlRun "$tmp/BUILDROOT/$PKGNAME/usr/bin/rpmtest"
|
||||
rlRun "rpmbuild --define '_topdir $tmp' -ba $tmp/SPECS/$SPECFILE"
|
||||
rlPhaseEnd
|
||||
|
||||
rlPhaseStartCleanup
|
||||
|
|
|
|||
|
|
@ -48,3 +48,4 @@ Summary: %{summary}
|
|||
|
||||
%check
|
||||
%cargo_test
|
||||
%{buildroot}/%{_bindir}/rpmtest | grep -E "The answer is [0-9]+"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue