edith_codecs
Clone
https://git.tahinli.com/Tahinli/edith_codecs.git
0 watching0 forksRust370.3 MiB052d1d3Tahinli2 months ago3627 commits
| 1 | #!/usr/bin/env bash |
| 2 | # av1-stage-suite.sh — stage an ec-av1 suite on a server host, behind the preflight |
| 3 | # gate. A staging whose pin audit or rung check FAILED, or whose checkers never |
| 4 | # ran, MUST NOT reach `=== SUITE`. |
| 5 | # |
| 6 | # WHY THIS EXISTS (lane-av1stagegaps, 2026-09-30). The hand-written staging |
| 7 | # driver logged the checker outcome and continued regardless: |
| 8 | # |
| 9 | # === ORACLE RUNG CHECKER |
| 10 | # rungs_exit=1 ok_count=0 |
| 11 | # === SUITE |
| 12 | # |
| 13 | # so a green suite on a host meant nothing about its preflight. Three states — |
| 14 | # passed, failed, never ran — all looked the same. This driver runs |
| 15 | # scripts/av1-suite-preflight.sh under `set -e` and stops there. |
| 16 | # |
| 17 | # Usage: |
| 18 | # scripts/av1-stage-suite.sh --name <suite> --tree <dir> [--tarball <tgz>] |
| 19 | # [--skip <cargo-test-arg>]... [-- command...] |
| 20 | # |
| 21 | # Defaults: no cargo-test-arg means |
| 22 | # cargo test -p ec-av1 --lib -- --test-threads=1 |
| 23 | # |
| 24 | # Env (all passed to the unit): |
| 25 | # CARGO_TARGET_DIR, TMPDIR defaulted under $HOME/gates/<name>-* |
| 26 | # EC_AV1_REQUIRE_AOMENC=1, EC_AV1_REQUIRE_FFMPEG=1, EC_REQUIRE_FIXTURES=1 |
| 27 | # SUITE_RUNG_WAIVER=<reason> required to accept rung_check=not-run |
| 28 | # |
| 29 | # Exit: 0 the unit was started; non-zero the preflight BLOCKED and no unit |
| 30 | # exists. `systemctl --user is-active <name>-suite` is the only thing that |
| 31 | # starts a suite, so a blocked staging leaves the host idle on purpose. |
| 32 | |
| 33 | |
| 34 | |
| 35 | NAME="" |
| 36 | TREE="" |
| 37 | TARBALL="" |
| 38 | |
| 39 | |
| 40 | DRY_RUN=0 |
| 41 | while [; do |
| 42 | case "" in |
| 43 | --name) NAME=; ;; |
| 44 | --tree) TREE=; ;; |
| 45 | --tarball) TARBALL=; ;; |
| 46 | --skip) SKIPS+=(--skip ""); ;; |
| 47 | --dry-run) DRY_RUN=1; ;; |
| 48 | --) ; CMD=(""); break ;; |
| 49 | -h|--help) ; ;; |
| 50 | *) ; ;; |
| 51 | esac |
| 52 | done |
| 53 | [ && [ || { ; ; } |
| 54 | [ || { ; ; } |
| 55 | |
| 56 | # 1. The staged tree needs a real git checkout with a POPULATED index. A bare |
| 57 | # `git init` leaves the index empty and pin-gate-audit.py's |
| 58 | # `git ls-files --error-unmatch` then reports every pin as uncommitted — a |
| 59 | # staging artefact indistinguishable from the defect invariant 4 exists to |
| 60 | # catch (wave-3c-b correction). Test rev-parse, not `[ -d .git ]`: a worktree |
| 61 | # copy and a `git archive` untar both leave a `.git` FILE. |
| 62 | || { |
| 63 | |
| 64 | |
| 65 | } |
| 66 | if [; then |
| 67 | |
| 68 | |
| 69 | fi |
| 70 | |
| 71 | # 2. Both gitignored lanes dumps: missing them fails exactly 2 tests that are |
| 72 | # not a decoder regression. |
| 73 | for; do |
| 74 | [ || { ; ; } |
| 75 | done |
| 76 | |
| 77 | TARGET= |
| 78 | TMP= |
| 79 | |
| 80 | |
| 81 | |
| 82 | |
| 83 | if [; then |
| 84 | |
| 85 | fi |
| 86 | |
| 87 | # 3. THE GATE. `set -e` is the whole mechanism: a non-zero verdict aborts this |
| 88 | # script before systemd-run is ever reached, so no unit exists and no suite |
| 89 | # runs. There is no path from a blocked verdict to `=== SUITE`. |
| 90 | |
| 91 | |
| 92 | EC_REQUIRE_FIXTURES= \ |
| 93 | |
| 94 | |
| 95 | |
| 96 | |
| 97 | |
| 98 | if [; then |
| 99 | |
| 100 | |
| 101 | fi |
| 102 | |
| 103 | if [; then |
| 104 | CMD=(cargo test -p ec-av1 --lib -- --test-threads=1) |
| 105 | fi |
| 106 | |
| 107 | for; do quoted+=(""); done |
| 108 | |
| 109 | LOG=/gates/-suite.log |
| 110 | |
| 111 | |
| 112 | |
| 113 | |
| 114 | |
| 115 | |
| 116 | |
| 117 | |
| 118 | |
| 119 | |
| 120 | |
| 121 | |
| 122 | |
| 123 | |
| 124 |