set-opipefail
# Check that apt-tests has no unwanted extra reqs:found_unwanted_reqs_of_tests="$(rpm -q apt-tests -R |{grep-e'\(apt-https\|/usr/sbin/nginx\|nginx\|/usr/bin/openssl\|openssl\)'||
[$?-eq1];})"if[-n"$found_unwanted_reqs_of_tests"];then
printf>&2'These are unwanted extra reqs of apt-tests:\n%s\n'\
"$found_unwanted_reqs_of_tests"exit1
fi
pushd/usr/share/apt/tests/
# force the target arch for the tests## By default, the packages would be built for the arch detected by rpm-build# (rpmbuild --eval %_arch). On installation, they would be compared# by rpm for compatibility with the arch detected by rpm. Currently,# the mismatch in the detection between rpm and rpm-build can lead to problems,# at least, on armh. So, we set the target by force to a value that must work.system_arch="$(rpm -q rpm --qf='%{ARCH}')"exportAPT_TEST_TARGET="$system_arch"# this macro can be prefixed (e.g., by environment assignments),# therefore the extra backslash in the first line# A quick test with just one method for the case without APT_TEST_GPGPUBKEY.APT_TEST_METHODS='file'\
./run-tests-v
# The same tests, but just via cdrom with a missing release:#APT_TEST_METHODS=cdrom_missing_release %runtests