Files
mgmt/test/test-omv.sh
Karpfen 7e8ced534f misc: Use /usr/bin/env for a more generic shebang
Use path based SHELL in Makefiles. It was suggested that this is a
better solution for make for cases when there is no /usr/bin/env.

See: https://github.com/purpleidea/mgmt/pull/694#discussion_r1015596204
2025-03-22 14:53:21 -04:00

26 lines
517 B
Bash
Executable File

#!/usr/bin/env -S bash -i
# simple test harness for testing mgmt via omv
echo running "$0"
CWD=`pwd`
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" # dir!
cd "$DIR" >/dev/null # work from test directory
# vtest+ tests
RET=0
for i in omv/*.yaml; do
echo "running: vtest+ $i"
vtest+ "$i"
if [ $? -ne 0 ]; then
RET=1
break # remove this if we should run all tests even if one fails
fi
done
# return to original dir
cd "$CWD" >/dev/null
if [ ! $RET -eq 0 ]; then
echo 'FAIL'
exit $RET
fi
echo 'PASS'