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

llext: actual test rework #67906

Merged
merged 3 commits into from
Jan 24, 2024

Conversation

pillo79
Copy link
Collaborator

@pillo79 pillo79 commented Jan 22, 2024

This is a continuation of #67431 containing the llext-test-related commits that were already reviewed during that discussion. With this PR the tests/llext subdir can have multiple independent tests with minimal duplication.

Make it so LLEXT_TEST_HELLO is enabled by default, and it is actually
compiled only when the config is enabled.

The check for MODULES==y and LLEXT_TEST_HELLO!=m is redundant, as the
Twister machinery already causes an error when Kconfig flags specified
in the YAML file are coerced to different values.

Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
This patch reworks the YAML files for the llext samples and tests to
share a common restriction list. Also, using an arch-specific config
to disable the MPU for the ARM architecture only, there is no need
to duplicate the test cases per architecture.

Use this to enable the "writable" test case for the ARM architecture
and separate the "modules_enabled" case to test building as a module.

Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
In preparation for multiple tests, move the current hello_world test
to its own subdirectory. Also, merge the llext compilation in the
parent CMakeLists.txt.

Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
Copy link
Collaborator

@marc-hb marc-hb left a comment

Choose a reason for hiding this comment

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

CMake changes and renames look good.

The twister config changes too but I don't know enough about Twister.

Copy link
Collaborator

@teburd teburd left a comment

Choose a reason for hiding this comment

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

I'm ok with this, though the test name being simple is probably more relevant as I planned on expanding it with various simple modules, not that you would've known that!


set(HELLO_WORLD_LLEXT ${llext_bin_file} PARENT_SCOPE)
add_llext_target(hello_world
Copy link
Collaborator

Choose a reason for hiding this comment

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

this is quite nice not having to write a custom cmake file now for this

@carlescufi carlescufi merged commit 938d354 into zephyrproject-rtos:main Jan 24, 2024
26 checks passed
@pillo79 pillo79 deleted the llext-actual-test-rework branch June 4, 2024 14:36
@henrikbrixandersen henrikbrixandersen added the area: llext Linkable Loadable Extensions label Jul 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: llext Linkable Loadable Extensions area: Samples Samples
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants