Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

enable select some e2e cases to run or skip some cases #638

Merged
merged 3 commits into from
Jul 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/proposal/e2e.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
14 changes: 13 additions & 1 deletion test/e2e/run_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,8 @@ function install_dependencies() {
rm -rf istio-${ISTIO_VERSION}
}

PARAMS=""

while (( "$#" )); do
case "$1" in
--skip-install-dep)
Expand All @@ -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

Expand All @@ -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"
Loading