-
Notifications
You must be signed in to change notification settings - Fork 860
samples: zephyr: hello-world: Fix twister load yaml #2589
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
In the sample.yaml file the 'platforms' key was not defined in the
schema. This causes an error when try to run twister.
$ west twister -T ../bootloader/mcuboot
INFO - Using Ninja..
INFO - Zephyr version: v4.3.0-2765-g5a58989daddd
INFO - Using 'zephyr' toolchain.
ERROR - /workspace/zephyr/bootloader/mcuboot/samples/zephyr/hello-world: can't load (skipping): SchemaError(msg='Schema validation failed:
- Key 'platforms' was not defined. Path: '/sample'.
- Value '[{'test': {'build_only': True, 'tags': 'samples tests', 'min_ram': 16}}]' is not a dict. Value path: '/tests'.')
This patch remove the 'platforms' invalid entry.
Signed-off-by: Gerson Fernando Budke <gerson.budke@ossystems.com.br>
In the current sample.yaml file definition the '- test' key is invalid
in the schema. It causes the twister to fail when try to load the spec.
$ west twister -T ../bootloader/mcuboot
INFO - Using Ninja..
INFO - Zephyr version: v4.3.0-2765-g5a58989daddd
INFO - Using 'zephyr' toolchain.
ERROR - /workspace/zephyr/bootloader/mcuboot/samples/zephyr/hello-world: can't load (skipping): SchemaError(msg='Schema validation failed:
- Value '[{'test': {'build_only': True, 'tags': 'samples tests', 'min_ram': 16}}]' is not a dict. Value path: '/tests'.')
This rename 'test' key to 'mcuboot.samples.zephyr.hello_world.sysbuild'
to avoid name collision and fix the schema validation. In addition, it
fixes the code identation respection 2 spaces.
Signed-off-by: Gerson Fernando Budke <gerson.budke@ossystems.com.br>
Formate the 'tags' key value from a scalar value to a sequence value. Signed-off-by: Gerson Fernando Budke <gerson.budke@ossystems.com.br>
|
Actually might just remove this sample entirely, it's been broken for ages and there already is one in zephyr https://github.com/zephyrproject-rtos/zephyr/tree/main/samples/sysbuild/with_mcuboot with better support so is superfluous |
|
Hi @utzig ,
I don't mind to open a PR to remove the sample/zephyr if nobody is using. |
|
Fixes 2 issues related to twister. When trying to run it in the folder twister can not load the yaml data due to invalid schema attributes.
This patch fixes those issues and allow twister to run.