Skip to content
Snippets Groups Projects
Commit 25e27d76 authored by Andy Green's avatar Andy Green
Browse files

travis: refactor the yml and add smp-specific tests

parent 7c0a2ae6
Branches
Tags
No related merge requests found
...@@ -30,7 +30,7 @@ install: ...@@ -30,7 +30,7 @@ install:
# - Rscript -e 'covr::coveralls()' # - Rscript -e 'covr::coveralls()'
script: 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 sudo: required
dist: trusty dist: trusty
addons: addons:
......
...@@ -22,6 +22,7 @@ Autobahn Server|480|Testing lws ws client, including permessage-deflate ...@@ -22,6 +22,7 @@ Autobahn Server|480|Testing lws ws client, including permessage-deflate
Autobahn Client|480|Testing lws ws server, including permaessage-deflate Autobahn Client|480|Testing lws ws server, including permaessage-deflate
h2spec|146|Http/2 server compliance suite (in strict mode) 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|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. 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. If any problems are found, it breaks the travis build, generating an email.
......
#!/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
#/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 ...@@ -21,6 +21,16 @@ then
sudo update-ca-certificates sudo update-ca-certificates
fi 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" ]; if [ "$LWS_METHOD" == "libev" ];
then then
sudo apt-get install -y -qq libev-dev; sudo apt-get install -y -qq libev-dev;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment