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

twister: Refactor 'recording' feature and enable it for Ztest and Pytest #72593

Merged

Conversation

golowanow
Copy link
Member

@golowanow golowanow commented May 10, 2024

Refactor Twister recording feature moving it from Handler class to TestInstance class and enable for other Harness child
classes other than Console, e.g. Ztest.

Extend Pytest Harness to support recording feature to parse test log by a regular expression and collect as records the same
way as Console Harness does.

@golowanow golowanow marked this pull request as ready for review May 10, 2024 17:47
@zephyrbot zephyrbot added the area: Twister Twister label May 10, 2024
@golowanow golowanow added the Enhancement Changes/Updates/Additions to existing features label May 10, 2024
self.recording.extend(recording)

filename = os.path.join(self.build_dir, "recording.csv")
with open(filename, "at") as csvfile:
Copy link
Collaborator

Choose a reason for hiding this comment

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

why not just use 'w' mode, if I run the same case multiply times, the output will be confused

Copy link
Member Author

Choose a reason for hiding this comment

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

ok

Refactor Twister 'recording' feature moving it from Handler class
to TestInstance class and enable it also for other Harness child
classes other than Console.

Signed-off-by: Dmitrii Golovanov <dmitrii.golovanov@intel.com>
Extend Pytest Harness to support 'recording' feature to parse
test log by a regular expression and collect as records the same
way as Console Harness do.

Signed-off-by: Dmitrii Golovanov <dmitrii.golovanov@intel.com>
@golowanow golowanow force-pushed the twister_pytest_recording_20240510 branch from 935240c to 1b818d1 Compare May 11, 2024 07:19
@golowanow golowanow requested a review from hakehuang May 11, 2024 07:20
@nashif nashif merged commit 11de74c into zephyrproject-rtos:main May 14, 2024
27 checks passed
@golowanow golowanow deleted the twister_pytest_recording_20240510 branch May 17, 2024 06:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: Twister Twister Enhancement Changes/Updates/Additions to existing features
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants