#!/bin/bash
set -e

# s390x segfaults in all known tests. Something is amiss.
# Adios2 upstream acknowledges big-endian support is not tested.
# (some adios2 and dolfinx VTX tests fail, some pass)
# Assume all big-endian systems will fail adios4dolfinx and skip them all.
DEB_HOST_ARCH_ENDIAN=$(dpkg-architecture -qDEB_HOST_ARCH_ENDIAN)
if [ "x${DEB_HOST_ARCH_ENDIAN}" = "xbig" ]; then
  echo "Adios2 support is not tested on big-endian systems."
else
  for pyver in `py3versions -sv`; do
    ${MPIEXEC} python$pyver -m pytest -k "${TEST_SELECTION}" tests
  done
fi
