if [ -z "$SAGE_LOCAL" ]; then
    echo >&2 "Error: SAGE_LOCAL undefined - exiting..."
    echo >&2 "Maybe run 'sage -sh'?"
    exit 1
fi

cd src

# See upstream bug at http://savannah.gnu.org/bugs/?42960
export MAKE="$MAKE -j1"

echo "Running GSL testsuite..."
$MAKE check
if [ $? -ne 0 ]; then
    echo >&2 "Error: make check for GSL failed."
    exit 1
fi
