]> git.99rst.org Git - openwrt-packages.git/commitdiff
uradvd: fix the version check override
authorJosef Schlehofer <redacted>
Sun, 9 Aug 2026 10:18:45 +0000 (12:18 +0200)
committerAlexandru Ardelean <redacted>
Mon, 10 Aug 2026 17:27:25 +0000 (20:27 +0300)
The script greps for "uradvd $PKG_SOURCE_DATE", but the test harness
only exports PKG_NAME, PKG_VERSION and CI_HELPERS. PKG_SOURCE_DATE is a
build time Makefile variable and is empty in the test container, so the
grep -Fx pattern is "uradvd " and never matches.

The binary is built with VERSION=$(PKG_SOURCE_DATE) and prints
"uradvd 2025-09-20", while PKG_VERSION is 2025.09.20~<short hash>, so
derive the date from the version instead.

Rename it to test-version.sh in the process: the generic probe looks for
PKG_VERSION verbatim and cannot match the dashed date either, and uradvd
is the only executable in the package, so without an override the whole
package fails. The shebang goes back to /bin/sh, which is what the
harness runs the script with.

Signed-off-by: Josef Schlehofer <redacted>
net/uradvd/test-version.sh [new file with mode: 0644]
net/uradvd/test.sh [deleted file]

diff --git a/net/uradvd/test-version.sh b/net/uradvd/test-version.sh
new file mode 100644 (file)
index 0000000..1cf0e57
--- /dev/null
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+case "$1" in
+uradvd)
+       # The binary is built with VERSION=$(PKG_SOURCE_DATE) and prints
+       # "uradvd 2025-09-20", while PKG_VERSION is 2025.09.20~<short hash>.
+       version=$(echo "${2%%~*}" | tr . -)
+       uradvd --version | grep -Fx "uradvd $version"
+       ;;
+
+*)
+       echo "Untested package: $1" >&2
+       exit 1
+       ;;
+esac
diff --git a/net/uradvd/test.sh b/net/uradvd/test.sh
deleted file mode 100644 (file)
index 2c3e660..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-#!/usr/bin/env bash
-
-uradvd --version | grep -Fx "uradvd $PKG_SOURCE_DATE"
git clone https://git.99rst.org/PROJECT