mirror of
https://github.com/espressif/esp-idf.git
synced 2025-09-24 17:27:21 +00:00
feat(tools): Add idf.py merge-bin command and cmake target
This commit is contained in:
@@ -252,7 +252,7 @@ def test_create_project_with_idf_readonly(idf_copy: Path) -> None:
|
||||
for name in files:
|
||||
path = os.path.join(root, name)
|
||||
if '/bin/' in path:
|
||||
continue # skip excutables
|
||||
continue # skip executables
|
||||
os.chmod(os.path.join(root, name), 0o444) # readonly
|
||||
logging.info('Check that command for creating new project will success if the IDF itself is readonly.')
|
||||
change_to_readonly(idf_copy)
|
||||
@@ -308,3 +308,13 @@ def test_save_defconfig_check(idf_py: IdfPyFunc, test_app_copy: Path) -> None:
|
||||
'Missing CONFIG_IDF_TARGET="esp32c3" in sdkconfig.defaults'
|
||||
assert file_contains(test_app_copy / 'sdkconfig.defaults', 'CONFIG_PARTITION_TABLE_OFFSET=0x8001'), \
|
||||
'Missing CONFIG_PARTITION_TABLE_OFFSET=0x8001 in sdkconfig.defaults'
|
||||
|
||||
|
||||
def test_merge_bin_cmd(idf_py: IdfPyFunc, test_app_copy: Path) -> None:
|
||||
logging.info('Test if merge-bin command works correctly')
|
||||
idf_py('merge-bin')
|
||||
assert (test_app_copy / 'build' / 'merged-binary.bin').is_file()
|
||||
idf_py('merge-bin', '--output', 'merged-binary-2.bin')
|
||||
assert (test_app_copy / 'build' / 'merged-binary-2.bin').is_file()
|
||||
idf_py('merge-bin', '--format', 'hex')
|
||||
assert (test_app_copy / 'build' / 'merged-binary.hex').is_file()
|
||||
|
Reference in New Issue
Block a user