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

cd src/

# We don't have to set up any environment variables here since the
# Makefiles already have them from 'configure'.  (Hopefully.)

echo "Building and running LinBox's test suite..."
# There's also a 'fullcheck' target mentioned in the online installation
# instructions, but it's apparently not in our current version (1.1.6).
$MAKE check
if [ $? -ne 0 ]; then
    echo >&2 "Error: LinBox's test suite failed."
    exit 1
fi
echo "LinBox's test suite apparently passed without errors."
