idf-extra-components
idf-extra-components copied to clipboard
Convert the tests from test components to component-specific test apps (IEC-11)
Combining multiple test components into a single app doesn't scale well. For example, we already can't build the test_app for esp32s2, since the app doesn't fit into RAM. For this and other similar reasons, we have mostly migrated from test components to the component-specific test apps in IDF.
The task is to investigate how to do this in idf-extra-components, make the required changes to the tests and the CI workflow.
- Use https://github.com/espressif/idf-build-apps to create the build matrix and perform the builds.
- Only build and test the components which have changed in the PR, and components which had changes to their dependencies.
- Build and test the examples inside components as well. (A test app is very similar to an example, it just doesn't get uploaded to the registry along with the component.)
Potential problems:
- Converting from test components to test apps: until IDF v5.0, we didn't have the WHOLE_ARCHIVE feature in the build system, which makes creating test apps a bit harder. We could work around this by using the
-u some_symboltrick, to force linking all the test object files.
In CMake, I can't find the -U option. How can I achieve the functionality of WHOLE_ARCHIVE in IDF 4.4? Could you provide a CMake template for this?
@lijunru-hub In v4.4 you can do it as done here and here. Note that you need one such hook symbol per object file.
This is probably becoming more relevant, as the number of components in the repo has increased and we do a lot of unnecessary builds/tests when only one of the components gets updated.