summaryrefslogtreecommitdiffstats
path: root/debian/tests
diff options
context:
space:
mode:
authorDavid Lamparter <equinox@diac24.net>2018-12-10 22:34:49 +0100
committerDavid Lamparter <equinox@diac24.net>2019-02-19 21:30:54 +0100
commitb3c4c164b5a6652deeddec41502f098846eb63d3 (patch)
treeff89587c87bee78f9d9281d4148905e678e78fb6 /debian/tests
parentdebian: move changelog out of the way (diff)
downloadfrr-b3c4c164b5a6652deeddec41502f098846eb63d3.tar.xz
frr-b3c4c164b5a6652deeddec41502f098846eb63d3.zip
debian: make package "official"
Move us into place in debian/ Signed-off-by: David Lamparter <equinox@diac24.net>
Diffstat (limited to 'debian/tests')
-rw-r--r--debian/tests/control3
-rw-r--r--debian/tests/daemons30
2 files changed, 33 insertions, 0 deletions
diff --git a/debian/tests/control b/debian/tests/control
new file mode 100644
index 000000000..53fd537e2
--- /dev/null
+++ b/debian/tests/control
@@ -0,0 +1,3 @@
+Tests: daemons
+Depends: frr
+Restrictions: needs-root
diff --git a/debian/tests/daemons b/debian/tests/daemons
new file mode 100644
index 000000000..43966c834
--- /dev/null
+++ b/debian/tests/daemons
@@ -0,0 +1,30 @@
+#!/bin/bash
+#---------------
+# Testing frr
+#---------------
+set -e
+
+# modify config file to enable all daemons and copy config files
+CONFIG_FILE=/etc/frr/daemons
+DAEMONS=("zebra" "bgpd" "ospfd" "ospf6d" "ripd" "ripngd" "isisd" "pimd" "fabricd")
+
+for daemon in "${DAEMONS[@]}"
+do
+ sed -i -e "s/${daemon}=no/${daemon}=yes/g" $CONFIG_FILE
+ cp /usr/share/doc/frr/examples/${daemon}.conf.sample /etc/frr/${daemon}.conf
+done
+
+# reload frr
+/etc/init.d/frr restart > /dev/null 2>&1
+
+# check daemons
+for daemon in "${DAEMONS[@]}"
+do
+ echo -n "check $daemon - "
+ if pidof -x $daemon > /dev/null; then
+ echo "${daemon} OK"
+ else
+ echo "ERROR: ${daemon} IS NOT RUNNING"
+ exit 1
+ fi
+done