-
Notifications
You must be signed in to change notification settings - Fork 123
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
Include an example template for creating tmt
tests
#2754
base: main
Are you sure you want to change the base?
Conversation
Related to the discussion in #2744. |
Vast majority of tests verifying the `tmt` features shares a similar outline of the `beakerlib` skeleton. Let's make it super easy to start writing a new `tmt` test. The skeleton also covers submitting `log.txt` when something goes wrong during the test execution so that a detailed investigation is possible later.
This is about how to expand PS: with beakerlib+homebrew, we might want to rethink how to source |
Could you explain a bit? |
examples/template/main.fmf
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
framework: beakerlib
is missing
================================================================== | ||
|
||
When creating a new ``tmt`` test it is recommended to use the test | ||
template provided in this directory. In order to be able to use it |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about a link to https://tmt.readthedocs.io/en/stable/guide.html#custom-templates ?
Otherwise it is confusing why files are linked as .j2 to some directory which might not yet exist.
The issue is about: source /usr/share/beakerlib/beakerlib.sh This can't be the install path for beakerlib on homebrew also because on macos and linuxbrew they are different. It needs to be editable, most likely through |
ln -sr test.sh ~/.config/tmt/templates/script/tmt.j2 | ||
ln -sr main.fmf ~/.config/tmt/templates/test/tmt.j2 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is using the user-configuration (thought it was still a draft), but for these templates it would make more sense to be on the project
level since each project might have slightly different beakerlib
scripts. That doesn't seem to be in the spec/stories, and I'm not sure where a project's template files would reside. The only place I can think of would be path/to/fmf_root/.fmf/templates/
Vast majority of tests verifying the
tmt
features shares a similar outline of thebeakerlib
skeleton. Let's make it super easy to start writing a newtmt
test. The skeleton also covers submittinglog.txt
when something goes wrong during the test execution so that a detailed investigation is possible later.Pull Request Checklist