blob: 5884aad1653e72df943561275295f54c384bb1ab (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
#!/bin/bash
. "$(dirname ${BASH_SOURCE[0]})/lib/common.inc"
if (($#>0)); then
tests=("$@")
else
tests=("$(dirname ${BASH_SOURCE[0]})/test.d/"*.sh)
fi
# TODO: this should be ported to tap.sh https://github.com/andrewgregory/tap.sh
# and use something similar to the next line
# prove --ext .php --state=hot,slow,all,save --timer -o -e "php index.php tools test $url" -r "$@" application/test/tests/
for t in "${tests[@]}"; do
l=$(basename ${t} .sh)
if [ -x ${t} ]; then
msg "Running test '${l}'"
${t}
[ $? -ne 0 ] && die "Test '${l}' failed"
echo -e "\n\n\n"
else
warning "Skipping test ${l}"
fi
done
|