mirror of
https://github.com/openwrt/packages.git
synced 2026-05-31 06:51:51 +08:00
semodule-utils: add test.sh
Add a bit of smoke testing for the CI. Signed-off-by: Alexandru Ardelean <alex@shruggie.ro>
This commit is contained in:
committed by
Alexandru Ardelean
parent
9122b66499
commit
0d952684b7
Executable
+17
@@ -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
|
||||
Reference in New Issue
Block a user