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