Skip to content

Commit

Permalink
Merge pull request #64 from nhosoi/ah
Browse files Browse the repository at this point in the history
Fixing check_rpmspec_collection.sh
  • Loading branch information
nhosoi authored Apr 21, 2021
2 parents 24c3a71 + 1bab1d0 commit d45e5e8
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions check_rpmspec_collection.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

if [ "$1" = "-h" ] || [ "$1" = "--help" ]; then
echo "Description - Verify rpm package count with various combination of ansible and collection_artifact options."
echo " - Check there is no README.html files in /usr/share/andible/collections."
echo " - Check there is no README.html files in /usr/share/ansible/collections."
echo "Usage: $0 [ -h | --help ] | [ fedpkg | rhpkg [ branch_name ] ]"
exit 0
fi
Expand All @@ -24,7 +24,8 @@ run() {
output=/tmp/$pkgcmd.$ext
cmdline="$pkgcmd --release $branch local $option"
echo "$cmdline"
$cmdline > "$output" 2>&1
mkdir noarch
$cmdline > "$output" 2>&1 || :
count=$( find noarch -name "*.rpm" | wc -l )
if [ "$count" -eq "$expect" ]; then
echo OK - result "$count" is "$expect"
Expand All @@ -41,11 +42,11 @@ run() {
}

run "--without ansible" "without_ansible" 1
run "--without ansible --with collection_artifact" "without_ansible-with_collection_artifact" 1
run "--without ansible --with collection_artifact" "without_ansible-with_collection_artifact" 0
run "--without ansible --without collection_artifact" "without_ansible-without_collection_artifact" 1
run "--without collection_artifact" "without_collection_artifact" 1
run "--with ansbile --without collection_artifact" "with_ansible-without_collection_artifact" 1
run "--with ansible --without collection_artifact" "with_ansible-without_collection_artifact" 1
run "" "no_opt" 1
run "--with ansbile" "with_ansible" 1
run "--with ansible" "with_ansible" 1
run "--with collection_artifact" "with_collection_artifact" 2
run "--with ansible --with collection_artifact" "with_ansible-with_collection_artifact" 2

0 comments on commit d45e5e8

Please sign in to comment.