From 226937454736e6683e36f9f3689b732a4734e7d5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Fri, 8 Oct 2021 18:00:59 +0200 Subject: [PATCH] Add basic smoke tests of packaging Cherry-picked from c9s, adjusted to the STI tests layout. --- tests/smoke/runtest.sh | 13 +++++++++++++ tests/tests.yml | 4 ++++ 2 files changed, 17 insertions(+) create mode 100755 tests/smoke/runtest.sh diff --git a/tests/smoke/runtest.sh b/tests/smoke/runtest.sh new file mode 100755 index 0000000..b4e9596 --- /dev/null +++ b/tests/smoke/runtest.sh @@ -0,0 +1,13 @@ +#!/bin/bash +set -eux + +# Currently there is no easy way to see the versions of installed packages. +# Let's list them to make sure we're testing against the correct package set. +rpm -qa | sort +python3 -c 'import packaging' +python3 -c 'from packaging import version; version.Version("2.5.1rc2")' +python3 -c 'from packaging import specifiers; specifiers.SpecifierSet("~=1.0")' +python3 -c 'from packaging import markers; markers.Marker("python_version>'"'"'2'"'"'")' +python3 -c 'from packaging import requirements; requirements.Requirement('"'"'name[foo]>=2,<3; python_version>"2.0"'"'"')' +python3 -c 'from packaging import tags; tags.Tag("py39", "none", "any")' +python3 -c 'from packaging.utils import canonicalize_name; canonicalize_name("Django_foobar")' \ No newline at end of file diff --git a/tests/tests.yml b/tests/tests.yml index c89a956..1aae5a1 100644 --- a/tests/tests.yml +++ b/tests/tests.yml @@ -25,9 +25,13 @@ - rpm_generators_unit_tests: dir: python-rpm-generators run: ./tests/download_data_and_run_pytest.sh + - smoke: + dir: . + run: ./smoke/runtest.sh required_packages: - fedpkg-minimal - mock + - python3-packaging - python3-pip - python3-pytest - python3-pyyaml