python-rpm-generators/tests/download_data_and_run_pytest.sh
Karolina Surma 26568143ec Add centpkg to use in CentOS Stream
If tests are run in this repository, they exist.
Other packages in Fedora require fedpkg-minimal to download the sources.
We also want to run this test in CentOS Stream where fedpkg-minimal is
not available, hence adding centpkg invocation.
The change will have no effect in this repository, but is essential for
the smooth tests run of other components.
2024-11-12 11:49:38 +01:00

16 lines
737 B
Bash
Executable File

#!/usr/bin/bash -eux
# Use update-test-sources.sh to update the test data
# When the tests run in python-rpm-generators,
# the structure on disk does not match the dist-git repository.
# We apparently must use the standard-test-source role to grab the sources.
# OTOH in other packages, we must use fedpkg(-minimal) or centpkg(-minimal),
# depending on the destination OS.
# The --force flag is required in full-blown fedpkg/centpkg (the source is unused in spec),
# and it is ignored in fedpkg/centpkg-minimal (all sources are always downloaded).
test -f test-sources-*.tar.gz || fedpkg sources --force || centpkg sources --force
tar -xvf test-sources-*.tar.gz -C ./tests/data/scripts_pythondistdeps/
cd tests/
python3 -m pytest -vvv