Skip to content

Commit

Permalink
Merge pull request #638 from YaoZengzeng/run-tests
Browse files Browse the repository at this point in the history
enable select some e2e cases to run or skip some cases
  • Loading branch information
kmesh-bot authored Jul 26, 2024
2 parents 7069d8c + 4a7807b commit cd60b90
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
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"

0 comments on commit cd60b90

Please sign in to comment.