mirror of
https://github.com/warmcat/libwebsockets.git
synced 2025-03-09 00:00:04 +01:00
travis: refactor the yml and add smp-specific tests
This commit is contained in:
parent
7c0a2ae633
commit
25e27d76d1
5 changed files with 108 additions and 1 deletions
|
@ -30,7 +30,7 @@ install:
|
|||
# - Rscript -e 'covr::coveralls()'
|
||||
|
||||
script:
|
||||
- if [ "$COVERITY_SCAN_BRANCH" != 1 -a "$TRAVIS_OS_NAME" = "osx" ]; then mkdir build && cd build && cmake -DOPENSSL_ROOT_DIR="/usr/local/opt/openssl" $CMAKE_ARGS .. && cmake --build .; else if [ "$COVERITY_SCAN_BRANCH" != 1 -a "$TRAVIS_OS_NAME" = "linux" ]; then mkdir build && cd build && if [ "$LWS_METHOD" = "lwsws" ] ; then cmake -DLWS_OPENSSL_LIBRARIES="/usr/local/lib/libssl.so;/usr/local/lib/libcrypto.so" -DLWS_OPENSSL_INCLUDE_DIRS="/usr/local/include/openssl" $CMAKE_ARGS .. && cmake --build . && sudo make install && ../minimal-examples/selftests.sh && ../scripts/h2spec.sh && ../test-apps/attack.sh && ../scripts/h2load.sh && ../scripts/autobahn-test.sh ; else cmake $CMAKE_ARGS .. && cmake --build . ; fi ; fi ; fi
|
||||
- ./scripts/travis_control.sh
|
||||
sudo: required
|
||||
dist: trusty
|
||||
addons:
|
||||
|
|
|
@ -22,6 +22,7 @@ Autobahn Server|480|Testing lws ws client, including permessage-deflate
|
|||
Autobahn Client|480|Testing lws ws server, including permaessage-deflate
|
||||
h2spec|146|Http/2 server compliance suite (in strict mode)
|
||||
h2load|6|Http/2 server load tool (checks 10K / 100K in h1 and h2, at 1, 10, 100 concurrency)
|
||||
h2load SMP|6|Http/2 and http/1.1 server load checks on SMP server build
|
||||
|
||||
The over 1,400 tests run on every commit take most of an hour to complete.
|
||||
If any problems are found, it breaks the travis build, generating an email.
|
||||
|
|
63
scripts/h2load-smp.sh
Executable file
63
scripts/h2load-smp.sh
Executable file
|
@ -0,0 +1,63 @@
|
|||
#!/bin/bash
|
||||
#
|
||||
# run from the build dir
|
||||
|
||||
echo
|
||||
echo "----------------------------------------------"
|
||||
echo "------- tests: h2load SMP"
|
||||
echo
|
||||
|
||||
PW=`pwd`
|
||||
|
||||
cd ../minimal-examples/http-server/minimal-http-server-smp
|
||||
$PW/bin/lws-minimal-http-server-smp -s &
|
||||
R=$!
|
||||
sleep 0.5s
|
||||
|
||||
# check h1 with various loads
|
||||
|
||||
h2load -n 10000 -c 1 --h1 https://127.0.0.1:7681
|
||||
if [ $? -ne 0 ] ; then
|
||||
Q=$?
|
||||
kill $R
|
||||
wait $R
|
||||
exit $Q
|
||||
fi
|
||||
h2load -n 10000 -c 10 --h1 https://127.0.0.1:7681
|
||||
if [ $? -ne 0 ] ; then
|
||||
Q=$?
|
||||
kill $R
|
||||
wait $R
|
||||
exit $Q
|
||||
fi
|
||||
h2load -n 100000 -c 100 --h1 https://127.0.0.1:7681
|
||||
if [ $? -ne 0 ] ; then
|
||||
Q=$?
|
||||
kill $R
|
||||
wait $R
|
||||
exit $Q
|
||||
fi
|
||||
|
||||
# check h2 with various loads
|
||||
|
||||
h2load -n 10000 -c 1 https://127.0.0.1:7681
|
||||
if [ $? -ne 0 ] ; then
|
||||
Q=$?
|
||||
kill $R
|
||||
wait $R
|
||||
exit $Q
|
||||
fi
|
||||
h2load -n 10000 -c 10 https://127.0.0.1:7681
|
||||
if [ $? -ne 0 ] ; then
|
||||
Q=$?
|
||||
kill $R
|
||||
wait $R
|
||||
exit $Q
|
||||
fi
|
||||
h2load -n 100000 -c 100 https://127.0.0.1:7681
|
||||
Q=$?
|
||||
|
||||
kill $R
|
||||
wait $R
|
||||
exit $Q
|
||||
|
33
scripts/travis_control.sh
Executable file
33
scripts/travis_control.sh
Executable file
|
@ -0,0 +1,33 @@
|
|||
#/bin/bash
|
||||
|
||||
if [ "$COVERITY_SCAN_BRANCH" != 1 -a "$TRAVIS_OS_NAME" = "osx" ]; then
|
||||
mkdir build && cd build &&
|
||||
cmake -DOPENSSL_ROOT_DIR="/usr/local/opt/openssl" $CMAKE_ARGS .. &&
|
||||
cmake --build .
|
||||
else
|
||||
if [ "$COVERITY_SCAN_BRANCH" != 1 -a "$TRAVIS_OS_NAME" = "linux" ]; then
|
||||
mkdir build && cd build &&
|
||||
if [ "$LWS_METHOD" = "lwsws" ] ; then
|
||||
cmake -DLWS_OPENSSL_LIBRARIES="/usr/local/lib/libssl.so;/usr/local/lib/libcrypto.so" \
|
||||
-DLWS_OPENSSL_INCLUDE_DIRS="/usr/local/include/openssl" $CMAKE_ARGS .. &&
|
||||
cmake --build . &&
|
||||
sudo make install &&
|
||||
../minimal-examples/selftests.sh &&
|
||||
../scripts/h2spec.sh &&
|
||||
../test-apps/attack.sh &&
|
||||
../scripts/h2load.sh &&
|
||||
../scripts/autobahn-test.sh
|
||||
else
|
||||
if [ "$LWS_METHOD" = "smp" ] ; then
|
||||
cmake -DLWS_OPENSSL_LIBRARIES="/usr/local/lib/libssl.so;/usr/local/lib/libcrypto.so" \
|
||||
-DLWS_OPENSSL_INCLUDE_DIRS="/usr/local/include/openssl" $CMAKE_ARGS .. &&
|
||||
cmake --build . &&
|
||||
../scripts/h2load-smp.sh
|
||||
else
|
||||
cmake $CMAKE_ARGS .. &&
|
||||
cmake --build .
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
|
@ -21,6 +21,16 @@ then
|
|||
sudo update-ca-certificates
|
||||
fi
|
||||
|
||||
if [ "$LWS_METHOD" == "smp" ];
|
||||
then
|
||||
sudo apt-get install -y -qq realpath libjemalloc1 libev4
|
||||
wget https://libwebsockets.org/openssl-1.1.0-trusty.tar.bz2 -O/tmp/openssl.tar.bz2
|
||||
cd /
|
||||
sudo tar xf /tmp/openssl.tar.bz2
|
||||
sudo ldconfig
|
||||
sudo update-ca-certificates
|
||||
fi
|
||||
|
||||
if [ "$LWS_METHOD" == "libev" ];
|
||||
then
|
||||
sudo apt-get install -y -qq libev-dev;
|
||||
|
|
Loading…
Add table
Reference in a new issue