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

Convert the tests from test components to component-specific test apps (IEC-11) #149

Closed
igrr opened this issue Feb 20, 2023 · 3 comments · Fixed by #381
Closed

Convert the tests from test components to component-specific test apps (IEC-11) #149

igrr opened this issue Feb 20, 2023 · 3 comments · Fixed by #381
Labels
enhancement New feature or request

Comments

@igrr
Copy link
Member

igrr commented Feb 20, 2023

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. — already done for the examples build
  • Convert the test_app into separate component test apps
  • 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.) — already done

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_symbol trick, to force linking all the test object files. — IDF v4.4 is EOL, so this is not an issue anymore.
@igrr igrr added the enhancement New feature or request label Feb 20, 2023
@tom-borcin tom-borcin changed the title Convert the tests from test components to component-specific test apps Convert the tests from test components to component-specific test apps Apr 21, 2023
@tom-borcin tom-borcin changed the title Convert the tests from test components to component-specific test apps Convert the tests from test components to component-specific test apps Apr 24, 2023
@github-actions github-actions bot changed the title Convert the tests from test components to component-specific test apps Convert the tests from test components to component-specific test apps (IEC-11) Apr 24, 2023
@lijunru-hub
Copy link

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?

@igrr
Copy link
Member Author

igrr commented Oct 27, 2023

@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.

@igrr
Copy link
Member Author

igrr commented Sep 18, 2024

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.

@igrr igrr mentioned this issue Sep 18, 2024
13 tasks
@igrr igrr linked a pull request Sep 21, 2024 that will close this issue
13 tasks
@igrr igrr closed this as completed in #381 Sep 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants