File tree Expand file tree Collapse file tree 2 files changed +19
-5
lines changed Expand file tree Collapse file tree 2 files changed +19
-5
lines changed Original file line number Diff line number Diff line change @@ -213,7 +213,7 @@ docker.push: docker
213213
214214.PHONY : e2e
215215e2e :
216- ./test/e2e/run_test.sh
216+ ./test/e2e/run_test.sh --build-image-clean
217217
218218.PHONY : e2e-ipv6
219219e2e-ipv6 :
Original file line number Diff line number Diff line change @@ -371,6 +371,14 @@ while (("$#")); do
371371 PARAMS+=(" -istio.test.nocleanup" )
372372 shift
373373 ;;
374+ --build-image-clean)
375+ BUILD_IMAGE_CLEAN=true
376+ shift
377+ ;;
378+ --debug)
379+ DEBUG=true
380+ shift
381+ ;;
374382 * )
375383 PARAMS+=(" $1 " )
376384 shift
@@ -394,6 +402,11 @@ if [[ -z ${SKIP_BUILD:-} ]]; then
394402 install_kmeshctl
395403fi
396404
405+ if [[ ${BUILD_IMAGE_CLEAN:- false} == " true" ]]; then
406+ echo " Cleaning up build image: ghcr.io/kmesh-net/kmesh-build:latest"
407+ docker image rm -f ghcr.io/kmesh-net/kmesh-build:latest 2> /dev/null || true
408+ fi
409+
397410kubectl config use-context " kind-$NAME "
398411echo " Running tests in cluster '$NAME '"
399412
@@ -403,9 +416,10 @@ if [[ -z ${SKIP_SETUP:-} ]]; then
403416 setup_kmesh
404417fi
405418
406- setup_kmesh_log
407-
408- capture_pod_logs &
419+ if [[ ${DEBUG:- false} == " true" ]]; then
420+ setup_kmesh_log
421+ capture_pod_logs &
422+ fi
409423
410424cmd=" go test -v -tags=integ $ROOT_DIR /test/e2e/... -istio.test.kube.loadbalancer=false ${PARAMS[*]} "
411425
@@ -418,7 +432,7 @@ if [ $EXIT_CODE -ne 0 ]; then
418432 cat $LOGFILE
419433fi
420434
421- rm $LOGFILE
435+ rm rf $LOGFILE
422436
423437if [[ -n ${CLEANUP_KIND} ]]; then
424438 cleanup_kind_cluster
You can’t perform that action at this time.
0 commit comments