Files
hakorune/tools/smokes/v2/profiles/integration/selfhost/selfhost_minimal.sh
tomoaki 55ed6fa834 smokes(v2): Move heavy/integration tests out of quick profile (Phase 287 P3-1)
Moved 86 test files from quick to integration profile:
- Phase tests (phase2034/2035/2036/2037/2038/2039/2041/2042/2043/2044/215/2230/2231)
- Stage-B tests (stageb/*) - 17 files
- Selfhost tests (selfhost_*) - 12 files
- Core Direct tests (core_direct_*) - 6 files

Reason: These are integration/heavy tests outside quick's minimal gate responsibility.
Goal: Reduce quick profile failures toward fail=0.
2025-12-25 09:07:11 +09:00

52 lines
1.3 KiB
Bash
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#!/bin/bash
# selfhost_minimal.sh — Minimal selfhost StageB→VM path using stage1_run_min.hako
set -uo pipefail
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
if ROOT_GIT=$(git -C "$SCRIPT_DIR" rev-parse --show-toplevel 2>/dev/null); then
ROOT="$ROOT_GIT"
else
ROOT="$(cd "$SCRIPT_DIR/../../../../.." && pwd)"
fi
BIN="${NYASH_BIN:-$ROOT/target/release/nyash}"
SELFHOST="$ROOT/tools/selfhost/selfhost_build.sh"
TARGET="$ROOT/apps/tests/stage1_run_min.hako"
warn() { echo -e "[WARN] $*" >&2; }
info() { echo -e "[INFO] $*" >&2; }
fail() { echo -e "[FAIL] $*" >&2; exit 1; }
pass() { echo -e "[PASS] $*" >&2; }
if [ ! -x "$BIN" ]; then
warn "[SKIP] nyash binary not found at $BIN (build release first)"
exit 0
fi
if [ ! -x "$SELFHOST" ]; then
warn "[SKIP] selfhost_build.sh missing at $SELFHOST"
exit 0
fi
if [ ! -f "$TARGET" ]; then
warn "[SKIP] target fixture not found: $TARGET"
exit 0
fi
info "Running minimal selfhost path via selfhost_build.sh"
set +e
NYASH_FEATURES="${NYASH_FEATURES:-stage3}" \
NYASH_USE_NY_COMPILER="${NYASH_USE_NY_COMPILER:-1}" \
NYASH_NY_COMPILER_EMIT_ONLY="${NYASH_NY_COMPILER_EMIT_ONLY:-1}" \
"$SELFHOST" --in "$TARGET" --run
rc=$?
set -e
if [ $rc -ne 0 ]; then
fail "selfhost_minimal failed (rc=$rc)"
fi
pass "selfhost_minimal passed (stage1_run_min.hako)"
exit 0