Last active
February 18, 2020 14:39
-
-
Save goneri/e408b8a0a405412c24e7595b49af565b to your computer and use it in GitHub Desktop.
Ansible VMware module test coverage
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
echo "module,status" | |
for module in $(find lib -type f -name 'vmware*.py' -or -name 'vca*.py' -or -name 'vcenter*.py'|xargs -n1 basename -s .py|sort -u); do | |
aliases_file="test/integration/targets/${module}/aliases" | |
current_status="no_test" | |
if [ -f "${aliases_file}" ]; then | |
if [ -n "$(egrep '(disabled)' ${aliases_file})" ]; then | |
current_status="disabled" | |
elif [ -n "$(grep zuul ${aliases_file})" ]; then | |
current_status="$(grep 'zuul/vmware' "test/integration/targets/${module}/aliases"|sed 's,zuul/vmware/,,')" | |
fi | |
fi | |
echo "\"${module}\",\"${current_status}\"" | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment