aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLena <lena@omega>2026-07-01 00:00:00 +0000
committerLena <lena@omega>2026-07-01 00:00:00 +0000
commite89c2290de133104420b02da3b7453a25484429d (patch)
treec78ca81aa319a2c1e3084b16a46e404310f96a19
parent9f832c148fdd3d9d3e4673e89d2d052c2bcd1efa (diff)
downloadscrcpy-android-e89c2290de133104420b02da3b7453a25484429d.tar.gz
test: derive the docker image tag from the rig inputs
The tag suffix had to be bumped by hand whenever the Dockerfile or sdk-packages.txt changed; forgetting meant silently testing against a stale image. Hash the two files into the tag so any edit invalidates the cache automatically.
-rwxr-xr-xtest6
1 files changed, 3 insertions, 3 deletions
diff --git a/test b/test
index d6475d6..de6eaf6 100755
--- a/test
+++ b/test
@@ -16,9 +16,9 @@
set -eu
ROOT="$(cd "$(dirname "$0")" && pwd)"
-# Bump the tag suffix whenever test-rig/Dockerfile or sdk-packages.txt
-# changes; otherwise a stale cached image keeps being used.
-IMG="scrcpy-android-test:5"
+# The image tag is a hash of the rig inputs, so editing the Dockerfile
+# or the SDK package list automatically invalidates the cached image.
+IMG="scrcpy-android-test:$(cat "$ROOT/test-rig/Dockerfile" "$ROOT/test-rig/sdk-packages.txt" | sha256sum | cut -c1-12)"
cmd="${1:-unit}"
case "$cmd" in