# Smoke Test

> Smoke-tests rocprof-compute by running a curated YAML matrix of representative CLI flag combinations across the `profile` and `analyze` subcommands, passing on exit code within a per-case timeout. Use when a user asks to smoke-test rocprof-compute, sweep CLI flags, sanity-check a build's command surface, or verify a refactor did not break flag parsing or dispatch.

- Skill: `abchoudh-amd/smoke-test` (Agent Skill, multi-file: 7 files)
- Install (CLI): `npx skillmds@latest add abchoudh-amd/smoke-test`
- Raw SKILL.md: https://api.skillmd.com/api/skills/abchoudh-amd/smoke-test/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: abchoudh-amd (https://skillmd.com/u/abchoudh-amd)
- Updated: 2026-09-21
- Page: https://skillmd.com/skills/abchoudh-amd/smoke-test

---


# Smoke Test

Run a curated matrix of rocprof-compute CLI invocations and report
PASS / FAIL / TIMEOUT / SKIP per case. Pass criterion is exit-code-only.

## Quick start

```bash
bash <SKILL_DIR>/scripts/smoke-compute.sh                  # full matrix
bash <SKILL_DIR>/scripts/smoke-compute.sh --tag fast       # baseline only
bash <SKILL_DIR>/scripts/smoke-compute.sh --only profile   # one subcommand
bash <SKILL_DIR>/scripts/smoke-compute.sh \
    --filter 'analyze.*roofline'                           # regex on case id
bash <SKILL_DIR>/scripts/smoke-compute.sh --list           # just list ids
```

## Workspace validation

- `projects/rocprofiler-compute/src` must exist in the current workspace.
- Sample binaries (`vcopy`, `mat_mul_max`, ...) must be built. If not,
  invoke the sibling `build-compute` skill first — this skill never builds.

## Matrix structure

One YAML per subcommand under `scripts/cases/`:

- `cases/profile.yaml` — `profile` subcommand cases.
- `cases/analyze.yaml` — `analyze` subcommand cases.

Each case has `id`, `subcommand`, `args` (list, passed verbatim after the
subcommand), optional `timeout` (seconds), `tags`, and `skip_if`. See
[REFERENCE.md](REFERENCE.md) for the full schema.

## Execution model

- `profile` cases run **serially** (one shared GPU).
- `analyze` cases run **in parallel** (CPU-bound) up to `--jobs` (default `nproc`).
- The two pools run **concurrently** with each other.
- Default per-case timeout is **300s**, overridable per case in YAML or
  globally with `--per-case-timeout`.

## Report

- Live stdout lines: `[PASS 12.3s] profile.vcopy_default`.
- Final grouped table by status.
- Machine-readable `.smoke-compute/report.json`: see schema in
  [REFERENCE.md](REFERENCE.md). Exit code is 0 if all matched cases PASS or
  SKIP, 1 if any FAIL or TIMEOUT.

## Non-promises

- Does **not** verify output artifacts (CSV / JSON / sqlite / report).
- Does **not** diff against golden data.
- Does **not** replace ctest — route artifact-level checks to `test-compute`.

## Slurm

GPU cases must run on an allocated node. In Cursor, invoke this helper through
the sibling `slurm` skill. The smoke wrapper never creates or joins an
allocation automatically. For explicit use outside Cursor, wrap it with the
single shared `slurm/scripts/run-standalone.sh` fallback.

## Additional resources

- [REFERENCE.md](REFERENCE.md) — YAML schema, tags, skip conditions, report shape.
- [EXAMPLES.md](EXAMPLES.md) — three worked scenarios.

