summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNiels de Vos <ndevos@redhat.com>2016-02-29 11:49:01 +0100
committerNiels de Vos <ndevos@redhat.com>2018-06-26 07:21:15 +0000
commitd6cd792af722c795df48eae68806add4c33e18f5 (patch)
treecfd59b44b342bdf0cac374095a72b18a40ebbb7b
parent1f42bdc61dff4fbbb27724134732bc0d931edda5 (diff)
tests: check for the availability of netstat
bug-924726.t calls netstat, and tests fail in case netstat is not available. BUG: 1312832 Change-Id: I3393778e148504326a468744d8a97d28932feed1 Signed-off-by: Niels de Vos <ndevos@redhat.com>
-rwxr-xr-xrun-tests.sh6
1 files changed, 6 insertions, 0 deletions
diff --git a/run-tests.sh b/run-tests.sh
index 8c55972dc37..7f1c6faad19 100755
--- a/run-tests.sh
+++ b/run-tests.sh
@@ -78,6 +78,12 @@ function check_dependencies()
MISSING="$MISSING pidof"
fi
+ # Check for netstat
+ env netstat --version > /dev/null 2>&1
+ if [ $? -ne 0 ]; then
+ MISSING="$MISSING netstat"
+ fi
+
# check for psutil python package
test `uname -s` == "Darwin" || test `uname -s` == "FreeBSD" && {
pip show psutil | grep -q psutil >/dev/null 2>&1