avocado-framework / avocado

Avocado is a set of tools and libraries to help with automated testing. One can call it a test framework with benefits. Native tests are written in Python and they follow the unittest pattern, but any executable can serve as a test.
https://avocado-framework.github.io/
Other
345 stars 343 forks source link

Mail Job Notification Plugin #5943

Closed harvey0100 closed 3 months ago

harvey0100 commented 6 months ago

Gmail Plugin for Avocado allows results to be sent to any email. The Origin email though at this time has to come from a google account due to using App Passwords.

PIP package has also been created

Signed off by: Harvey Lynden hlynden@redhat.com

harvey0100 commented 4 months ago

Hi @harvey0100 ,

There are a few bits missing to have this properly packaged as an RPM:

diff --git a/python-avocado.spec b/python-avocado.spec
index 4eae27dba..5f71e4f20 100644
--- a/python-avocado.spec
+++ b/python-avocado.spec
@@ -135,6 +135,9 @@ popd
 pushd optional_plugins/result_upload
 %py3_build
 popd
+pushd optional_plugins/mail
+%py3_build
+popd
 %if ! 0%{?rhel}
 pushd optional_plugins/spawner_remote
 %py3_build
@@ -175,6 +178,9 @@ popd
 pushd optional_plugins/result_upload
 %py3_install
 popd
+pushd optional_plugins/mail
+%py3_install
+popd
 %if ! 0%{?rhel}
 pushd optional_plugins/spawner_remote
 %py3_install
@@ -239,6 +245,7 @@ PATH=%{buildroot}%{_bindir}:%{buildroot}%{_libexecdir}/avocado:$PATH \
 %exclude %{python3_sitelib}/avocado_varianter_pict*
 %exclude %{python3_sitelib}/avocado_varianter_cit*
 %exclude %{python3_sitelib}/avocado_result_upload*
+%exclude %{python3_sitelib}/avocado_result_mail*
 %exclude %{python3_sitelib}/avocado_framework_plugin_result_html*
 %exclude %{python3_sitelib}/avocado_framework_plugin_resultsdb*
 %exclude %{python3_sitelib}/avocado_framework_plugin_varianter_yaml_to_mux*
@@ -247,6 +254,7 @@ PATH=%{buildroot}%{_bindir}:%{buildroot}%{_libexecdir}/avocado:$PATH \
 %exclude %{python3_sitelib}/avocado_framework_plugin_golang*
 %exclude %{python3_sitelib}/avocado_framework_plugin_ansible*
 %exclude %{python3_sitelib}/avocado_framework_plugin_result_upload*
+%exclude %{python3_sitelib}/avocado_framework_plugin_result_mail*
 %exclude %{python3_sitelib}/avocado_framework_plugin_spawner_remote*
 %exclude %{python3_sitelib}/tests*

Please include these changes and let's see what packit gives us.

Hi Cleber,

Thanks for the changes, I've implemented them and looks like the build is succeding! :)

harvey0100 commented 3 months ago

All changes have been applied that have been requested, request should be ready for merging.