Notification time stamped 2022-09-30 21:08:43 UTC
From 78dcf4c992c5c3189675c7f579864c9140cf5898 Mon Sep 17 00:00:00 2001 From: Maxwell G gotmax@e.email Date: Sep 26 2022 04:07:27 +0000 Subject: Outsource %ansible_test_unit logic to helper script
We want %ansible_test_unit to retrieve the collection name{,space} from galaxy.yml. This removes the need for the %collection_name{,space} macros and utilizes ansible_collection.py's more robust approach to running the tests.
---
diff --git a/macros.ansible b/macros.ansible index 856688e..0c81432 100644 --- a/macros.ansible +++ b/macros.ansible @@ -13,12 +13,10 @@ --filelist %{ansible_collection_filelist} }
+%ansible_test_unit() %{shrink: +%{_rpmconfigdir}/ansible_collection.py test -- +--python-interpreter %{__python3} --local %{?*} +}
-%ansible_test_unit() %{expand:\\ -mkdir -p ../ansible_collections/%{collection_namespace} -cp -a $(pwd) ../ansible_collections/%{collection_namespace}/%{collection_name} -pushd ../ansible_collections/%{collection_namespace}/%{collection_name} -ansible-test units --python-interpreter %{__python3} --local %{?*} -popd}
%ansible_collection_files %{_datadir}/ansible/collections/ansible_collections/%{collection_namespace}/
https://src.fedoraproject.org/rpms/ansible-packaging/c/78dcf4c992c5c3189675c...
scm-commits@lists.fedoraproject.org