A tool that bootstraps your dotfiles
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
#!/usr/bin/env bash
|
|
|
|
set -e
|
|
|
|
|
|
|
|
export BASEDIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
|
|
|
|
cd "${BASEDIR}/test"
|
|
|
|
. "./driver-lib.bash"
|
|
|
|
|
|
|
|
date_stamp="$(date --rfc-3339=ns)"
|
|
|
|
start="$(date +%s)"
|
|
|
|
|
|
|
|
check_env
|
|
|
|
|
|
|
|
declare -a tests=()
|
|
|
|
|
|
|
|
if [ $# -eq 0 ]; then
|
|
|
|
while read file; do
|
|
|
|
tests+=("${file}")
|
|
|
|
done < <(find tests -type f -name '*.bash' | sort)
|
|
|
|
else
|
|
|
|
tests=("$@")
|
|
|
|
fi
|
|
|
|
|
|
|
|
initialize "${#tests[@]}" "${VERSION}"
|
|
|
|
|
|
|
|
for file in "${tests[@]}"; do
|
|
|
|
run_test "$(basename "${file}")" "${VERSION}"
|
|
|
|
done
|
|
|
|
|
|
|
|
if report; then
|
|
|
|
ret=0
|
|
|
|
else
|
|
|
|
ret=1
|
|
|
|
fi
|
|
|
|
|
|
|
|
echo "(tests run in $(($(date +%s) - start)) seconds)"
|
|
|
|
exit ${ret}
|