summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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