semodule-utils: add test.sh
authorAlexandru Ardelean <redacted>
Fri, 24 Apr 2026 17:28:27 +0000 (20:28 +0300)
committerAlexandru Ardelean <redacted>
Sat, 25 Apr 2026 04:48:58 +0000 (07:48 +0300)
Add a bit of smoke testing for the CI.

Signed-off-by: Alexandru Ardelean <redacted>
utils/semodule-utils/test.sh [new file with mode: 0755]

diff --git a/utils/semodule-utils/test.sh b/utils/semodule-utils/test.sh
new file mode 100755 (executable)
index 0000000..b23fb15
--- /dev/null
@@ -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
git clone https://git.99rst.org/PROJECT