File: h2spec.sh

package info (click to toggle)
libwebsockets 4.3.5-3
  • links: PTS
  • area: main
  • in suites: forky, sid
  • size: 31,404 kB
  • sloc: ansic: 194,409; javascript: 1,550; sh: 1,387; cpp: 505; java: 461; perl: 405; xml: 118; makefile: 76; awk: 5
file content (41 lines) | stat: -rwxr-xr-x 760 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#!/bin/bash
#
# run from the build subdir
#

echo
echo "----------------------------------------------"
echo "-------   tests: h2spec"
echo


if [ ! -e h2spec ] ; then
	wget https://github.com/summerwind/h2spec/releases/download/v2.1.0/h2spec_linux_amd64.tar.gz &&\
	tar xf h2spec_linux_amd64.tar.gz
	if [ ! -e h2spec ] ; then
		echo "Couldn't get h2spec"
		exit 1
	fi
fi

cd ../minimal-examples/http-server/minimal-http-server-tls
../../../build/bin/lws-minimal-http-server-tls&

sleep 1s

P=$!
../../../build/h2spec -h 127.0.0.1 -p 7681 -t -k -S > /tmp/hlog
kill $P 2>/dev/null
wait $P 2>/dev/null

if [ ! -z "`cat /tmp/hlog | grep "Failures:"`" ] ; then
	cat /tmp/hlog | sed '/Failures:/,$!d'

	exit 1
fi

cat /tmp/hlog | sed '/Finished\ in/,$!d'


exit 0