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

scripts: tests: twister_blackbox: Add test test_verbose.py #67864

Merged
merged 1 commit into from
Mar 12, 2024

Conversation

pkunieck
Copy link
Contributor

Add new test to twister blackbox tests

@pkunieck pkunieck force-pushed the blackbox_tests_verbose branch 2 times, most recently from 5e416ba to 61ea687 Compare February 1, 2024 00:26
Copy link
Collaborator

@LukaszMrugala LukaszMrugala left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes needed are pretty small.

scripts/tests/twister_blackbox/test_verbose.py Outdated Show resolved Hide resolved
scripts/tests/twister_blackbox/test_verbose.py Outdated Show resolved Hide resolved
scripts/tests/twister_blackbox/test_verbose.py Outdated Show resolved Hide resolved
scripts/tests/twister_blackbox/test_verbose.py Outdated Show resolved Hide resolved
scripts/tests/twister_blackbox/test_verbose.py Outdated Show resolved Hide resolved
scripts/tests/twister_blackbox/test_verbose.py Outdated Show resolved Hide resolved
scripts/tests/twister_blackbox/test_verbose.py Outdated Show resolved Hide resolved
scripts/tests/twister_blackbox/test_verbose.py Outdated Show resolved Hide resolved
@pkunieck pkunieck force-pushed the blackbox_tests_verbose branch 3 times, most recently from d9447af to e7f1ebf Compare February 7, 2024 21:43
LukaszMrugala
LukaszMrugala previously approved these changes Feb 9, 2024
@LukaszMrugala LukaszMrugala marked this pull request as ready for review February 9, 2024 15:19
@zephyrbot zephyrbot added the area: Twister Twister label Feb 9, 2024
pytest.raises(SystemExit) as sys_exit:
self.loader.exec_module(self.twister_module)

info_regex = r'INFO\s+-\s+(\d+/\d+)\s+(\S+)\s+(\S+)\s+(\S+)\s+\((\w+)\s+([\d.]+)s\)'
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what this line searching for?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sample searched-for line when using the -v flag:
INFO - 241/482 qemu_cortex_r5 tests/posix/common/portability.posix.common.static_stack PASSED (qemu 6.284s)

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

in this case, we do not need such complex regex, I would recommand to have.
columns = line.split() if len(columns) == 6: print("The string has 6 columns.") else: print("The string does not have 6 columns.")
and check each column with regex for content

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I changed regex to work with that logic, is it correct?

KamilxPaszkiet
KamilxPaszkiet previously approved these changes Feb 26, 2024
Copy link
Collaborator

@KamilxPaszkiet KamilxPaszkiet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

move the code to test_output.py

Add new test to twister blackbox tests

Signed-off-by: Patryk Kuniecki <[email protected]>
@pkunieck pkunieck force-pushed the blackbox_tests_verbose branch from 1b13d6e to 2c2e480 Compare March 11, 2024 11:18
@pkunieck
Copy link
Contributor Author

move the code to test_output.py

Moved

@dleach02 dleach02 merged commit a10b842 into zephyrproject-rtos:main Mar 12, 2024
26 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants