Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/CUDApp/blob/main/tests/gates/cudapp-run.sh # CUDApp CUDA++: AIEN’s GPU machine-code toolchain, runtime and driver client for NVIDIA GPUs without the CUDA toolkit. Hardware coverage and driver replacement limits are explicit. Brought by drakestapleton Sign in to star 0 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `main` Branches Tags History `CUDApp / tests / gates / cudapp-run.sh` 40 lines · 2176 bytes Raw Blame History 1 #!/usr/bin/env bash 2 # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 3 # tests/gates/cudapp-run.sh: the one entry point for the local verification gates of CUDApp. Every step runs the SAME command 4 # as the hosted job it mirrors, so a gate manifest under tests/gates/ names this script plus one step word and needs 5 # no shell expansion (ADR 0028 P6, the layout physics and omega-mv use). 6 # Named cudapp-run.sh, not run.sh: omega-mv owns tests/gates/run.sh, and tools/extract/drift.sh treats a same-path file as a shared GPU path. 7 set -euo pipefail 8 ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd)" 9 cd "$ROOT" 10 step="${1:?usage: tests/gates/cudapp-run.sh }" 11 obs() { printf 'AIEN-OBS %s %s\n' "$1" "$2"; } 12 13 case "$step" in 14 runtime-api) 15 # Mirrors .github/workflows/runtime-api.yml step "Manifest, surface and negative controls" (and the 16 # test-runtime-api entry of `make test`): docs/runtime/omega_runtime_api.manifest against API.md and the 22 17 # manifest headers (functions, structs, fields, constants, version, public surface, INTERNAL list), then every 18 # negative control of tools/runtime_api_negative.sh. The final line must be the negative script's RESULT: PASS, 19 # and the real tree's own RESULT: PASS line must be there too, so an empty or truncated run cannot pass. 20 log=$(mktemp) 21 trap 'rm -f "$log"' EXIT 22 rc=0 23 make test-runtime-api > "$log" 2>&1 || rc=$? 24 cat "$log" 25 [ "$rc" -eq 0 ] || exit "$rc" 26 real=$(grep -c '^RESULT: PASS (runtime API ' "$log" || true) 27 last=$(tail -n 1 "$log") 28 case $last in 29 "RESULT: PASS (every negative control was caught)") ;; 30 *) echo "cudapp-run.sh runtime-api: make exited 0 without the negative controls' final RESULT: PASS line: $last" >&2; exit 1 ;; 31 esac 32 [ "$real" -eq 1 ] || { echo "cudapp-run.sh runtime-api: expected one real-tree RESULT: PASS line, saw $real" >&2; exit 1; } 33 obs runtime_api_negative_controls "$(grep -c '^NEGATIVE CONTROL .*: FAILED as it must' "$log")" 34 obs runtime_api_not_caught "$(grep -c 'NOT CAUGHT\|BROKEN' "$log" || true)" 35 ;; 36 *) 37 echo "cudapp-run.sh: unknown step '$step'" >&2 38 exit 2 39 ;; 40 esac