From 72d2143c78bb01135eef8fa6a210e8a1a0f987ce Mon Sep 17 00:00:00 2001 From: Emmanuel Dreyfus Date: Tue, 29 Jul 2014 02:32:14 +0200 Subject: 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 Reviewed-on: http://review.gluster.org/8279 Tested-by: Gluster Build System Reviewed-by: Harshavardhana Tested-by: Harshavardhana --- run-tests.sh | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) 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 -- cgit