mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
feat(tools): Do not run test_create_project_with_idf_readonly on macOS
It corrupts environment on macOS runner because it uses shell, not docker-executor, and makes all tree read-only for a non-root user. + Replace examples with real files in example README.md
This commit is contained in:
parent
8ad3c8ca1f
commit
b39e541652
@ -82,19 +82,10 @@ This way the common options do not need to be repeated in each of `sdkconfig.pro
|
||||
|
||||
### Create configuration profile files via @filename
|
||||
|
||||
You can further enhance your build process by using configuration profile files. These profile files contain arguments that streamline the build process for specific scenarios. For example, let's have the following profile files:
|
||||
You can further enhance your build process by using configuration profile files. These profile files contain arguments that streamline the build process for specific scenarios. Let's have our example profile files:
|
||||
|
||||
`profiles/prod`:
|
||||
|
||||
```bash
|
||||
-B build-production -DSDKCONFIG=build-production/sdkconfig -DSDKCONFIG_DEFAULTS="sdkconfig.defaults;sdkconfig.prod"
|
||||
```
|
||||
|
||||
`profiles/debug`:
|
||||
|
||||
```bash
|
||||
-B build-debug -DSDKCONFIG=build-debug/sdkconfig -DSDKCONFIG_DEFAULTS="sdkconfig.defaults;sdkconfig.debug"
|
||||
```
|
||||
- [profiles/prod](profiles/prod)
|
||||
- [profiles/debug](profiles/debug)
|
||||
|
||||
You can use these profile files to quickly set up the build environment with specific configurations.
|
||||
|
||||
@ -105,15 +96,8 @@ This approach simplifies the process of specifying complex command-line argument
|
||||
|
||||
Moreover, you can combine arguments from a profile file with additional command line arguments. Anywhere on the idf.py command line, you can specify a file as @filename.txt to read one or more arguments from the text file. Arguments in the file can be separated by newlines or spaces and are expanded exactly as if they had appeared in that order on the idf.py command line.
|
||||
|
||||
For example, you can create a file named custom_flash.txt:
|
||||
For example using [cutom_flash.txt](custom_flash.txt), you can expand the command: `idf.py -B build_production @custom_flash.txt monitor`
|
||||
|
||||
`custom_flash.txt`:
|
||||
|
||||
```bash
|
||||
-p PORT flash
|
||||
```
|
||||
|
||||
Then, you can expand the command: `idf.py -B build_production @filename.txt monitor`
|
||||
### Generated `sdkconfig` file
|
||||
|
||||
In this example, `sdkconfig` file is placed into the build directory, instead of the project root directory as it is done by default. This allows development and production builds to exist side by side. The location of `sdkconfig` file is set using `SDKCONFIG` variable in [project CMakeLists.txt](CMakeLists.txt) file.
|
||||
|
@ -0,0 +1 @@
|
||||
-p PORT flash
|
1
examples/build_system/cmake/multi_config/profiles/debug
Normal file
1
examples/build_system/cmake/multi_config/profiles/debug
Normal file
@ -0,0 +1 @@
|
||||
-B build-debug -DSDKCONFIG=build-debug/sdkconfig -DSDKCONFIG_DEFAULTS="sdkconfig.defaults;sdkconfig.debug"
|
1
examples/build_system/cmake/multi_config/profiles/prod
Normal file
1
examples/build_system/cmake/multi_config/profiles/prod
Normal file
@ -0,0 +1 @@
|
||||
-B build-production -DSDKCONFIG=build-production/sdkconfig -DSDKCONFIG_DEFAULTS="sdkconfig.defaults;sdkconfig.prod"
|
@ -237,6 +237,7 @@ def test_create_project(idf_py: IdfPyFunc, idf_copy: Path) -> None:
|
||||
assert ret.returncode == 4, 'Command create-project exit value is wrong.'
|
||||
|
||||
|
||||
@pytest.mark.skipif(sys.platform == 'darwin', reason='macos runner is a shell executor, it would break the file system')
|
||||
def test_create_project_with_idf_readonly(idf_copy: Path) -> None:
|
||||
def change_to_readonly(src: Path) -> None:
|
||||
for root, dirs, files in os.walk(src):
|
||||
|
Loading…
Reference in New Issue
Block a user