• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#!/bin/bash
2
3if [ "$COVERITY_SCAN_BRANCH" != 1 -a "$TRAVIS_OS_NAME" = "osx" ]; then
4	if [ "$LWS_METHOD" != "mbedtls" -a "$LWS_METHOD" != "ss+mbedtls" ] ; then
5		mkdir build && cd build &&
6		cmake -DOPENSSL_ROOT_DIR="/usr/local/opt/openssl" $CMAKE_ARGS .. &&
7		cmake --build .
8	fi
9else
10	if [ "$COVERITY_SCAN_BRANCH" != 1 -a "$TRAVIS_OS_NAME" = "linux" ]; then
11		mkdir build && cd build &&
12		if [ "$LWS_METHOD" = "lwsws" ] ; then
13			cmake -DLWS_OPENSSL_LIBRARIES="/usr/local/lib/libssl.so;/usr/local/lib/libcrypto.so" \
14			      -DLWS_OPENSSL_INCLUDE_DIRS="/usr/local/include/openssl" $CMAKE_ARGS .. &&
15			cmake --build . &&
16			sudo make install &&
17			../minimal-examples/selftests.sh &&
18			../scripts/h2spec.sh &&
19			../scripts/attack.sh &&
20			../scripts/h2load.sh &&
21			../scripts/autobahn-test-server.sh &&
22			../scripts/autobahn-test-client.sh
23		else
24			if [ "$LWS_METHOD" = "lwsws2" ] ; then
25				cmake -DLWS_OPENSSL_LIBRARIES="/usr/local/lib/libssl.so;/usr/local/lib/libcrypto.so" \
26				      -DLWS_OPENSSL_INCLUDE_DIRS="/usr/local/include/openssl" $CMAKE_ARGS .. &&
27				cmake --build . &&
28				sudo make install &&
29				../scripts/autobahn-test-server.sh
30			else
31				if [ "$LWS_METHOD" = "smp" ] ; then
32					cmake -DLWS_OPENSSL_LIBRARIES="/usr/local/lib/libssl.so;/usr/local/lib/libcrypto.so" \
33					      -DLWS_OPENSSL_INCLUDE_DIRS="/usr/local/include/openssl" $CMAKE_ARGS .. &&
34					cmake --build . &&
35					../scripts/h2load-smp.sh
36				else
37					if [ "$LWS_METHOD" = "mbedtls" -o "$LWS_METHOD" = "ss+mbedtls" ] ; then
38						cmake $CMAKE_ARGS .. &&
39						cmake --build . &&
40						sudo make install &&
41						../minimal-examples/selftests.sh &&
42						../scripts/h2spec.sh &&
43						../scripts/h2load.sh &&
44						../scripts/attack.sh
45					else
46						cmake $CMAKE_ARGS .. &&
47						cmake --build .
48					fi
49				fi
50			fi
51		fi
52	fi
53fi
54
55