...

Text file src/github.com/google/certificate-transparency-go/trillian/integration/ct_hammer_test.sh

Documentation: github.com/google/certificate-transparency-go/trillian/integration

     1#!/bin/bash
     2set -e
     3. "$(go list -f '{{ .Dir }}' github.com/google/trillian)"/integration/functions.sh
     4INTEGRATION_DIR="$( cd "$( dirname "$0" )" && pwd )"
     5. "${INTEGRATION_DIR}"/ct_functions.sh
     6
     7# We're not using Trillian's log setup/turn down, so allow the caller to
     8# specify where the trillian log server is.
     9export RPC_SERVERS=${TRILLIAN_LOG_SERVERS:-localhost:8090}
    10export RPC_SERVER_1=${TRILLIAN_LOG_SERVER_1:-localhost:8090}
    11
    12go build ${GOFLAGS} github.com/google/certificate-transparency-go/trillian/integration/ct_hammer
    13ct_prep_test 1
    14
    15# Cleanup for the personality
    16TO_DELETE="${TO_DELETE} ${CT_CFG}"
    17TO_KILL+=(${CT_SERVER_PIDS[@]})
    18
    19metrics_port=$(pick_unused_port)
    20echo "Running test(s) with metrics at localhost:${metrics_port}"
    21set +e
    22./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}
    23
    24RESULT=$?
    25set -e
    26
    27ct_stop_test
    28TO_KILL=()
    29
    30exit $RESULT

View as plain text