Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FR] specify ref as "a branch I am on" #3232

Open
befeleme opened this issue Sep 23, 2024 · 1 comment
Open

[FR] specify ref as "a branch I am on" #3232

befeleme opened this issue Sep 23, 2024 · 1 comment

Comments

@befeleme
Copy link

I want to run tmt tests on a component python-sphinx-theme-alabaster for c10s branch of the centos stream dist git repository.
The tests are stored in another component - python-sphinx. I can use url: in the discover step to pull them. This doesn't work yet, because the default branch is used (in my case: c9s).
I want to set the branch to the correct one. I can use ref: for that and specify the value to c10s. That works.
When c11s is created, I will have to manually change all the files. When I want to run the tests in different Fedoras, I'll have to manually specify the branches. I would like to have it possible to define ref as "a value of the branch I am currently on", so if I open a PR to c10s, tmt will look for the corresponding value in a remote repository.

The docs say:

Additionally, one can set ref dynamically. This is possible using a special file in tmt format stored in the default branch of a tests repository.
This special file should contain rules assigning attribute ref in an adjust block, for example depending on a test run context.

The thing is, I don't really want to rely on the "default" branch, because that one can be switched to a different one in time.

Does there exist a solution for this? Would you be willing to add one?

@hroncok
Copy link
Contributor

hroncok commented Sep 23, 2024

Note that Fedora and CentOS have different dist-git URLs, so this won't allow us to fork the tests from Fedora without adjustments, but at least the tests would fail (searching for c10s in Fedora distgit) instead of running something bad.

Ideally, if this is solved, the next step would be to be able to set url to something like {distgit pkgname}.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants