From dff3d6a440e66a440ca59575a8563e403561a3a1 Mon Sep 17 00:00:00 2001 From: Tom Stellard Date: Fri, 30 Jun 2023 18:56:30 +0000 Subject: [PATCH] Update tests to work with dnf5 --- tests/auto-set-build-flags/main.fmf | 1 + tests/auto-set-build-flags/runtest.sh | 2 +- tests/brp-llvm-compile-lto-elf/main.fmf | 1 + tests/brp-llvm-compile-lto-elf/runtest.sh | 4 ++-- tests/build-self/main.fmf | 1 + tests/build-self/runtest.sh | 2 +- 6 files changed, 7 insertions(+), 4 deletions(-) diff --git a/tests/auto-set-build-flags/main.fmf b/tests/auto-set-build-flags/main.fmf index 6777d59..aeb1b86 100644 --- a/tests/auto-set-build-flags/main.fmf +++ b/tests/auto-set-build-flags/main.fmf @@ -4,6 +4,7 @@ summary: > require: - annobin-annocheck + - dnf5-plugins - gcc - gcc-c++ - make diff --git a/tests/auto-set-build-flags/runtest.sh b/tests/auto-set-build-flags/runtest.sh index 8d4a8ed..ca0279d 100755 --- a/tests/auto-set-build-flags/runtest.sh +++ b/tests/auto-set-build-flags/runtest.sh @@ -2,6 +2,6 @@ set -ex -dnf -y build-dep test.spec +dnf -y builddep test.spec rpmbuild --define '_sourcedir .' --define '_builddir .' -bi test.spec rpmbuild --without auto_set_build_flags --define '_sourcedir .' --define '_builddir .' -bi test.spec diff --git a/tests/brp-llvm-compile-lto-elf/main.fmf b/tests/brp-llvm-compile-lto-elf/main.fmf index ada5230..19e8d13 100644 --- a/tests/brp-llvm-compile-lto-elf/main.fmf +++ b/tests/brp-llvm-compile-lto-elf/main.fmf @@ -2,6 +2,7 @@ Summary: Test that the brp-llvm-compile-lto-elf script is working correctly require: - dnf-plugins-core + - dnf5-plugins - redhat-rpm-config - rpm-build diff --git a/tests/brp-llvm-compile-lto-elf/runtest.sh b/tests/brp-llvm-compile-lto-elf/runtest.sh index 1690d65..d152bda 100755 --- a/tests/brp-llvm-compile-lto-elf/runtest.sh +++ b/tests/brp-llvm-compile-lto-elf/runtest.sh @@ -5,7 +5,7 @@ set -ex lib_dir=brp-llvm-compile-lto-elf-test-lib lib_spec=$lib_dir/brp-llvm-compile-lto-elf-test-lib.spec -dnf -y build-dep $lib_spec +dnf -y builddep $lib_spec rpmbuild --define "_sourcedir ." --define "_builddir ./$lib_dir" --define "_rpmdir ." -bb $lib_spec dnf -y install ./`rpm --eval '%{_arch}'`/*.rpm @@ -13,5 +13,5 @@ dnf -y install ./`rpm --eval '%{_arch}'`/*.rpm test_dir=brp-llvm-compile-lto-elf-test test_spec=$test_dir/brp-llvm-compile-lto-elf-test.spec -dnf -y build-dep $test_spec +dnf -y builddep $test_spec rpmbuild --define "_sourcedir ." --define "_builddir ./$test_dir" -bi $test_spec diff --git a/tests/build-self/main.fmf b/tests/build-self/main.fmf index 0d84895..12e1e5c 100644 --- a/tests/build-self/main.fmf +++ b/tests/build-self/main.fmf @@ -2,5 +2,6 @@ summary: self-build test require: - dnf-plugins-core + - dnf5-plugins - rpm-build test: ./runtest.sh diff --git a/tests/build-self/runtest.sh b/tests/build-self/runtest.sh index 68ab7cc..0b7ef72 100755 --- a/tests/build-self/runtest.sh +++ b/tests/build-self/runtest.sh @@ -3,5 +3,5 @@ set -e spec=$TMT_TREE/redhat-rpm-config.spec -dnf -y build-dep $spec +dnf -y builddep $spec rpmbuild --define "_sourcedir $TMT_TREE" -ba $spec