Files
hakorune/tools/smokes/v2/profiles/integration/hako_check_joinir.sh
nyash-codex e67bc50f6f test(phase124): Update smoke tests to JoinIR-only
- 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
2025-12-04 06:31:18 +09:00

86 lines
2.1 KiB
Bash

#!/bin/bash
# Phase 124: hako_check JoinIR-only test (legacy path removed)
set -e
# Profile metadata
PROFILE_NAME="hako_check_joinir"
DESCRIPTION="Test hako_check with JoinIR-only path (Phase 124 consolidation)"
# Color codes
GREEN='\033[0;32m'
YELLOW='\033[1;33m'
RED='\033[0;31m'
NC='\033[0m' # No Color
# Test cases
test_cases=(
"phase123_simple_if.hako"
"phase123_nested_if.hako"
"phase123_while_loop.hako"
"phase123_if_in_loop.hako"
)
# Root directory
ROOT="$(cd "$(dirname "$0")/../../../../.." && pwd)"
BIN="${ROOT}/target/release/hakorune"
echo "=========================================="
echo " Phase 124: hako_check JoinIR-Only Test"
echo "=========================================="
echo ""
# Check if binary exists
if [ ! -f "$BIN" ]; then
echo -e "${RED}Error: Binary not found at $BIN${NC}"
echo "Please run: cargo build --release"
exit 1
fi
# Test counters
joinir_pass=0
joinir_fail=0
echo "=== Testing JoinIR-Only Path (Phase 124: No environment variables) ==="
echo ""
for case in "${test_cases[@]}"; do
test_file="${ROOT}/local_tests/${case}"
if [ ! -f "$test_file" ]; then
echo -e "${YELLOW}Warning: Test file not found: $test_file${NC}"
continue
fi
echo -n "Testing $case (joinir-only)... "
# 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}"
joinir_pass=$((joinir_pass + 1))
else
echo -e "${RED}FAIL${NC}"
joinir_fail=$((joinir_fail + 1))
fi
done
echo ""
echo "=========================================="
echo " Test Results Summary"
echo "=========================================="
echo ""
echo "JoinIR-Only Path (Phase 124):"
echo " PASS: $joinir_pass"
echo " FAIL: $joinir_fail"
echo ""
# Determine overall result
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}✗ Some tests failed${NC}"
exit 1
fi