summaryrefslogtreecommitdiff
path: root/test-all.sh
diff options
context:
space:
mode:
authorDirk Engling <erdgeist@erdgeist.org>2021-01-18 18:01:28 +0100
committerDirk Engling <erdgeist@erdgeist.org>2021-01-18 18:01:28 +0100
commit96f643602fde2bd3a9c759fe37d9f2ed50c218b0 (patch)
tree9884b1e381628e163f1709b87b83d071f6b9171f /test-all.sh
parent36051df5dc3defbbcecadd7e4b9dfb5f3ffbf6e8 (diff)
Add testing script
Diffstat (limited to 'test-all.sh')
-rwxr-xr-xtest-all.sh37
1 files changed, 37 insertions, 0 deletions
diff --git a/test-all.sh b/test-all.sh
new file mode 100755
index 0000000..81ee66d
--- /dev/null
+++ b/test-all.sh
@@ -0,0 +1,37 @@
1#!/bin/sh
2
3export PATH=$PATH:/usr/local/bin
4
5pkill -f udplogger_receiver
6logger_dir=`mktemp -d /tmp/udplogger_test.XXXXXXXX`
7
8if [ ! -d "${logger_dir}" ]; then
9 echo "Couldn't create logger dir ${logger_dir}"
10fi
11
12logger_key="${logger_dir}/key.pem"
13logger_crt="${logger_dir}/public.pem"
14
15openssl genrsa -out "${logger_key}" 2048
16openssl rsa -in "${logger_key}" -outform PEM -pubout -out "${logger_crt}"
17
18ln -sf receiver udplogger_receiver
19./udplogger_receiver -k "${logger_key}" "${logger_dir}" &
20
21sleep 2
22
23./sender -h localhost -p 58132 -c "${logger_crt}" "${logger_dir}"
24
25pkill -f udplogger_receiver
26
27grep -qri Juchu "${logger_dir}"
28
29retval=$?
30
31#if [ "${retval}" -eq 0 ]; then
32# echo "Found"
33#fi
34
35rm -r "${logger_dir}"
36
37exit $retval