#!/bin/sh

set -e -u -x

cp -r tests "$AUTOPKGTEST_TMP"
# Copy pyproject.toml because is used by the test_check_valid test.
cp pyproject.toml "$AUTOPKGTEST_TMP" 
cd "$AUTOPKGTEST_TMP"

for py in $(py3versions -s); do
    $py -m pytest --ignore=tests/console/commands/env/test_list.py --ignore=tests/console/commands/env/test_remove.py --ignore=tests/console/commands/env/test_use.py --ignore=tests/utils/test_env.py -k 'not test_self_update_should_install_all_necessary_elements and not test_add_file_constraint_sdist and not test_add_file_constraint_sdist_old_installer and not test_publish_dry_run and not test_info_from_sdist and not test_installer_can_install_dependencies_from_forced_source and not test_search_for_file_sdist and not test_search_for_file_sdist_with_extras and not test_solver_can_resolve_sdist_dependencies and not test_solver_can_resolve_sdist_dependencies_with_extras and not test_solver_chooses_from_correct_repository_if_forced and not test_solver_chooses_from_correct_repository_if_forced_and_transitive_dependency and not test_solver_does_not_choose_from_secondary_repository_by_default and not test_solver_chooses_from_secondary_if_explicit and not test_get_package_information_fallback_read_setup and not test_get_package_information_skips_dependencies_with_invalid_constraints and not test_get_package_retrieves_packages_with_no_hashes and not test_fallback_can_read_setup_to_get_dependencies and not test_exporter_can_export_requirements_txt_with_file_packages and not test_exporter_can_export_requirements_txt_with_file_packages_and_markers and not test_lock_no_update and not test_locker_dumps_dependency_information_correctly' -v 2>&1
done
