export OMPI_MCA_plm_rsh_agent=/bin/false
export OMPI_MCA_rmaps_base_oversubscribe=1

export OMP_NUM_THREADS=1

DEB_HOST_ARCH=$(dpkg-architecture -qDEB_HOST_ARCH)
if [ ${DEB_HOST_ARCH} = "i386" ]; then
  SKIP_TEST7F=y
fi

cp makefile makefile.orig

sed "s|^\(include \./\${PETSC_ARCH}/lib/slepc/conf/slepcvariables\)|#\1|" -i makefile

make check SLEPC_DIR=/usr/lib/slepc PETSC_DIR=/usr/lib/petsc SKIP_TEST7F=${SKIP_TEST7F} V=1

cp makefile makefile.tests
cp makefile.orig makefile
