diff options
Diffstat (limited to 'test/test')
-rwxr-xr-x | test/test | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/test/test b/test/test new file mode 100755 index 0000000..2d1e3a8 --- /dev/null +++ b/test/test @@ -0,0 +1,35 @@ +#!/usr/bin/env bash +set -e + +BASEDIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +cd "${BASEDIR}" +. "./driver-lib.bash" + +start="$(date +%s)" + +check_prereqs || die "prerequisites unsatsfied." + +declare -a tests=() + +if [ $# -eq 0 ]; then + while read file; do + tests+=("${file}") + done < <(find tests -type f -name '*.bash') +else + tests=("$@") +fi + +initialize "${#tests[@]}" + +for file in "${tests[@]}"; do + run_test "$(basename ${file})" +done + +if report; then + ret=0 +else + ret=1 +fi + +echo "(tests run in $(($(date +%s) - start)) seconds)" +exit ${ret} |