frp/hack/run-e2e.sh

35 lines
837 B
Bash
Raw Normal View History

#!/bin/sh
2020-06-02 22:48:55 +08:00
SCRIPT=$(readlink -f "$0")
ROOT=$(unset CDPATH && cd "$(dirname "$SCRIPT")/.." && pwd)
2020-06-02 22:48:55 +08:00
ginkgo_command=$(which ginkgo 2>/dev/null)
if [ -z "$ginkgo_command" ]; then
2020-06-02 22:48:55 +08:00
echo "ginkgo not found, try to install..."
2023-09-13 16:32:39 +08:00
go install github.com/onsi/ginkgo/v2/ginkgo@v2.11.0
2020-06-02 22:48:55 +08:00
fi
2020-09-07 14:57:23 +08:00
debug=false
if [ "x${DEBUG}" = "xtrue" ]; then
2020-09-07 14:57:23 +08:00
debug=true
fi
2021-06-18 16:48:36 +08:00
logLevel=debug
if [ "${LOG_LEVEL}" ]; then
logLevel="${LOG_LEVEL}"
2021-06-18 16:48:36 +08:00
fi
frpcPath=${ROOT}/bin/frpc
if [ "${FRPC_PATH}" ]; then
frpcPath="${FRPC_PATH}"
fi
frpsPath=${ROOT}/bin/frps
if [ "${FRPS_PATH}" ]; then
frpsPath="${FRPS_PATH}"
fi
concurrency="12"
if [ "${CONCURRENCY}" ]; then
concurrency="${CONCURRENCY}"
fi
ginkgo -nodes=${concurrency} --poll-progress-after=60s ${ROOT}/test/e2e -- -frpc-path=${frpcPath} -frps-path=${frpsPath} -log-level=${logLevel} -debug=${debug}