-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Unified build script: dry run and unit test #8295
Unified build script: dry run and unit test #8295
Conversation
…forms/boards/apps as a start to have a single build entrypoint
…hey get picked up by the bootstrap script
It turns out that ESP32 lock app is ONLY for devkitc, so I added application matching logic to include board restrictions. Tested: lock app compiles and only for devkitc if esp32 platform is used.
…s commands as expected
Converted to draft until #8221 is merged, since otherwise the diff is too large and inconvenient to review. For reviewers: feel free to review now or wait. Sorry for the large delta. |
…as also to be considered for testing
this is only for linux. Should be moved to 'HOST' as a platformconnectedhomeip/scripts/build/build/__init__.py Lines 56 to 66 in f864715
This comment was generated by todo based on a
|
Size increase report for "esp32-example-build" from e922686
Full report output
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't agree with writing this amount of test logic in GN actions.
Tests should be self contained, and feasible to run the tests by themselves, without needing GN to generate a complex set of command lines.
Defining the entire module as inputs to the test also seems wrong, and probably caused by not defining a package. Can we set up a proper package please?
Updated to use pw_python_package. I feel a bit awkward adding a .txt as a source for that, however I could not find a way for additional deps (especially for tests) and writing the text file into the test itself seemed wrong. Let me know if this needs changes. |
* Imported a general chip builder script, currently covering a few platforms/boards/apps as a start to have a single build entrypoint * Move build requirements into global script/requirements.txt so that they get picked up by the bootstrap script * Update script to assume and require bootstrapping * Code review comments * Support building the lock app for ESP32 It turns out that ESP32 lock app is ONLY for devkitc, so I added application matching logic to include board restrictions. Tested: lock app compiles and only for devkitc if esp32 platform is used. * Remove obsolete todo * Fix the duplicated accept for efr32 lock app * Add a dry run option for the build runner, showing what commands would be executed * Add support for a "test" to validate that the build generator executes commands as expected * Update the command comparison: output directory of the build script has also to be considered for testing * Fix some naming and use `get_target_outputs` * Address some code review comments * Rename chipbuild to build_examples * Fixup naming for the unit tests after build script renaming * Fix names * Restyle * Use difflib instead of diff binary for checking changes * Fix diffs (generator vs lines) and logging * Start converting python logic from build into pw_python_module * Tests pass * Restyle * Code review comments * Add comment for all_platform_commands.txt * Move expected txt data into inputs
Problem
The execution of #8221 is opaque and not tested (except if acutally run).
Would be nice to:
a) show what manual commands could be run to build CHIP (e.g. for build environments where python is not an option or to test things manually
b) unit test that the build script can run and execute things correctly
Change overview
Builds upon #8221 to add:
Testing
Unit test created, also manually ran the build.