mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-06-03 14:59:09 -07:00
Correct test constraints and add sanity check.
This commit is contained in:
parent
69559c184d
commit
7ba47bfd2d
3 changed files with 17 additions and 1 deletions
15
test/sanity/code-smell/test-constraints.sh
Executable file
15
test/sanity/code-smell/test-constraints.sh
Executable file
|
@ -0,0 +1,15 @@
|
|||
#!/bin/sh
|
||||
|
||||
constraints=$(
|
||||
grep '.' test/runner/requirements/*.txt \
|
||||
| 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
|
Loading…
Add table
Add a link
Reference in a new issue