#!/bin/sh
set -efu

# Skip tests on problematic architectures
ARCH="$(dpkg-architecture -qDEB_BUILD_ARCH)"

if [ "${ARCH}" = "armhf" ]
then
  echo "Skipping tests on problematic architectures"
  exit 77
fi

PYS=${PYS:-"$(py3versions -r 2>/dev/null)"}

cd "$AUTOPKGTEST_TMP"

for py in $PYS; do
    echo "=== $py ==="
    $py -m pytest -v --pyargs satpy -k "not test_retrieve \
and not test_offline_retrieve and not test_retrieve_all \
and not test_download_script \
and not test_start_time and not test_end_time \
and not test_mimic_TPW2_nc \
and not TestAngleGeneration" 2>&1
done
