Mock realpath if it is not present

This commit is contained in:
Foo 2015-05-10 23:05:57 +03:00
parent 24176882ab
commit 450dbecb34
1 changed files with 6 additions and 0 deletions

View File

@ -29,6 +29,12 @@ if test "$TRAVIS" = true ; then
fi
fi
if ! which realpath ; then
realpath() {
$PYTHON -c 'import os, sys; print(os.path.realpath(sys.argv[1]))' "$1"
}
fi
export PYTHON="${PYTHON:=python}"
export PYTHONPATH="${PYTHONPATH}${PYTHONPATH:+:}`realpath .`"
for script in tests/run_*_tests.sh ; do