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

cd src

# -j1 needed to avoid a possible race condition in the tests
# see https://trac.sagemath.org/ticket/23217
$MAKE -j1 check
if [ $? -ne 0 ]; then
    echo >&2 "Error checking yasm."
    exit 1
fi
