2022-03-09 13:45:36 +00:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
|
|
|
set -eu
|
|
|
|
|
|
|
|
die() {
|
|
|
|
echo >&2 "$@"
|
|
|
|
exit 1
|
|
|
|
}
|
|
|
|
|
|
|
|
# shellcheck disable=SC1007
|
|
|
|
TEST_DIR=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd)
|
|
|
|
# shellcheck source=./.environment.sh
|
|
|
|
. "${TEST_DIR}/.environment.sh"
|
|
|
|
|
2022-03-15 09:40:01 +00:00
|
|
|
"${TEST_DIR}/check-requirements"
|
2022-03-09 13:45:36 +00:00
|
|
|
|
|
|
|
if [ $# -ge 1 ]; then
|
|
|
|
"${TEST_DIR}/lib/bats-core/bin/bats" \
|
|
|
|
--jobs 1 \
|
|
|
|
--print-output-on-failure \
|
|
|
|
-T "$@"
|
|
|
|
else
|
|
|
|
"${TEST_DIR}/lib/bats-core/bin/bats" \
|
|
|
|
--jobs 1 \
|
|
|
|
--print-output-on-failure \
|
|
|
|
-T "${TEST_DIR}/bats" "${TEST_DIR}/dyn-bats"
|
|
|
|
fi
|