#!/bin/sh
set -e

export OMPI_MCA_rmaps_base_oversubscribe=yes

for py in $(pyversions -r 2>/dev/null);
do
    cd "$AUTOPKGTEST_TMP"

    echo "Testing with $py:"
    $py -c "import h5py; h5py.run_tests(verbose=True,verbosity=2)"

    echo "skipping tests with $py-dbg"
    #$py-dbg -c "import h5py; h5py.run_tests(verbose=True,verbosity=2)"

    echo "Testing MPI support with $py:"
    mpirun -n 5 $py -c "import h5py; h5py.run_tests(verbose=True,verbosity=2)"

done
