Clean up build infrastructure

This commit is contained in:
Steven Fackler 2015-04-08 21:52:54 -07:00
parent 11059e1b2d
commit 483e0b1f0a
3 changed files with 22 additions and 21 deletions

View File

@ -7,23 +7,12 @@ env:
- secure: J4i75AV4KMrU/UQrLIzzIh35Xix40Ki0uWjm8j05oxlXVl5aPU2zB30AemDne2QXYzkN4kRG/iRnNORE/8D0lF7YipQNSNxgfiBVoOEfj/NSogvI2BftYX9vlLZJUvt+s/nbE3xa/Pyge1IPv7itDYGO7SMe8RTSqitgqyfE2Eg= - secure: J4i75AV4KMrU/UQrLIzzIh35Xix40Ki0uWjm8j05oxlXVl5aPU2zB30AemDne2QXYzkN4kRG/iRnNORE/8D0lF7YipQNSNxgfiBVoOEfj/NSogvI2BftYX9vlLZJUvt+s/nbE3xa/Pyge1IPv7itDYGO7SMe8RTSqitgqyfE2Eg=
- FEATURES="tlsv1_1 tlsv1_2 dtlsv1 aes_xts npn" - FEATURES="tlsv1_1 tlsv1_2 dtlsv1 aes_xts npn"
before_install: before_install:
- DIR=`pwd` - (test $TRAVIS_OS_NAME == "osx" || ./openssl/test/build.sh)
- (test $TRAVIS_OS_NAME == "osx" || (sudo apt-get install gcc make))
- (test $TRAVIS_OS_NAME == "osx" || (wget https://openssl.org/source/openssl-1.0.2-latest.tar.gz -O /tmp/openssl-1.0.2-latest.tar.gz))
- (test $TRAVIS_OS_NAME == "osx" || (cd /tmp && tar xzf openssl-1.0.2-latest.tar.gz))
- (test $TRAVIS_OS_NAME == "osx" || (cd /tmp/openssl-1.0.2*/ && ./config --prefix=/usr/ shared))
- (test $TRAVIS_OS_NAME == "osx" || (cd /tmp/openssl-1.0.2*/ && make))
- (test $TRAVIS_OS_NAME == "osx" || (cd /tmp/openssl-1.0.2*/ && sudo make install))
- cd ${DIR}
before_script: before_script:
- openssl version - ./openssl/test/test.sh
- openssl s_server -accept 15418 -www -cert openssl/test/cert.pem -key openssl/test/key.pem >/dev/null 2>&1 &
- openssl s_server -accept 15419 -www -cert openssl/test/cert.pem -key openssl/test/key.pem -nextprotoneg "http/1.1,spdy/3.1" >/dev/null 2>&1 &
script: script:
- (cd openssl && LD_LIBRARY_PATH=/usr/lib:$LD_LIBRARY_PATH cargo test) - (cd openssl && LD_LIBRARY_PATH=/usr/lib:$LD_LIBRARY_PATH cargo test)
- (test $TRAVIS_OS_NAME == "osx" || (./openssl/test/test.sh &))
- (test $TRAVIS_OS_NAME == "osx" || (cd openssl && LD_LIBRARY_PATH=/usr/lib:$LD_LIBRARY_PATH cargo test --features "$FEATURES")) - (test $TRAVIS_OS_NAME == "osx" || (cd openssl && LD_LIBRARY_PATH=/usr/lib:$LD_LIBRARY_PATH cargo test --features "$FEATURES"))
- (test $TRAVIS_OS_NAME == "osx" || killall openssl)
- ./.travis/build_docs.sh - ./.travis/build_docs.sh
after_success: after_success:
- test $TRAVIS_PULL_REQUEST == "false" && test $TRAVIS_BRANCH == "master" && ./.travis/update_docs.sh - test $TRAVIS_PULL_REQUEST == "false" && test $TRAVIS_BRANCH == "master" && ./.travis/update_docs.sh

10
openssl/test/build.sh Executable file
View File

@ -0,0 +1,10 @@
#!/bin/bash
set -e
mkdir /tmp/openssl
cd /tmp/openssl
sudo apt-get install gcc make
curl https://openssl.org/source/openssl-1.0.2-latest.tar.gz | tar --strip-components=1 -xzf -
./config --prefix=/usr/ shared
make
sudo make install

View File

@ -1,18 +1,20 @@
#!/bin/bash #!/bin/bash
cd $(dirname $0)
openssl s_server -accept 15418 -www -cert cert.pem -key key.pem >/dev/null 2>&1 &
openssl s_server -accept 15419 -www -cert cert.pem -key key.pem \
-nextprotoneg "http/1.1,spdy/3.1" >/dev/null 2>&1 &
if test "$TRAVIS_OS_NAME" == "osx"; then if test "$TRAVIS_OS_NAME" == "osx"; then
return return
fi fi
trap "trap - SIGTERM && kill -- -$$" SIGINT SIGTERM EXIT
openssl s_server -accept 15418 -www -cert openssl/test/cert.pem -key openssl/test/key.pem >/dev/null 2>&1 &
for port in `seq 15411 15430`; do for port in `seq 15411 15430`; do
echo hello | openssl s_server -accept $port -dtls1 -cert openssl/test/cert.pem \ echo hello | openssl s_server -accept $port -dtls1 -cert cert.pem \
-key openssl/test/key.pem 2>&1 >/dev/null & -key key.pem 2>&1 >/dev/null &
done done
# the server for the test ssl::tests::test_write_dtlsv1 must wait to receive # the server for the test ssl::tests::test_write_dtlsv1 must wait to receive
# data from the client # data from the client
yes | openssl s_server -accept 15410 -dtls1 -cert openssl/test/cert.pem \ yes | openssl s_server -accept 15410 -dtls1 -cert cert.pem -key key.pem 2>&1 >/dev/null &
-key openssl/test/key.pem 2>&1 >/dev/null