summaryrefslogtreecommitdiff
path: root/test/hwdb-test.sh
diff options
context:
space:
mode:
Diffstat (limited to 'test/hwdb-test.sh')
-rwxr-xr-xtest/hwdb-test.sh10
1 files changed, 8 insertions, 2 deletions
diff --git a/test/hwdb-test.sh b/test/hwdb-test.sh
index 4638328059..bfdafce998 100755
--- a/test/hwdb-test.sh
+++ b/test/hwdb-test.sh
@@ -32,11 +32,17 @@ D=$(mktemp --directory)
trap "rm -rf '$D'" EXIT INT QUIT PIPE
mkdir -p "$D/etc/udev"
ln -s "$ROOTDIR/hwdb" "$D/etc/udev/hwdb.d"
-err=$("$SYSTEMD_HWDB" update --root "$D" 2>&1 >/dev/null)
+
+err=$("$SYSTEMD_HWDB" update --root "$D" 2>&1 >/dev/null) && rc= || rc=$?
if [ -n "$err" ]; then
echo "$err"
- exit 1
+ exit ${rc:-1}
fi
+if [ -n "$rc" ]; then
+ echo "$SYSTEMD_HWDB returned $rc"
+ exit $rc
+fi
+
if [ ! -e "$D/etc/udev/hwdb.bin" ]; then
echo "$D/etc/udev/hwdb.bin was not generated"
exit 1