Add tests to cover:
- Detection of config_hash changes in existing build_info.json
- Detection of esphome_version changes in existing build_info.json
- Handling of invalid/corrupted build_info.json files
These tests cover the exception handling and change detection logic
in copy_src_tree() that checks the existing build_info.json.
Use YYYY-MM-DD HH:MM:SS +ZZZZ format instead of the locale-dependent
'%b %d %Y, %H:%M:%S' format. This provides:
- Unambiguous date format (YYYY-MM-DD)
- Timezone information
- Locale-independent formatting
- Better sortability and parseability
Example: "2025-12-15 16:30:27 +0000" instead of "Dec 15 2025, 16:30:27"
Tests validate the format using strptime with '%Y-%m-%d %H:%M:%S %z'.
I think we need to put a little more thought into whether we really
want the build time in each of these, or whether it should be just
the config_hash (perhaps extended with version, and in some cases
the component's own serial number or other identifier).
So put the old compilation_time_ and its access methods back, so
this PR only adds the *new* fields. We can migrate users over and
then remove the compilation_time_ separately.
- Remove all USE_ARDUINO conditionals from core.cpp
- Add weak initArduino() stub that gets overridden when Arduino is present
- Call initArduino() in app_main() to initialize Arduino framework
- Remove CONFIG_AUTOSTART_ARDUINO (no longer needed)
- Fix deprecated hal/cpu_hal.h include, use esp_cpu.h instead
- Remove old ESP-IDF version conditionals (now IDF 5.x+ only)
- Clean up and sort includes alphabetically
This unifies the ESP32 startup code path - Arduino initialization is now
handled by calling initArduino() rather than using CONFIG_AUTOSTART_ARDUINO
which would start Arduino's own main loop.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
The bufsize > 0 check is redundant because the previous if statement
already handles all cases where bufsize <= 0, ensuring that by the time
we reach this condition, bufsize is always positive.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>