4 if command -v greadlink
> /dev
/null
; then
5 READLINK
="greadlink" # Prefer greadlink over readlink
8 if ! $READLINK -f "$(which "$0")" > /dev
/null
2>&1 ; then
9 ROOT
="$(dirname "$
(which "$0")")"
10 if [ ! -f "$ROOT/hg-fast-export.py" ] ; then
11 echo "test runner requires a readlink implementation which knows" \
12 " how to canonicalize paths in order to be called via a symlink."
16 ROOT
="$(dirname "$
($READLINK -f "$(which "$0")")")"
20 export SHARNESS_TEST_SRCDIR
="${SHARNESS_TEST_SRCDIR:-$ROOT/t/sharness}"
22 TESTS
=$
(find $ROOT/t
-maxdepth 1 -name \
*.t
-executable -type f
)
25 type parallel
>& /dev
/null
27 echo "Using parallel to run tests"
29 echo "Running test $1"
33 parallel F
::: $TESTS || failed
=1
36 echo "Running test $i"
41 if [ "$failed" -eq "0" ]; then
42 echo "All tests passed";
44 echo "There were failed tests";