Allow matched Debian 12 native Asterisk packages for nonproduction tests

This commit is contained in:
2026-10-01 20:45:23 +08:00
parent fabfbf71c6
commit b91016511c
6 changed files with 53 additions and 5 deletions
+19
View File
@@ -0,0 +1,19 @@
#!/usr/bin/env bash
set -euo pipefail
source "$(dirname "$0")/native-platform.sh"
check() {
local want=$1; shift
if require_native_platform "$@" >/dev/null 2>&1; then
[[ $want == pass ]] || { echo "unexpected pass: $*" >&2; exit 1; }
else
[[ $want == fail ]] || { echo "unexpected reject: $*" >&2; exit 1; }
fi
}
check pass debian 13 x86_64 debian:13:x86_64 0
check pass debian 12 x86_64 debian:12:x86_64 1
check fail debian 12 x86_64 debian:12:x86_64 0
check fail debian 12 x86_64 debian:13:x86_64 1
check fail debian 13 x86_64 debian:12:x86_64 1
check fail debian 12 aarch64 debian:12:aarch64 1
check fail ubuntu 24.04 x86_64 ubuntu:24.04:x86_64 1
printf 'native Asterisk platform checks passed\n'