| name | e2e-test |
| description | Run the full end-to-end compiler test suite for the swpp202601-team03 project inside the pre-baked CI Docker image (`ghcr.io/dennis0405/swpp202601-team03-ci:latest`). Invoke when the user runs `/E2E-TEST` or asks to "run E2E tests / 전체 테스트 / 컨테이너에서 빌드+테스트". The skill checks for the image (pulls it if missing), bind-mounts the local repo into a clean container, and runs `ci/scripts/1-build-compiler.sh` through `5-interpreter.sh` in order. |
E2E-TEST — Run end-to-end compiler tests in the CI image
When this skill is invoked, execute the full E2E pipeline described in ci/README.md. The five scripts must run inside the pre-baked CI image — never on the host directly.
Steps
1. Resolve the repo root on the host
Use absolute paths only. Default to the current working directory's git toplevel:
REPO_ROOT="$(git rev-parse --show-toplevel)"
If the user is not in a git checkout, fall back to /home/dennis0405/swpp/swpp202601-team03 and tell them which path you used.
2. Make sure the image is present
Check the local cache first:
docker image inspect ghcr.io/dennis0405/swpp202601-team03-ci:latest >/dev/null 2>&1
If exit code is non-zero, pull it:
docker pull ghcr.io/dennis0405/swpp202601-team03-ci:latest
Mention to the user whether the image was already cached or had to be pulled. If docker itself is missing or the daemon is not running, stop and report the error — do not try to install Docker.
3. Run scripts 1–5 in one clean container
Use --rm (no -it; the Bash tool is non-interactive). Bind-mount the host repo at /work/swpp202601-team03 and chain the five scripts under set -euo pipefail so the run aborts on the first failure.
docker run --rm \
-v "$REPO_ROOT":/work/swpp202601-team03 \
-w /work/swpp202601-team03 \
ghcr.io/dennis0405/swpp202601-team03-ci:latest \
bash -lc '
set -euo pipefail
ci/scripts/1-build-compiler.sh
ci/scripts/2-ctest-compiler.sh
ci/scripts/3-compiler.sh
ci/scripts/4-alive2.sh
ci/scripts/5-interpreter.sh
'
The full pipeline can take many minutes (Alive2 + interpreter dominate). Pass a generous Bash timeout (e.g. timeout: 600000 ms) or run in the background with run_in_background: true so the user can keep working. If running in the background, surface the bash id and check back when notified — do not poll.
4. Report the result
- All five steps green → report success in one sentence. Mention that the per-benchmark cost table was printed by
5-interpreter.sh in the captured stdout (the /opt/test-result/* files do not survive --rm).
- Any step red → name the failing script (
1-build-compiler.sh … 5-interpreter.sh), quote the smallest useful error excerpt, and stop. Ask the user how to proceed instead of retrying or skipping the failed stage.
Things to avoid
- Do not run
cmake, clang, ctest, or the scripts on the host shell — only inside the container. (This matches the user's standing preference.)
- Do not pass
-it; the harness shell has no TTY.
- Do not use a named/persistent container for E2E runs;
--rm keeps the host clean.
- Do not change directory before
docker run; rely on -v and -w with absolute paths.
- Do not skip the image-presence check — pulling 1+ GB unannounced is surprising for the user.
Optional knobs (only if the user asks)
These environment variables are read by the scripts and can be forwarded with -e on docker run:
ALIVE2_SMT_TIMEOUT_MS=<ms> — override the 5 s Alive2 SMT timeout per query in step 4.
RUN_SLOW_INTERPRETER_TESTS=1 — include the slow interpreter cases in step 5.
INTERP=/opt/interpreter/main-log, BENCH_FILTER=<bench>, INPUT_FILTER=<n> — narrow step 5 for debugging.
Do not enable any of these by default.