[ostree] tests: skip test-commit-sign.sh when not root
- From: Giuseppe Scrivano <gscrivano src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [ostree] tests: skip test-commit-sign.sh when not root
- Date: Fri, 3 Apr 2015 07:57:47 +0000 (UTC)
commit d3545b0661f3247cd8c106e64a71052ce9952243
Author: Giuseppe Scrivano <gscrivan redhat com>
Date: Thu Apr 2 14:21:52 2015 +0200
tests: skip test-commit-sign.sh when not root
Signed-off-by: Giuseppe Scrivano <gscrivan redhat com>
tests/test-commit-sign.sh | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/tests/test-commit-sign.sh b/tests/test-commit-sign.sh
index 7848324..01a3a2e 100755
--- a/tests/test-commit-sign.sh
+++ b/tests/test-commit-sign.sh
@@ -23,6 +23,12 @@ if ! ${CMD_PREFIX} ostree --version | grep -q -e '\+gpgme'; then
exit 77
fi
+# Skip the test when non-root as gpgme would not read files owned by
+# another user.
+if test "$(id -i)" != "0"; then
+ exit 77
+fi
+
. $(dirname $0)/libtest.sh
keyid="472CDAFA"
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]