Commit 7e6f934
committed
refactor: Convert shell scripts to Bazel-native test infrastructure
Following RULE #1: THE BAZEL WAY FIRST from CLAUDE.md
Changes:
- Deleted shell script files (validate_bindgen_fix.sh, test_components_with_wasmtime.sh)
- Created alignment_test.bzl with custom Bazel test rule
- Enhanced test/alignment/BUILD.bazel with build_test and test_suite
- Enhanced test/integration/BUILD.bazel with wit_bindgen_rt_fix_test
- Added top-level test suite //:wit_bindgen_rt_validation
- Updated TESTING_SUMMARY.md to reflect Bazel-native approach
Testing Infrastructure:
1. alignment_validation_test - Custom test rule with:
- wasm-tools validation
- WIT interface extraction
- Export and record structure verification
- wasmtime instantiation testing
- Hermetic runfiles and toolchain resolution
2. build_test - Validates component builds:
- alignment_component_debug
- alignment_component_release
- service_a_component (previously failing)
- service_b_component
3. test_suite - Aggregates related tests:
- //test/alignment:alignment_tests
- //test/integration:wit_bindgen_rt_fix_test
- //:wit_bindgen_rt_validation (top-level)
All tests follow Bazel best practices:
- Custom test rules with test = True
- ctx.actions.write() for script generation
- Hermetic runfiles for tool access
- Toolchain-based tool resolution
- Cross-platform support (no Unix-specific commands)
- Zero shell script files
Run tests with:
bazel test //:wit_bindgen_rt_validation1 parent 151c3c9 commit 7e6f934
File tree
7 files changed
+435
-479
lines changed- test
- alignment
- integration
7 files changed
+435
-479
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
7 | 17 | | |
8 | 18 | | |
9 | 19 | | |
| |||
0 commit comments