From 874b2a197ce2c45e2f263f7ac86a28ab96e37940 Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Tue, 3 Jun 2025 09:07:34 +0000 Subject: [PATCH] docs: Add example for sharing tests across repositories This commit adds a new subsection to `examples.rst` explaining how to share tests across different repositories using tmt. --- docs/examples.rst | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/docs/examples.rst b/docs/examples.rst index 2d896490a0..4fa716d821 100644 --- a/docs/examples.rst +++ b/docs/examples.rst @@ -537,6 +537,30 @@ the :ref:`/spec/plans/discover` step: url: https://src.fedoraproject.org/rpms/tmt/ +Share Tests Across Repositories +------------------------------------------------------------------ + +Another way to efficiently manage tests is by sharing them across repositories. +This can be achieved by referencing the repository containing shared tests +within the ``discover`` step of a plan. TMT will then fetch the tests from the +specified URL and make them available for execution alongside project-specific +tests. This promotes reusability and reduces duplication of common test cases. + +.. code-block:: yaml + + discover: + - name: shared-tests + how: fmf + url: https://example.com/path/to/shared-tests.git + # Optionally, specify a branch or tag + # ref: main + - name: project-specific-tests + how: fmf + # Assuming tests are in the current repository + # url: . + # filter: ... + + Extend Steps ------------------------------------------------------------------