Files
hakorune/tools/using_e2e_smoke.sh
moe-charm b8bdb867d8 Merge selfhosting-dev into main (Core-13 pure CI/tests + LLVM bridge) (#126)
* WIP: sync before merging origin/main

* fix: unify using/module + build CLI; add missing helper in runner; build passes; core smokes green; jit any.len string now returns 3

* Apply local changes after merging main; keep docs/phase-15 removed per main; add phase-15.1 docs and tests

* Remove legacy docs/phase-15/README.md to align with main

* integration: add Core-13 pure CI, tests, and minimal LLVM execute bridge (no docs) (#125)

Co-authored-by: Tomoaki <tomoaki@example.com>

---------

Co-authored-by: Selfhosting Dev <selfhost@example.invalid>
Co-authored-by: Tomoaki <tomoaki@example.com>
2025-09-07 07:36:15 +09:00

39 lines
1.0 KiB
Bash

#!/usr/bin/env bash
set -euo pipefail
SCRIPT_DIR=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd)
ROOT_DIR=$(CDPATH= cd -- "$SCRIPT_DIR/.." && pwd)
BIN="$ROOT_DIR/target/release/nyash"
if [ ! -x "$BIN" ]; then
echo "[using-e2e] building nyash (release, JIT)..." >&2
cargo build --release --features cranelift-jit >/dev/null
fi
APP="$ROOT_DIR/apps/using-e2e/main.nyash"
if [ ! -f "$APP" ]; then
echo "[using-e2e] scaffolding sample..." >&2
mkdir -p "$ROOT_DIR/apps/using-e2e"
cat > "$APP" <<'NYCODE'
// using/nyash.link E2E sample (MVP)
using acme.util
static box Main {
init { }
main(args) {
// using line should be accepted when NYASH_ENABLE_USING=1
return 0
}
}
NYCODE
fi
NYASH_DISABLE_PLUGINS=1 NYASH_ENABLE_USING=1 NYASH_CLI_VERBOSE=1 "$BIN" --backend vm "$APP" > /tmp/nyash-using-e2e.out
if rg -q '^Result:\s*0\b' /tmp/nyash-using-e2e.out; then
echo "PASS: using/nyash.link E2E (placeholder)" >&2
else
echo "FAIL: using/nyash.link E2E" >&2; sed -n '1,120p' /tmp/nyash-using-e2e.out; exit 1
fi
echo "All PASS" >&2