35 lines
574 B
Bash
Executable file
35 lines
574 B
Bash
Executable file
#!/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}
|