mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
d662f6f0db
* Handle old versions of coverage. * Handle old versions of setuptools. * Detect python version for docker/remote units. * Add sanity override for test constraints.
16 lines
469 B
Bash
Executable file
16 lines
469 B
Bash
Executable file
#!/bin/sh
|
|
|
|
constraints=$(
|
|
grep '.' test/runner/requirements/*.txt \
|
|
| grep -v '(sanity_ok)$' \
|
|
| sed 's/ *;.*$//; s/ #.*$//' \
|
|
| grep -v '/constraints.txt:' \
|
|
| grep '[<>=]'
|
|
)
|
|
|
|
if [ "${constraints}" ]; then
|
|
echo 'Constraints for test requirements should be in "test/runner/requirements/constraints.txt".'
|
|
echo 'The following constraints were found outside the "constraints.txt" file:'
|
|
echo "${constraints}"
|
|
exit 1
|
|
fi
|