From ed230f59952be72de39e056c194fb74f7cf38006 Mon Sep 17 00:00:00 2001 From: Major Hayden Date: Wed, 21 Apr 2021 19:31:07 +0000 Subject: [PATCH] Add %check section to RPM spec Allow unit tests to run during RPM builds. Fedora 34/33 have botocore 1.19, but some of the new EMR-related actions in aws-cli require botocore 1.20+. By skipping those unit tests, we can run the vast majority of the other tests without issues. --- awscli.spec | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/awscli.spec b/awscli.spec index 02547f6..b737da4 100644 --- a/awscli.spec +++ b/awscli.spec @@ -8,8 +8,15 @@ URL: https://aws.amazon.com/cli/ Source0: %{pypi_source} BuildArch: noarch +BuildRequires: python3-colorama BuildRequires: python3-devel +BuildRequires: python3-docutils +BuildRequires: python3-mock +BuildRequires: python3-nose +BuildRequires: python3-rsa +BuildRequires: python3-s3transfer BuildRequires: python3-setuptools +BuildRequires: python-unversioned-command Recommends: groff Requires: python3-docutils Requires: python3-colorama @@ -54,6 +61,13 @@ install -Dpm0644 bin/aws_bash_completer \ install -Dpm0644 bin/aws_zsh_completer.sh \ %{buildroot}%{_datadir}/zsh/site-functions/_awscli +%check +# Botocore in Fedora is still 1.19.x but the EMR-related tests need a newer +# botocore version. +nosetests-%{python3_version} \ + --exclude=test_instance_fleets_with_on_demand_master_only \ + tests/unit + %files %doc README.rst %license LICENSE.txt