From 0d952684b7762304470350465b64a37eec7640cd Mon Sep 17 00:00:00 2001 From: Alexandru Ardelean Date: Fri, 24 Apr 2026 20:28:27 +0300 Subject: [PATCH] semodule-utils: add test.sh Add a bit of smoke testing for the CI. Signed-off-by: Alexandru Ardelean --- utils/semodule-utils/test.sh | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100755 utils/semodule-utils/test.sh diff --git a/utils/semodule-utils/test.sh b/utils/semodule-utils/test.sh new file mode 100755 index 0000000000..b23fb15571 --- /dev/null +++ b/utils/semodule-utils/test.sh @@ -0,0 +1,17 @@ +#!/bin/sh + +case "$1" in +semodule-expand|semodule-link|semodule-package|semodule-unpackage) + # All semodule tools print usage to stderr and exit non-zero with no args. + # Just verify they are present and executable. + tool="semodule_${1#semodule-}" + if ! command -v "$tool" > /dev/null 2>&1; then + echo "ERROR: $tool not found" + exit 1 + fi + echo "$1 OK" + ;; +*) + exit 0 + ;; +esac