#!/bin/sh
set -eu

pyvers=$(py3versions -r 2>/dev/null)

cp -a tests "$AUTOPKGTEST_TMP"
cd "$AUTOPKGTEST_TMP"

PYTEST_MATCH="not test_openapi_tools_validate_v3 and not test_openapi_tools_validate_v2"
for py in ${pyvers}; do
  echo "-=-=-=-=-=-=-=- running tests for ${py} -=-=-=-=-=-=-=-=-"
  printf '$ %s\n' "${py} -m pytest -k \"${PYTEST_MATCH}\" tests"
  ${py} -m pytest -k "${PYTEST_MATCH}" tests
done
