#294 RFE: simplify `tests/tests.yml` for the cases the external fmf tests repo is used
Opened 5 years ago by praiskup. Modified 4 years ago

Seems like at least roles->tags and roles->standard-test-beakerlib->fmf_filter needs to be specified (tiers) to make everything work nicely.

My point is to minimize the size of tests/tests.yml so I can avoid touching that file once and forever. I should be able to specify everything in main.fmf in tests/<repo>.git/main.fmf, or?

Example:
https://src.fedoraproject.org/rpms/tar/blob/master/f/tests/tests.yml


@psss hi!
You know a lot about FMF.
Do you have any ideas on the topic?

@praiskup
Hi, thank you for the issue.

  1. Usage of FMF is optional. Beaker role does not require to use FMF.
  2. What do you mean under specify everything?

It is good to have an example. What functionality is missing?

STR - is a set of Ansible tasks.
You can write additional Ansible-tasks in tests/tests.yml.
It is easy add missing functionality in your tests/tests.yml.
It would be fine if you write missing steps in your tests/tests.yml.
I can take your playbook as example, and port tasks and make them as part of beakerlib role, so anyone could use them.

The minimal example included in the STR documentation is currently probably the shortest way how to enable tests from the external repository:

- hosts: localhost
  roles:
  - role: standard-test-beakerlib
    tags:
    - classic
    repositories:
    - repo: "https://src.fedoraproject.org/tests/shell.git"
      dest: "shell"
      fmf_filter: "tier: 1"

We are currently working on a draft for an extensible CI configuration which should provide more concise syntax for simple use cases. Here's my quick brainstorm of how your use case could look like:

/test/build:
    discover:
        tool: fmf
        filter: tier 1
        repo: https://src.fedoraproject.org/tests/tar.git
    execute:
        tool: restraint

Would something like this make sense to you? For now we just have a bunch of examples. But expect more in the near future.

On Monday, February 4, 2019 12:16:15 PM CET Andrei Stepanov wrote:

  1. Usage of FMF is optional. Beaker role does not require to use FMF.

Understood, so I'd expect in the worst case something like:

- hosts: localhost
  roles:
  - role: standard-test-beakerlib
    repositories:
    - repo: https://src.fedoraproject.org/tests/tar.git
      dest: tar
      type: fmf

.. ie I'm clearly saying the testsuite is external and is fmf. The
tooling should know that I am specifying tags in main.fmf.

  1. What do you mean under specify everything?

Well, for example the tags, filters, etc. I have a limited knowledge of
Fedora CI, or even fmf ... but according to $Summary, I'd like to have
only minimal "stub" tests.yml that clearly delegates all the CI work to
external tests/tar.git repo.

It is good to have an example. What functionality is missing?

I don't think I miss something ATM, I just feel that the tests.yml is
unnecessarily big.

Ideally, there could be a trivial and minimal example tests.yml template
that I could C&P to every package that is using the same approach
(external tests), without the need to adjust anything. Or even avoid
creating the tests.yml at all, somehow.

STR - is a set of Ansible tasks.
You can write additional Ansible-tasks in tests/tests.yml.
It is easy add missing functionality in your tests/tests.yml.
It would be fine if you write missing steps in your tests/tests.yml.

I'd like to remove some of the steps, not to add.

I can take your playbook as example, and port tasks and make them as part of
beakerlib role, so anyone could use them. ``

Agreed, this might be a way to minimize the stub, dunno?

@psss's proposal makes sense to me, too

Good. I've created a pull request with two simple examples:
https://pagure.io/fedora-ci/metadata/pull-request/6

I think there is currently no way how to simplify more the above-mentioned example. Going forward I believe the new L2 Metadata should be much more concise for simple cases. Here's my idea of a minimal example which assumes the default execute implementation is used:

/test/build:
    discover:
        how: fmf
        repo: https://src.fedoraproject.org/tests/tar.git

I guess @praiskup would be satisfied with something like this.

Login to comment on this ticket.

Metadata