aboutsummaryrefslogtreecommitdiff
path: root/test/test_runner.sh
blob: c97d8d0f7432fbf5b7da07a436706641a43ca2be (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/usr/bin/env bash
set -e

cd "$(dirname "$(readlink -f "$BASH_SOURCE")")"

# Load the helpers.
. helpers.bash

function execute() {
	>&2 echo "++ $@"
	eval "$@"
}

# Tests to run. Defaults to all.
if [[ -z "${TESTS}" ]]; then
	TESTS=${@:-.}
else
	TESTS=$TESTS
fi

# Run the tests.
execute time bats --tap $TESTS