Skip to content

chore: consolidate test framework into ci/ (retire Tela-CICD repo)#6

Open
anakod wants to merge 28 commits into
futurefrom
chore/consolidate-tests-into-ci
Open

chore: consolidate test framework into ci/ (retire Tela-CICD repo)#6
anakod wants to merge 28 commits into
futurefrom
chore/consolidate-tests-into-ci

Conversation

@anakod

@anakod anakod commented Jun 16, 2026

Copy link
Copy Markdown
Collaborator

Consolidate the test framework into ci/ (retire the separate Tela-CICD repo)

The host-mock test framework lived in a separate repo (Tela-CICD). That split
was a deliberate decision under old constraints - independent agents, no shared
git, hand-checked sync points - and to keep test authoring honest (couldn't peek
at implementation across a repo boundary). Those constraints are gone: one agent
per task, shared git, review via PRs. The barrier outlived its purpose.

What this does

  • Brings the entire framework under ci/ via git subtree (history of the
    test repo is preserved - see the Add 'ci/' from commit ... merge).
  • ci/ holds tests/, stubs/, host lib/ (ckdl/lua/mbedtls builds), and the
    runner (test.py, build.py, validate_archives.py).
  • Adds docs/TESTING.md recording the principle the split used to enforce
    structurally (test the layer boundary / what we pass in; recording-mock; intent
    not implementation).
  • ci/.gitignore for build artifacts.

Firmware build is untouched

PlatformIO src_dir defaults to src/; ci/ is outside src/, include/,
lib/, so pio run never sees it and the stubs cannot shadow real ESP headers.
The host suite is isolated by directory + build profile instead of by repo.

Runner

The runner is fully __file__-relative, so no path edits were needed - only the
invocation changes (project dir is now the repo root):

bash ci/lib/build_libs.sh
python3 ci/build.py . --mock --rebuild
python3 ci/test.py .

Verified

Full suite from the new location: 67/67 green (66 OTA/UI/etc + the SD path
test now sitting alongside).

Follow-up (not in this PR)

Tela-CICD gets a README redirect pointing here, then can be archived read-only.

anakod and others added 28 commits February 27, 2026 09:56
New test files (8):
- test_div.cpp: 19 tests — container, nesting, visible/bgcolor bind, CSS
- test_flex.cpp: 26 tests — row/column/wrap, gap, justify, align, grow
- test_template_v2.cpp: 8 tests — <PascalCase> definitions
- test_yaml_state.cpp: 13 tests — YAML key:value, type inference
- test_nested_state.cpp: 34 tests — dotted paths, arrays, deep nesting
- test_v2_combined.cpp: 23 tests — all v2 features together
- test_lua_nested_state.cpp: 15 tests — Lua proxy state.player.x
- test_binding_updates.cpp: 12 tests — binding updates for nested/arrays

Updated tests: os=2.0 compat in existing tests
Stubs: flex mock (flow, align, grow, pad_row/col), scrollable flag, lv_obj_get_child(-1)

62/62 tests pass.
feat: v2 tests — div, flex, YAML state, nested state, template v2
New:
- tests/crypto/test_crypto.cpp — 22 tests for Blowfish encrypt/decrypt

Modified:
- build.py — .c file support, project lib/ components (includes + sources)
- test.py — link mbedtls library
- lib/build_libs.sh — install mbedTLS headers

LIB_COMPONENTS list in build.py for vendored third-party code in project lib/.
63/63 tests pass.
feat: crypto tests + .c file support + mbedTLS lib
New: tests/storage/test_sd_path.cpp

Requires TelaOS PR #3 (sdcard module).
]
merge
- tests: test_bin_stream (10), test_ota_receive (10), test_console_ota (7)
- stubs: esp_ota_ops (capturing mock), lz4 decompressor, esp_restart
- stubs/lvgl.h: msgbox + lv_obj_delete_async + LV_EVENT_DELETE (future caught up)
- test.py: bin_stream, ota_receive added to quick set

Full suite 65/66 (ui/flex stretch-cross pre-existing).
align="stretch" is emulated in ui_html.cpp (LVGL has no LV_FLEX_ALIGN_STRETCH):
container keeps cross=START and each child is stretched to 100% on the cross axis.
The test still asserted flexCrossAlign==STRETCH, which the code intentionally
never sets. Now verifies the child's cross-axis size (h==lv_pct(100) for row-flow).

Pre-existing test/impl drift, surfaced once the msgbox stub catch-up let the full
mock suite build. Full suite now 66/66.
- bin_stream: end-marker tolerance test added; removed offset test already
  covered by exact-reassembly check
- console_ota: dropped size-validation cases that duplicate OtaReceive::start
  checks in test_ota_receive; kept console-layer parsing/routing tests
test: BLE OTA + BinStream tests, stubs, flex fix
git-subtree-dir: ci
git-subtree-mainline: 2783565
git-subtree-split: 7946b18
…impl)

Records the principle the two-repo split used to enforce structurally, now that
tests are consolidated into ci/. Also ci/.gitignore for build artifacts.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants