From e67bc50f6fb37833f602b0f4be5b1bd14b6b26ca Mon Sep 17 00:00:00 2001 From: nyash-codex Date: Thu, 4 Dec 2025 06:31:18 +0900 Subject: [PATCH] test(phase124): Update smoke tests to JoinIR-only MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Remove all NYASH_HAKO_CHECK_JOINIR=0 legacy path tests - Keep only JoinIR-only tests (no environment variables) - Update script header to Phase 124 - Update test descriptions to reflect JoinIR-only architecture - Fix arithmetic increment issue with set -e compatibility Test Results: 4/4 PASS (100%) - phase123_simple_if.hako: ✅ PASS - phase123_nested_if.hako: ✅ PASS - phase123_while_loop.hako: ✅ PASS - phase123_if_in_loop.hako: ✅ PASS Phase 124 Task 4/5 complete --- .../profiles/integration/hako_check_joinir.sh | 58 +++++-------------- 1 file changed, 14 insertions(+), 44 deletions(-) diff --git a/tools/smokes/v2/profiles/integration/hako_check_joinir.sh b/tools/smokes/v2/profiles/integration/hako_check_joinir.sh index 35cc7f88..edefe384 100644 --- a/tools/smokes/v2/profiles/integration/hako_check_joinir.sh +++ b/tools/smokes/v2/profiles/integration/hako_check_joinir.sh @@ -1,11 +1,11 @@ #!/bin/bash -# Phase 123: hako_check JoinIR implementation test +# Phase 124: hako_check JoinIR-only test (legacy path removed) set -e # Profile metadata PROFILE_NAME="hako_check_joinir" -DESCRIPTION="Test hako_check with both legacy and JoinIR paths" +DESCRIPTION="Test hako_check with JoinIR-only path (Phase 124 consolidation)" # Color codes GREEN='\033[0;32m' @@ -26,7 +26,7 @@ ROOT="$(cd "$(dirname "$0")/../../../../.." && pwd)" BIN="${ROOT}/target/release/hakorune" echo "==========================================" -echo " Phase 123: hako_check JoinIR Test" +echo " Phase 124: hako_check JoinIR-Only Test" echo "==========================================" echo "" @@ -38,12 +38,10 @@ if [ ! -f "$BIN" ]; then fi # Test counters -legacy_pass=0 -legacy_fail=0 joinir_pass=0 joinir_fail=0 -echo "=== Testing Legacy Path (NYASH_HAKO_CHECK_JOINIR=0) ===" +echo "=== Testing JoinIR-Only Path (Phase 124: No environment variables) ===" echo "" for case in "${test_cases[@]}"; do @@ -54,36 +52,15 @@ for case in "${test_cases[@]}"; do continue fi - echo -n "Testing $case (legacy)... " + echo -n "Testing $case (joinir-only)... " - if timeout 10 env NYASH_HAKO_CHECK_JOINIR=0 "$BIN" --backend vm "$test_file" >/dev/null 2>&1; then + # Phase 124: No environment variables - JoinIR is the only path + if timeout 10 "$BIN" --backend vm "$test_file" >/dev/null 2>&1; then echo -e "${GREEN}PASS${NC}" - ((legacy_pass++)) + joinir_pass=$((joinir_pass + 1)) else echo -e "${RED}FAIL${NC}" - ((legacy_fail++)) - fi -done - -echo "" -echo "=== Testing JoinIR Path (NYASH_HAKO_CHECK_JOINIR=1) ===" -echo "" - -for case in "${test_cases[@]}"; do - test_file="${ROOT}/local_tests/${case}" - - if [ ! -f "$test_file" ]; then - continue - fi - - echo -n "Testing $case (joinir)... " - - if timeout 10 env NYASH_HAKO_CHECK_JOINIR=1 "$BIN" --backend vm "$test_file" >/dev/null 2>&1; then - echo -e "${GREEN}PASS${NC}" - ((joinir_pass++)) - else - echo -e "${RED}FAIL${NC}" - ((joinir_fail++)) + joinir_fail=$((joinir_fail + 1)) fi done @@ -92,24 +69,17 @@ echo "==========================================" echo " Test Results Summary" echo "==========================================" echo "" -echo "Legacy Path:" -echo " PASS: $legacy_pass" -echo " FAIL: $legacy_fail" -echo "" -echo "JoinIR Path:" +echo "JoinIR-Only Path (Phase 124):" echo " PASS: $joinir_pass" echo " FAIL: $joinir_fail" echo "" # Determine overall result -if [ $legacy_fail -eq 0 ] && [ $joinir_fail -eq 0 ]; then - echo -e "${GREEN}✓ All tests PASSED${NC}" - exit 0 -elif [ $legacy_fail -eq 0 ]; then - echo -e "${YELLOW}⚠ Legacy path: OK, JoinIR path: Some failures${NC}" - echo "Note: JoinIR implementation is placeholder in Phase 123" +if [ $joinir_fail -eq 0 ]; then + echo -e "${GREEN}✓ All tests PASSED (JoinIR-only)${NC}" + echo "Phase 124: hako_check successfully consolidated to JoinIR-only architecture" exit 0 else - echo -e "${RED}✗ Legacy path has failures${NC}" + echo -e "${RED}✗ Some tests failed${NC}" exit 1 fi