#!/bin/bash
# phase29ae_regression_pack_vm.sh - JoinIR regression pack entrypoint (VM)

source "$(dirname "$0")/../../../lib/test_runner.sh"
require_env || exit 2

run_filter() {
    local label="$1"
    local filter="$2"

    log_info "phase29ae_regression_pack_vm: ${label} (${filter})"
    if ! "$NYASH_ROOT/tools/smokes/v2/run.sh" --profile integration --filter "$filter"; then
        log_error "phase29ae_regression_pack_vm: ${label} failed"
        return 1
    fi

    return 0
}

run_filter "pattern2" "phase29ab_pattern2_" || exit 1
run_filter "pattern2_realworld" "phase263_pattern2_" || exit 1
run_filter "pattern6" "phase29ab_pattern6_" || exit 1
run_filter "pattern7" "phase29ab_pattern7_" || exit 1
run_filter "phase1883" "phase1883_" || exit 1

log_success "phase29ae_regression_pack_vm: all JoinIR regression filters passed"
exit 0
