forked from google/certificate-transparency-go
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathct_hammer_test.sh
executable file
·30 lines (23 loc) · 1.04 KB
/
ct_hammer_test.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
#!/bin/bash
set -e
. "$(go list -f '{{ .Dir }}' github.com/google/trillian)"/integration/functions.sh
INTEGRATION_DIR="$( cd "$( dirname "$0" )" && pwd )"
. "${INTEGRATION_DIR}"/ct_functions.sh
# We're not using Trillian's log setup/turn down, so allow the caller to
# specify where the trillian log server is.
export RPC_SERVERS=${TRILLIAN_LOG_SERVERS:-localhost:8090}
export RPC_SERVER_1=${TRILLIAN_LOG_SERVER_1:-localhost:8090}
go build ${GOFLAGS} github.com/google/certificate-transparency-go/trillian/integration/ct_hammer
ct_prep_test 1
# Cleanup for the personality
TO_DELETE="${TO_DELETE} ${CT_CFG}"
TO_KILL+=(${CT_SERVER_PIDS[@]})
metrics_port=$(pick_unused_port)
echo "Running test(s) with metrics at localhost:${metrics_port}"
set +e
./ct_hammer --log_config "${CT_CFG}" --ct_http_servers=${CT_SERVERS} --mmd=30s --testdata_dir=$(go list -f '{{ .Dir }}' github.com/google/certificate-transparency-go)/trillian/testdata --metrics_endpoint="localhost:${metrics_port}" --logtostderr ${HAMMER_OPTS}
RESULT=$?
set -e
ct_stop_test
TO_KILL=()
exit $RESULT