summaryrefslogtreecommitdiff
path: root/keama/tests/fordhcp/run.sh
diff options
context:
space:
mode:
Diffstat (limited to 'keama/tests/fordhcp/run.sh')
-rw-r--r--keama/tests/fordhcp/run.sh30
1 files changed, 30 insertions, 0 deletions
diff --git a/keama/tests/fordhcp/run.sh b/keama/tests/fordhcp/run.sh
new file mode 100644
index 00000000..8942da0d
--- /dev/null
+++ b/keama/tests/fordhcp/run.sh
@@ -0,0 +1,30 @@
+#!/bin/sh
+
+#set -x
+
+if [ $# -ne 0 ]; then
+ echo "usage: $0" >&2
+ exit 1
+fi
+
+cd "$(dirname "$0")"
+cd ..
+
+file=fordhcp/dhcpd.conf
+expected=fordhcp/kea.json
+out=/tmp/dans.out$$
+
+../keama -4 -i $file -o $out >&2
+status=$?
+if [ $status -eq 255 ]; then
+ echo "Dan's config raised an error" >&2
+ exit 1
+fi
+
+diff --brief $out $expected
+if [ $? -ne 0 ]; then
+ echo "Dan's config doesn't provide expected output" >&2
+ exit 1
+fi
+
+exit $status