if [ "$SAGE_LOCAL" = "" ]; then
   echo "SAGE_LOCAL undefined ... exiting";
   echo "Maybe run 'sage -sh'?"
   exit 1
fi

cd src

if [ "$UNAME" = "CYGWIN" ]; then
    echo "Disable parallel testing on Cygwin"
    MAKE="$MAKE -j1"
fi

echo "Now building and running libfplll test suite..."
$MAKE check
if [ $? -ne 0 ]; then
    echo >&2 "Error: The libfplll test suite failed."
    exit 1
fi

echo "The libfplll test suite passed successfully."
