#!/usr/bin/env bash # 50-cts-after.sh [--blocks shader-image,ssbo,dsa,texture,packed-pixels] [--limit N] # [--restore-base-lib] # # CONTRACT-P7 7.3 exit gate 5, AFTER reading: the five KHR-GL46 blocks, inproc x DirectVulkan, # against device-window-1/CTS-base ($BASE = monolith x DirectVulkan, p7w1). Same glcts bundle, # same caselists, same skip file and the same run_cts.py flags as $BASE (CTS-base/README.md, # ~/w7/logs/cts-a64/base/run-base-inner.sh); the ONLY differences are the library and the arm: # MOBILEGL_TRANSPORT=inproc + the split acceptance knobs the retrace split lane uses # (MOBILEGL_IPC_ROLE_SPLIT_STATE=1 MOBILEGL_IPC_STRICT_ERRORS=1 MOBILEGL_IPC_RUN_AHEAD=1). # The library is this build's APK arm64 libMobileGL.so, pushed to /data/local/tmp/mgcts exactly as # ~/w7/logs/cts-a64/deploy/deploy.sh pushed the $BASE one, and verified by sha256 on the device. # # Arm proof before any block: mgprobe (the SKILL step-5 preflight) and one glcts case, each under # the AFTER environment, must log ConfigLoader's "Config: MOBILEGL_TRANSPORT=inproc - the MGPipe # record stream" and a "Config: IPC" line with strict=1 role-split-state=1 run-ahead=1; the proof # case's StatusCode is recorded in arm-proof.txt (a WARN when it is neither Pass nor Fail). # RESUMABLE per block (/cts/runs//.done), and a block's .done is written ONLY when the # block is a complete reading: run_cts.py exited 0 and 60-reduce.py --check-block (the very test the # verdict applies) finds report-.json with a result for every non-skipped case of the # caselist and unrun.txt empty. Otherwise the block is logged INCOMPLETE (runs//complete.txt # says why) and redone from scratch by the next run (exit 3 = the loop finished with such blocks; # window.sh carries on and leaves the step for the next run). Each block keeps a copy of the # caselist it ran (runs//caselist.txt) beside its path, so the window's output reduces on its # own after the build tree is gone. 60-reduce.py requires all five blocks. The UBO block # (GTF-GL46 uniform_buffer_object) is not run: this glcts has no GTF module (ID-P7-16). # --limit N runs the first N cases of each block (the dry run). --restore-base-lib re-pushes the # $BASE library at once; 90-restore.sh does it at the end of every window anyway. set -uo pipefail . "$(dirname "$0")/lib.sh" [ $# -ge 1 ] || die "usage: $0 [--blocks list] [--limit N] [--restore-base-lib]" STAMP=$1; shift BLOCKS="shader-image ssbo dsa texture packed-pixels"; LIMIT=0; RESTORE_BASE=0 while [ $# -gt 0 ]; do case "$1" in --blocks) BLOCKS=${2//,/ }; shift 2;; --limit) LIMIT=$2; shift 2;; --restore-base-lib) RESTORE_BASE=1; shift;; *) die "unknown option $1";; esac done w2_load_build "$STAMP" OUT=$(w2_out "$STAMP")/cts mkdir -p "$OUT/deploy" "$OUT/runs" "$OUT/caselists" w2_require_device w2_lock CTS_ENV=(MOBILEGL_CTS_FBO_COLOR_TEXTURE=1 MOBILEGL_TRANSPORT=inproc $W2_SPLIT_KNOBS) ENV_ARGS=(); for kv in "${CTS_ENV[@]}"; do ENV_ARGS+=(--env "$kv"); done DEV_ENV="MOBILEGL_BACKEND_TYPE=DirectVulkan ${CTS_ENV[*]}" t_all=$(date +%s) # ---- deploy --------------------------------------------------------------------------------- for f in glcts mgprobe; do [ "$(Ash "test -x $W2_CTS_DEV/$f && echo ok")" = ok ] || die "$W2_CTS_DEV/$f missing: deploy the bundle first ($W2_CTS_BUNDLE/deploy.sh $W2_SERIAL)" done [ "$(Ash "test -d $W2_CTS_DEV/gl_cts && echo ok")" = ok ] || die "$W2_CTS_DEV/gl_cts missing" unzip -o -q -j "$W2_APK" lib/arm64-v8a/libMobileGL.so -d "$OUT/deploy" || die "no arm64 libMobileGL.so in $W2_APK" WANT=$(sha256sum "$OUT/deploy/libMobileGL.so" | cut -d' ' -f1) BEFORE=$(Ash "sha256sum $W2_CTS_DEV/libMobileGL.so" | cut -d' ' -f1) { echo "apk : $W2_APK" echo "apk sha256 : $(sha256sum "$W2_APK" | cut -d' ' -f1)" echo "lib sha256 : $WANT" echo "lib stamp hits : $(strings "$OUT/deploy/libMobileGL.so" | grep -c -F "${BUILD_STAMP:-$STAMP}" || true) (${BUILD_STAMP:-$STAMP})" echo "device before : $BEFORE" echo "glcts sha256 : $(Ash "sha256sum $W2_CTS_DEV/glcts" | cut -d' ' -f1)" echo "env : $DEV_ENV" } > "$OUT/deploy/IDENTITY.txt" if [ "$BEFORE" != "$WANT" ]; then A push "$OUT/deploy/libMobileGL.so" "$W2_CTS_DEV/libMobileGL.so" > "$OUT/deploy/push.log" 2>&1 || die "push failed" fi GOT=$(Ash "sha256sum $W2_CTS_DEV/libMobileGL.so" | cut -d' ' -f1) echo "device after : $GOT" >> "$OUT/deploy/IDENTITY.txt" [ "$GOT" = "$WANT" ] || die "the device does not carry the AFTER library ($GOT != $WANT)" log "deployed AFTER lib $WANT to $W2_CTS_DEV" # ---- preflight + arm proof --------------------------------------------------------------------- arm_proof() { #