Fix running tests with OBJDIR

This commit is contained in:
Pierre Pronchery 2016-10-09 03:48:29 +02:00
parent 48991b825f
commit 3b8fa5116d

View File

@ -53,8 +53,10 @@ _run()
shift
echo -n "$test:" 1>&2
(echo
echo "Testing: $OBJDIR$test" "$@"
LD_LIBRARY_PATH="$OBJDIR../src/lib" "$OBJDIR$test" "$@") >> "$target" 2>&1
echo "Testing: $test" "$@"
testexe="./$test"
[ -x "$OBJDIR$test" ] && testexe="$OBJDIR$test"
LD_LIBRARY_PATH="$OBJDIR../src/lib" "$testexe" "$@") >> "$target" 2>&1
res=$?
if [ $res -ne 0 ]; then
echo " FAIL (error $res)"