-
Notifications
You must be signed in to change notification settings - Fork 36
PoC of running granular tests inside #1447
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
base: main
Are you sure you want to change the base?
Conversation
@click.option('--delimiter', default="-", help='create tmt test strucure based on delimiter') | ||
@click.option('--kstestdir', default=".", help='position where are located additional functions for rhinstaller tests') | ||
def main(path, extension, metadata, delimiter, kstestdir): | ||
file_list = list_files(path, "*." + extension) |
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.
Only the executable .sh files are tests (the directory structure is in shameful state, we have a jira ticket to move tests to a separate directory).
Example of identifying test files when generating permian test cases:
for filename in os.listdir(kstests_dir): |
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.
Ah, yes, would be better to organize it, but is is not big deal for me right now. yep I'm not checking executable bit. but probably executable bit should not be major factor, as it is passed through container, so we should avoid to use executable bits for tests as possible I think.
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.
Yes, we should fix that but until that I think you should check it when identifying the tests, so that for example post-lib-keyboard.sh
(which is a library included in tests) does not get into the main.fmf.
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.
Only the executable .sh files are tests (the directory structure is in shameful state, we have a jira ticket to move tests to a separate directory).
For the reference: https://issues.redhat.com/browse/INSTALLER-3259
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.
okay, I'll check for executable bit, to avoid using libraries.
/tests: | ||
/anabot: | ||
/1: | ||
/x: |
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.
Just out of curiosity - why all those slashes (on all levels)?
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.
these slashes creates FMF file structures https://fmf.readthedocs.io/en/stable/features.html#hierarchy , as this is equvalent to creating dir structure to do same thing as well.
plans/granular.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.
I wonder about the hardcoded values (guest, boot.iso URL) - those are just some temporary ones used during the development, right?
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.
Right this is more less implementation detail for development right now.
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.
As discussed internally with rvykydal, we'd like to retain the definitions (TESTTYPE, test enabled/disabled) within the test scripts as the source of truth. Is my understanding correct that it will remain this way and this extractor script is merely a helper tool to translate the metadata into a form that used by TMT?
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.
Exactly, this tool just extract the data from tests and construct FMF/TMT metadata. with extracted data. (in production I can imagine it will be also git commit/push hook to have it up to date)
9c1f4f8
to
944dad9
Compare
/test-os-variants |
@jscotka can you please rebase the PR on current main so that we can run ci (required because of recent changes) |
ad46b73
to
1997a28
Compare
/test-tmt |
/test-os-variants --testtype smoke |
Test metadata convertor from tests to TMT format
Run each test separately via TMT
python3 scripts/tmt_test_metadata_extractor.py
tmt -vvd run plan --name granular