velxio/test/backend/unit
David Montero 734b7d0487 feat(esp32): pure ESP-IDF language mode for the ESP32 family (#139)
Adds a third entry to the board language selector next to Arduino C++
and MicroPython: ESP-IDF. In this mode the user writes a plain ESP-IDF
project — app_main() entry point, FreeRTOS + driver APIs — and the
backend compiles it through the same ESP-IDF toolchain it already uses
for ESP32 Arduino sketches, just without the arduino-esp32 component.

Backend:
- CompileRequest.language ('espidf') threaded through the sync + async
  compile paths and folded into the dedup job key (language='arduino'
  and omitted hash identically so old clients keep dedupping).
- espidf_compiler: pure_idf flag. User files are written into main/
  as-is (no Arduino.h wrap, no velxio_compat.h, Arduino library
  resolution skipped), ARDUINO_ESP32_PATH is dropped from the build env
  and VELXIO_PURE_SKETCH raised so the template CMake compiles the
  user's own sources via a glob branch. Pure builds get their own
  persistent build-dir variant through the eff_hash fold.
- QEMU WiFi compat for IDF-style code: esp_wifi.h/esp_wifi_init
  detection sets has_wifi, and literal #define SSID/PASS plus
  wifi_config_t designated initializers are normalized to the QEMU AP.
- CONFIG_ARDUINO_* lines are stripped from sdkconfig.defaults in pure
  mode (the symbols don't exist without the arduino component).

Frontend:
- LanguageMode gains 'espidf'; BOARD_SUPPORTS_ESPIDF covers the ESP32
  family (Xtensa, S3, C3). Toolbar shows the option only for those.
- Switching modes seeds a main.c blink skeleton (app_main + gpio
  driver), mirroring the MicroPython main.py flow.
- compileCode sends language='espidf'; run/stop paths are unchanged
  (the QEMU worker consumes the same merged flash image).
- New gallery example: esp32-idf-blink (LED + resistor on GPIO 2).

Tests: unit coverage for the build-env switch, IDF wifi normalization,
job-key variance, file-group seeding and the new example; verified
end-to-end in a container from the prod image (pure build produces a
bootable flash image; Arduino-mode build unchanged, same variant hash).
2026-07-24 06:37:01 +02:00
..
__init__.py Add unit tests for I2C slave devices, MCP tools, and WiFi/BLE status parser 2026-04-10 23:39:51 -03:00
test_arduino_cli_attinycore.py fix(ci): two stale-path bugs from the recent refactors 2026-05-05 11:22:02 -03:00
test_boot_images.py fix(pi3): show kernel boot + autologin SD + sidecar cache invalidation 2026-05-16 06:23:22 +02:00
test_compile_dedup.py perf(compile): dedup, concurrency limits, and persistent build dir for ESP-IDF 2026-05-09 08:33:11 +02:00
test_dht22_worker.py test(dht22): skip absolute-timing busy_wait checks under CI 2026-05-17 22:31:37 +02:00
test_esp32_wifi_args.py chore(tests): silence three noisy warnings in deploy-gate output 2026-05-16 22:39:43 +02:00
test_esp32_wifi_webserver.py Add unit tests for I2C slave devices, MCP tools, and WiFi/BLE status parser 2026-04-10 23:39:51 -03:00
test_esp32c3_wifi_args.py Add unit tests for I2C slave devices, MCP tools, and WiFi/BLE status parser 2026-04-10 23:39:51 -03:00
test_espidf_compiler.py feat: Enhance ESPIDFCompiler library resolution logic; add support for dynamic library detection and patching in CMakeLists.txt 2026-04-11 15:25:40 -03:00
test_espidf_core_first.py fix(esp32): manifest scope resolves to the DECLARED lib, not first-match 2026-06-06 09:01:03 +02:00
test_espidf_pure_mode.py feat(esp32): pure ESP-IDF language mode for the ESP32 family (#139) 2026-07-24 06:37:01 +02:00
test_espidf_real_paths.py feat: Skip real paths test in CI; mark subproject commits as dirty 2026-04-11 15:49:32 -03:00
test_i2c_slaves.py test: update BMP280 chip ID assertions and clarify tagName uniqueness in metadata drift test 2026-04-21 17:31:51 -03:00
test_mcp_tools.py Add unit tests for I2C slave devices, MCP tools, and WiFi/BLE status parser 2026-04-10 23:39:51 -03:00
test_signal_router.py fix(esp32): LEDC signal IDs are 71-86 per ESP32 TRM, not 72-87 2026-05-17 05:42:52 +02:00
test_wifi_status_parser.py Add unit tests for I2C slave devices, MCP tools, and WiFi/BLE status parser 2026-04-10 23:39:51 -03:00