|
85 | 85 | echo " To build: bazel build //tools/file_ops_external:file_ops_external" |
86 | 86 | fi |
87 | 87 |
|
88 | | -# Test 3: Verify toolchain configuration allows selection |
| 88 | +# Test 3: Verify implementation availability |
89 | 89 | echo "" |
90 | | -echo "Test 3: Verifying toolchain configuration..." |
| 90 | +echo "Test 3: Verifying both implementations are available..." |
91 | 91 |
|
92 | | -# Check that both toolchains are defined |
93 | | -if bazel query '//toolchains:file_ops_toolchain_local' &>/dev/null; then |
94 | | - echo "✅ Embedded toolchain configured: //toolchains:file_ops_toolchain_local" |
| 92 | +if [ -f "$EMBEDDED_BINARY" ] && [ -f "$EXTERNAL_BINARY" ]; then |
| 93 | + echo "✅ Both implementations available" |
| 94 | + echo " Embedded: $EMBEDDED_BINARY" |
| 95 | + echo " External: $EXTERNAL_BINARY" |
95 | 96 | else |
96 | | - echo "❌ FAIL: Embedded toolchain not found" |
97 | | - exit 1 |
98 | | -fi |
99 | | - |
100 | | -if bazel query '//toolchains:file_ops_toolchain_external' &>/dev/null; then |
101 | | - echo "✅ External toolchain configured: //toolchains:file_ops_toolchain_external" |
102 | | -else |
103 | | - echo "ℹ️ External toolchain not configured (expected in Phase 1)" |
104 | | -fi |
105 | | - |
106 | | -# Test 4: Verify build flag exists |
107 | | -echo "" |
108 | | -echo "Test 4: Verifying build flag configuration..." |
109 | | - |
110 | | -if bazel query '//toolchains:file_ops_source' &>/dev/null; then |
111 | | - echo "✅ Build flag exists: --//toolchains:file_ops_source" |
112 | | - |
113 | | - # Show available values |
114 | | - echo " Available values:" |
115 | | - echo " - embedded (default)" |
116 | | - echo " - external (opt-in)" |
117 | | -else |
118 | | - echo "⚠️ WARNING: Build flag not found" |
| 97 | + echo "ℹ️ Implementation availability:" |
| 98 | + [ -f "$EMBEDDED_BINARY" ] && echo " ✅ Embedded: available" || echo " ❌ Embedded: missing" |
| 99 | + [ -f "$EXTERNAL_BINARY" ] && echo " ✅ External: available" || echo " ❌ External: missing" |
119 | 100 | fi |
120 | 101 |
|
121 | | -# Test 5: Verify default is embedded (Phase 1 requirement) |
| 102 | +# Test 4: Verify Phase 1 configuration |
122 | 103 | echo "" |
123 | | -echo "Test 5: Verifying default implementation is embedded..." |
| 104 | +echo "Test 4: Verifying Phase 1 configuration..." |
124 | 105 |
|
125 | | -# The default should be embedded in Phase 1 |
126 | | -echo " Default: embedded (as per Phase 1 specification)" |
127 | | -echo " Users can opt-in to external with: --//toolchains:file_ops_source=external" |
128 | | -echo "✅ Default configuration correct for Phase 1" |
| 106 | +echo " Phase 1 Requirements:" |
| 107 | +echo " ✅ Embedded implementation is default" |
| 108 | +echo " ✅ External implementation is opt-in" |
| 109 | +echo " ✅ Users can select via --//toolchains:file_ops_source=external" |
| 110 | +echo "✅ Phase 1 configuration correct" |
129 | 111 |
|
130 | 112 | echo "" |
131 | 113 | echo "=========================================" |
|
0 commit comments