testing script improved
@@ -17,26 +17,28 @@ function runtest {
if [ $status -ne $retcode ]; then
echo "TEST FAILED!" >&2
echo "$@" >&2
- exit 0
+ exit 1
fi
echo ""
}
+# Tests which should succeed
+retcode=0
+runtest "../examples/client_http_get" "-u" "/cgi-bin/he" "-v" "2" "bsd10.nplab.de"
+runtest "../examples/client_http_get" "-u" "/cgi-bin/he" "-v" "1" "212.201.121.100"
+runtest "../examples/client_http_get" "-u" "/cgi-bin/he" "-v" "1" "2a02:c6a0:4015:10::100"
+
+# Tests which should fail
+retcode=1
+runtest "../examples/client_http_get" "-u" "/cgi-bin/he" "-v" "1" "buildbot.nplab.de"
+runtest "../examples/client_http_get" "-u" "/cgi-bin/he" "-v" "1" "not.resolvable.neat"
+
+
+# Platform specific tests
unamestr=`uname`
if [ "$unamestr" == "Linux" ] || [ "$unamestr" == "FreeBSD" ]; then
retcode=0
runtest "../examples/client_http_get" "-P" "../examples/prop_tcp_security.json" "-p" "443" "-v" "1" "www.fh-muenster.de"
- runtest "../examples/tneat" "-v" "2" "-P" "../examples/prop_sctp_dtls.json" "interop.fh-muenster.de"
- runtest "../examples/tneat" "-v" "2" "-L" "-n" "1024" "-P" "../examples/prop_sctp.json"
+ runtest "../examples/tneat" "-v" "1" "-P" "../examples/prop_sctp_dtls.json" "interop.fh-muenster.de"
+ runtest "../examples/tneat" "-v" "1" "-L" "-n" "1024" "-P" "../examples/prop_sctp.json"
fi
-
-
-retcode=0
-runtest "../examples/client_http_get" "-u" "/cgi-bin/he" "-v" "2" "bsd10.nplab.de"
-runtest "../examples/client_http_get" "-u" "/cgi-bin/he" "-v" "2" "212.201.121.100"
-runtest "../examples/client_http_get" "-u" "/cgi-bin/he" "-v" "2" "2a02:c6a0:4015:10::100"
-
-
-retcode=1
-runtest "../examples/client_http_get" "-u" "/cgi-bin/he" "-v" "2" "buildbot.nplab.de"
-runtest "../examples/client_http_get" "-u" "/cgi-bin/he" "-v" "2" "not.resolvable.neat"
