Skip to content

build: auto-discover E2E tests and consolidate test categories#278

Merged
slepp merged 3 commits intomainfrom
refactor/build-infrastructure
Mar 21, 2026
Merged

build: auto-discover E2E tests and consolidate test categories#278
slepp merged 3 commits intomainfrom
refactor/build-infrastructure

Conversation

@slepp
Copy link
Copy Markdown
Contributor

@slepp slepp commented Mar 21, 2026

Summary

Replace ~433 manual add_e2e_file_test() registrations in CMakeLists.txt with
a glob-based auto-discovery loop that scans examples/e2e_*/*.hew for files
with matching .expected files. New E2E tests are picked up automatically —
no CMakeLists.txt editing required.

Consolidate 19 single-test E2E directories into 5 broader categories to reduce
directory clutter.

Changes

Phase 1: Auto-discovery (~530 lines removed from CMakeLists.txt)

  • Glob-based loop discovers e2e_*/*.hew + .expected pairs automatically
  • Exclusion list for tests needing special runners (sorted, warn, panic)
  • WASM-only tests (wasm_* prefix) excluded from native auto-discovery
  • All set_tests_properties (RESOURCE_LOCK, PROCESSORS, ENVIRONMENT) preserved

Phase 2: Category consolidation (19 dirs → 5)

  • e2e_supervisor_{basic,child,named_child,nested,restart,strategy}e2e_supervisor
  • e2e_closure_{coercion,env_rc,firstclass} + e2e_move_closuree2e_closures
  • e2e_tuple + e2e_tuple_{destruct,edge} + e2e_nested_tuple_destructe2e_tuples
  • e2e_struct_{assign,destruct,enum}e2e_structs
  • e2e_string_{drop,ordering}e2e_strings

Fixups

  • Excluded legacy inline tests (dynamic_index, duration) from auto-discovery
    to avoid duplicate registrations
  • Updated scripts/debug/valgrind-check.sh to use new consolidated paths

Test results

  • All 534 native E2E tests pass (make test-codegen)
  • Rust tests pass (make test-rust)
  • Clippy clean (make lint)

Test name changes

Consolidated categories produce different ctest names. Example:

  • Old: e2e_supervisor_basic_supervisor_basic
  • New: e2e_supervisor_supervisor_basic

slepp added 3 commits March 21, 2026 11:28
Replace ~433 manual add_e2e_file_test() registrations with a glob-based
auto-discovery loop that scans examples/e2e_*/*.hew for files with
matching .expected files.  New tests are picked up automatically —
no CMakeLists.txt editing needed.

Tests that require special runners (sorted output, reject, panic, warn)
or WASM-only tests are excluded from auto-discovery and kept as manual
registrations.  Special cmake properties (RESOURCE_LOCK, PROCESSORS,
ENVIRONMENT) are preserved for stress, supervisor, and backpressure
tests.

Net reduction: ~530 lines removed from CMakeLists.txt.
Merge 19 single-test E2E directories into 5 broader categories:

- e2e_supervisor_{basic,child,named_child,nested,restart,strategy}
  → e2e_supervisor (6 dirs → 1)
- e2e_closure_{coercion,env_rc,firstclass} + e2e_move_closure
  → e2e_closures (4 dirs merged into existing)
- e2e_tuple + e2e_tuple_{destruct,edge} + e2e_nested_tuple_destruct
  → e2e_tuples (4 dirs → 1)
- e2e_struct_{assign,destruct,enum} → e2e_structs (3 dirs → 1)
- e2e_string_{drop,ordering} → e2e_strings (2 dirs merged into existing)

WASM test registrations and set_tests_properties blocks updated to
use the new category names.  Auto-discovery handles native E2E tests
automatically.
Exclude e2e_array/dynamic_index and e2e_duration/duration from
auto-discovery since they already have legacy inline registrations.

Update valgrind-check.sh to reference the new consolidated category
paths (e2e_supervisor/, e2e_strings/) after the directory merge.
@slepp slepp force-pushed the refactor/build-infrastructure branch from 5bbdba9 to 6166859 Compare March 21, 2026 17:28
@slepp slepp enabled auto-merge (squash) March 21, 2026 17:28
@slepp slepp merged commit 913483c into main Mar 21, 2026
12 checks passed
@slepp slepp deleted the refactor/build-infrastructure branch March 21, 2026 17:39
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.

1 participant