autotest: use current autotest directory if possible

This commit is contained in:
Andrew Tridgell 2015-07-09 11:53:46 +10:00
parent f2106f39aa
commit 7f425a97a3

View File

@ -276,7 +276,10 @@ if [ -n "$OVERRIDE_BUILD_TARGET" ]; then
BUILD_TARGET="$OVERRIDE_BUILD_TARGET"
fi
autotest=$(dirname $(readlink -e $0))
autotest="../Tools/autotest"
[ -d "$autotest"] && {
autotest=$(dirname $(readlink -e $0))
}
pushd $autotest/../../$VEHICLE || {
echo "Failed to change to vehicle directory for $VEHICLE"
usage