This change aims to streamline the integrationtest suite and reduce friction when running (parts of) test suites. Changes: - add `test-testname` to makefile to easily run one suite - made skipping tests first class citizen in test.sh (all available testsuites and the reasons they are skipped are now better exposed and discovered) - suppress some output of gotest unless there is an error - no longer build binary for examples and gotest suites - removed .SILENT from makefile as it being applied to only some targets makes it feel weird (I just learned about this option btw, feel free to comment on this change) - move individual tests out of `test.sh` and into `test-misc.sh` - introduced the concept of testsuites to `test.sh`
26 lines
506 B
Bash
Executable File
26 lines
506 B
Bash
Executable File
#!/bin/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'
|