#!/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 -s 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 \
and not test_get_luts \
and not test_convert_remote_files_to_fsspec_fsfile \
and not test_convert_remote_files_to_fsspec_filename_dict \
and not test_convert_remote_files_to_fsspec_mixed_sources \
and not test_get_satpos_from_satname \
and not test_distributed" 2>&1
done
