Skip to content

Commit

Permalink
Use a function
Browse files Browse the repository at this point in the history
  • Loading branch information
atombrella authored and JKrag committed Mar 26, 2021
1 parent a6672e3 commit 4fc9748
Showing 1 changed file with 19 additions and 1 deletion.
20 changes: 19 additions & 1 deletion test-all.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,22 @@
#!/usr/bin/env bash

basedir=$(git rev-parse --show-toplevel)

echo "Testing all kata setup scripts"
find -s . -name "setup.sh" -type f -execdir ../utils/test/test_setup.sh \;

function test-setup (){
return_code=0
scripts=$(find . -name "setup.sh" -type f -print | sort)
for script in ${scripts}; do
cd $(dirname ${script})
../utils/test/test_setup.sh setup.sh
exit_code=$?
if [ ${exit_code} -ne 0 ]; then
return_code=${exit_code}
fi
cd $basedir
done
return $return_code
}

test-setup

0 comments on commit 4fc9748

Please sign in to comment.