-
Notifications
You must be signed in to change notification settings - Fork 124
/
interop.sh
executable file
·42 lines (35 loc) · 1.12 KB
/
interop.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#!/bin/bash
/setup.sh
set -ex
export PATH="${PATH}:/neqo/bin"
[ -n "$TESTCASE" ]
[ -n "$QLOGDIR" ]
case "$ROLE" in
client)
/wait-for-it.sh sim:57832 -s -t 30
OPTIONS=(--cc cubic --qns-test "$TESTCASE" --qlog-dir "$QLOGDIR" --output-dir /downloads)
if [ "$REQUESTS" ]; then
mapfile -d ' ' -t URLS <<<"$REQUESTS"
OPTIONS+=("${URLS[@]}")
fi
RUST_LOG=debug RUST_BACKTRACE=1 neqo-client "${OPTIONS[@]}" 2> >(tee -i -a "/logs/$ROLE.log" >&2)
;;
server)
DB=/neqo/db
CERT=cert
P12CERT=$(mktemp)
mkdir -p "$DB"
certutil -N -d "sql:$DB" --empty-password
openssl pkcs12 -export -nodes -in /certs/cert.pem -inkey /certs/priv.key \
-name "$CERT" -passout pass: -out "$P12CERT"
pk12util -d "sql:$DB" -i "$P12CERT" -W ''
certutil -L -d "sql:$DB" -n "$CERT"
OPTIONS=(--cc cubic --qns-test "$TESTCASE" --qlog-dir "$QLOGDIR" -d "$DB" -k "$CERT")
[ "$TESTCASE" = "connectionmigration" ] &&
OPTIONS+=(--preferred-address-v4 server4:4443 --preferred-address-v6 server6:4443)
RUST_LOG=debug RUST_BACKTRACE=1 neqo-server "${OPTIONS[@]}" '[::]:443' 2> >(tee -i -a "/logs/$ROLE.log" >&2)
;;
*)
exit 1
;;
esac