aboutsummaryrefslogtreecommitdiff
path: root/openssl/test
diff options
context:
space:
mode:
authorSteven Fackler <[email protected]>2015-04-08 21:52:54 -0700
committerSteven Fackler <[email protected]>2015-04-08 21:52:54 -0700
commit483e0b1f0a8c844ab214f0f1e3724af4f7f25026 (patch)
treeb623e4785ca98eb256daf419734c97121f202a27 /openssl/test
parentMerge pull request #179 from manuels/dtls (diff)
downloadrust-openssl-483e0b1f0a8c844ab214f0f1e3724af4f7f25026.tar.xz
rust-openssl-483e0b1f0a8c844ab214f0f1e3724af4f7f25026.zip
Clean up build infrastructure
Diffstat (limited to 'openssl/test')
-rwxr-xr-xopenssl/test/build.sh10
-rwxr-xr-xopenssl/test/test.sh18
2 files changed, 20 insertions, 8 deletions
diff --git a/openssl/test/build.sh b/openssl/test/build.sh
new file mode 100755
index 00000000..27def60a
--- /dev/null
+++ b/openssl/test/build.sh
@@ -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
diff --git a/openssl/test/test.sh b/openssl/test/test.sh
index c61511fd..ef2294ef 100755
--- a/openssl/test/test.sh
+++ b/openssl/test/test.sh
@@ -1,18 +1,20 @@
#!/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
return
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
- echo hello | openssl s_server -accept $port -dtls1 -cert openssl/test/cert.pem \
- -key openssl/test/key.pem 2>&1 >/dev/null &
+ echo hello | openssl s_server -accept $port -dtls1 -cert cert.pem \
+ -key key.pem 2>&1 >/dev/null &
done
# the server for the test ssl::tests::test_write_dtlsv1 must wait to receive
# data from the client
-yes | openssl s_server -accept 15410 -dtls1 -cert openssl/test/cert.pem \
- -key openssl/test/key.pem 2>&1 >/dev/null
+yes | openssl s_server -accept 15410 -dtls1 -cert cert.pem -key key.pem 2>&1 >/dev/null &