Skip to content

Commit 7e6f934

Browse files
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_validation
1 parent 151c3c9 commit 7e6f934

File tree

7 files changed

+435
-479
lines changed

7 files changed

+435
-479
lines changed

BUILD.bazel

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,16 @@ load("@buildifier_prebuilt//:rules.bzl", "buildifier")
44

55
package(default_visibility = ["//visibility:public"])
66

7+
# Test suite for wit-bindgen-rt fix validation
8+
# Aggregates alignment tests and integration tests that validate the fix
9+
test_suite(
10+
name = "wit_bindgen_rt_validation",
11+
tests = [
12+
"//test/alignment:alignment_tests",
13+
"//test/integration:wit_bindgen_rt_fix_test",
14+
],
15+
)
16+
717
# Export all rule files
818
exports_files([
919
"LICENSE",

0 commit comments

Comments
 (0)