summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEmmanuel Dreyfus <manu@netbsd.org>2014-07-29 02:32:14 +0200
committerHarshavardhana <harsha@harshavardhana.net>2014-07-30 17:53:22 -0700
commit72d2143c78bb01135eef8fa6a210e8a1a0f987ce (patch)
treeb5adf350565adeebaee46f4e9a7598da39d4477c
parent60f2e231bbf4daef11793710bb69bdfbcfca89a1 (diff)
Regression test portability: run-test.sh
- Check for pidof(8) presence. It may not be present on non Linux systems - Add a -f flag to run-tests.sh to bypass utility presence checks Submit again because of spurious regression test failure BUG: 764655 Change-Id: Iee6282c686c63a01808543054f8e5a3b5b79fca2 Signed-off-by: Emmanuel Dreyfus <manu@netbsd.org> Reviewed-on: http://review.gluster.org/8279 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Harshavardhana <harsha@harshavardhana.net> Tested-by: Harshavardhana <harsha@harshavardhana.net>
-rwxr-xr-xrun-tests.sh12
1 files changed, 11 insertions, 1 deletions
diff --git a/run-tests.sh b/run-tests.sh
index 14512648c03..9b71aea9516 100755
--- a/run-tests.sh
+++ b/run-tests.sh
@@ -53,9 +53,15 @@ function check_dependencies()
MISSING="$MISSING attr"
fi
+ # Check for pidof
+ pidof init > /dev/null 2>&1
+ if [ $? -ne 0 ]; then
+ MISSING="$MISSING pidof"
+ fi
+
## If dependencies are missing, warn the user and abort
if [ "x$MISSING" != "x" ]; then
- echo "Aborting."
+ test "x${force}" != "xyes" && echo "Aborting."
echo
echo "The following required tools are missing:"
echo
@@ -63,6 +69,7 @@ function check_dependencies()
echo " * $pkg"
done
echo
+ test "x${force}" = "xyes" && return
echo "Please install them and try again."
echo
exit 2
@@ -185,6 +192,9 @@ echo
echo ... GlusterFS Test Framework ...
echo
+force=no
+test "x$1" = "x-f" && { force="yes"; shift; }
+
# Make sure we're running as the root user
check_user