#!/bin/sh
set -e

export OMPI_MCA_rmaps_base_oversubscribe=yes

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

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

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

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

done
