forked from project-chip/connectedhomeip
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Unified build script: dry run and unit test (project-chip#8295)
* 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
- Loading branch information
Showing
17 changed files
with
339 additions
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
# Copyright (c) 2021 Project CHIP Authors | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
import("//build_overrides/build.gni") | ||
import("//build_overrides/chip.gni") | ||
|
||
import("//build_overrides/pigweed.gni") | ||
import("$dir_pw_build/python.gni") | ||
|
||
pw_python_package("build_examples") { | ||
setup = [ "setup.py" ] | ||
inputs = [ | ||
# Dependency for the unit test | ||
"expected_all_platform_commands.txt", | ||
] | ||
|
||
sources = [ | ||
"build/__init__.py", | ||
"build/factory.py", | ||
"build/targets.py", | ||
"build_examples.py", | ||
"builders/__init__.py", | ||
"builders/builder.py", | ||
"builders/efr32.py", | ||
"builders/esp32.py", | ||
"builders/linux.py", | ||
"builders/qpg.py", | ||
"runner/__init__.py", | ||
"runner/printonly.py", | ||
"runner/shell.py", | ||
] | ||
tests = [ "test.py" ] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.