mixing the progress with stdout is causing problems for tools trying to consume stdout:
[update.py]: feature EF: Running (arm-none-eabi-nm --demangle --print-size /home/autotest/build/tmp/binaries.build/ZeroOneX6_Air/bin/blimp) in (.) (ZeroOneX6_Air,Blimp) not in build_options.py
[update.py]: feature EF: Running (strings /home/autotest/build/tmp/binaries.build/ZeroOneX6_Air/bin/blimp) in (.) (ZeroOneX6_Air,Blimp) not in build_options.py
Create a base class for build scripts that provides common utilities extracted from size_compare_branches.py:
- run_program(): Execute commands with output handling
- run_waf(): Run waf with consistent build environment
- run_git(): Run git commands
- find_current_git_branch_or_sha1(): Get current branch/SHA
- find_git_branch_merge_base(): Find merge base
Refactor size_compare_branches.py to use the base class, reducing duplicated code.
Other scripts with similar patterns can be refactored in the future:
- build_binaries.py
- build_bootloaders.py
- build_iofirmware.py
- build_peripherals.py
- configure_all.py