export OMPI_MCA_plm_rsh_agent=/bin/false
export OMPI_MCA_rmaps_base_oversubscribe=1
export OMPI_MCA_btl_base_warn_component_unused=0

cp debian/Makefile_int.inc src/Makefile.inc
cd src/check
patch < ../../debian/tests/check.Makefile.patch

echo "Test libscotch.so (sequential)"
make realclean
make check

echo "Test libptscotch.so (parallel)"
make realclean
make ptcheck 2>ptcheck.stderr
# expect multiple "Proc  1 of  3, pid ....." piped to stderr
if [ -s ptcheck.stderr ]; then
    echo "stderr reported:"
    cat ptcheck.stderr
fi
