diff --git a/docs/proposal/e2e.md b/docs/proposal/e2e.md index b2b5079f6..debe7e04a 100644 --- a/docs/proposal/e2e.md +++ b/docs/proposal/e2e.md @@ -101,3 +101,4 @@ For example, if we want to repeatedly run the E2E test locally, then except for ```bash ./test/e2e/run_test.sh --only-run-tests ``` +NOTE: As the Kmesh E2E test framework is still evolving rapidly, please refer to the [official doc](https://kmesh.net/en/docs/developer/e2e-guide/) for more complete and fresh usage. diff --git a/test/e2e/run_test.sh b/test/e2e/run_test.sh index e260f3d3b..bd4e2ed2c 100755 --- a/test/e2e/run_test.sh +++ b/test/e2e/run_test.sh @@ -184,6 +184,8 @@ function install_dependencies() { rm -rf istio-${ISTIO_VERSION} } +PARAMS="" + while (( "$#" )); do case "$1" in --skip-install-dep) @@ -208,6 +210,14 @@ while (( "$#" )); do IPV6=true shift ;; + --select-cases) + PARAMS+="-test.run \"$2\"" + shift 2 + ;; + --skip-cases) + PARAMS+="-test.skip \"$2\"" + shift 2 + ;; esac done @@ -230,4 +240,6 @@ if [[ -z "${SKIP_SETUP:-}" ]]; then setup_kmesh fi -go test -v -tags=integ $ROOT_DIR/test/e2e/... -count=1 +cmd="go test -v -tags=integ $ROOT_DIR/test/e2e/... -count=1 $PARAMS" + +bash -c "$cmd"