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

tests: zms: allow to build & run on real platforms #86363

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

butok
Copy link
Contributor

@butok butok commented Feb 26, 2025

  • Allows to build and run ZMS tests on real platforms.
  • Enables ZMS tests designed for a flash-simulator only when built for qemu_x86 or native_sim targets.

- Allows to build and run ZMS tests on real platforms.
- Enables ZMS tests designed for a flash-simulator only when
  built for qemu_x86 or native_sim targets.

Signed-off-by: Andrej Butok <[email protected]>
Comment on lines +7 to +14
#if defined(CONFIG_BOARD_QEMU_X86) || defined(CONFIG_ARCH_POSIX)
/*
* This test is designed to be run using flash-simulator which provide
* Enable tests designed to be run using flash-simulator which provide
* functionality for flash property customization and emulating errors in
* flash operation in parallel to regular flash API.
* Test should be run on qemu_x86 or native_sim target.
*/

#if !defined(CONFIG_BOARD_QEMU_X86) && !defined(CONFIG_ARCH_POSIX)
#error "Run only on qemu_x86 or a posix architecture based target (for ex. native_sim)"
#define TEST_ZMS_SIMULATOR
Copy link
Collaborator

Choose a reason for hiding this comment

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

Would it be possible to make this via this test specific Kconfig, making the TEST_ZMS_SIMULATOR as Kconfig that would default to true if CONFIG_BOARD_QEMU_X86 or CONFIG_ARCH_POSIX?
This way it should be possible to set the Kconfig TEST_ZMS_SIMULATOR via proj.conf or sample.yaml/test.yaml.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Would it be possible to make this via this test specific Kconfig, making the TEST_ZMS_SIMULATOR as Kconfig that would default to true if CONFIG_BOARD_QEMU_X86 or CONFIG_ARCH_POSIX? This way it should be possible to set the Kconfig TEST_ZMS_SIMULATOR via proj.conf or sample.yaml/test.yaml.

OK, I will do it.

@Laczen Laczen removed their request for review February 26, 2025 15:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants