CI: Don't use % in --define (it might have side effects)

This commit is contained in:
Miro Hrončok 2023-01-13 11:05:31 +01:00
parent 20858812cc
commit 771fcecf48

View File

@ -33,22 +33,22 @@ for arch in aarch64 armv7hl x86_64 ppc64le riscv64; do
;;
esac
rpmeval --target="${arch}-linux" --define='%_include_frame_pointers 1' | grep -q -- "$flags"
rpmeval --target="${arch}-linux" --define='_include_frame_pointers 1' | grep -q -- "$flags"
validate "[${arch}] Test that the flags are included if the macro is defined"
rpmeval --target="${arch}-linux" --undefine='_include_frame_pointers' | grep -qv -- "$flags"
validate "[${arch}] Test that the flags are _not_ included if the macro is undefined"
rpmeval --target="${arch}-linux" --define="%fedora 1" | grep -q -- "$flags"
rpmeval --target="${arch}-linux" --define='fedora 1' | grep -q -- "$flags"
validate "[${arch}] Test that the flags are included by default on Fedora"
rpmeval --target="${arch}-linux" --define="%rhel 1" | grep -qv -- "$flags"
rpmeval --target="${arch}-linux" --define='rhel 1' | grep -qv -- "$flags"
validate "[${arch}] Test that the flags are _not_ included by default on RHEL"
done
flags='-fno-omit-frame-pointer'
for arch in i386 i486 i586 i686 athlon s390x; do
rpmeval --target="${arch}-linux" --define='%_include_frame_pointers 1' | grep -qv -- "$flags"
rpmeval --target="${arch}-linux" --define='_include_frame_pointers 1' | grep -qv -- "$flags"
validate "[${arch}] Test that the flags are not included if the macro is defined"
rpmeval --target="${arch}-linux" | grep -qv -- "$flags"