From 5aecbb8cf47cd2f87cf3d2b4e9ceb05d8b8e6744 Mon Sep 17 00:00:00 2001 From: Sajay Antony Date: Tue, 11 Apr 2023 00:02:11 +0000 Subject: [PATCH] Add make target for e2e Signed-off-by: Sajay Antony --- Makefile | 4 ++++ test/e2e/README.md | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index f93af9b07..355249301 100644 --- a/Makefile +++ b/Makefile @@ -35,6 +35,10 @@ LDFLAGS += -X $(PROJECT_PKG)/internal/version.GitTreeState=${GIT_DIRTY} test: tidy vendor check-encoding $(GO_EXE) test -race -v -coverprofile=coverage.txt -covermode=atomic ./... +.PHONY: teste2e +teste2e: + ./test/e2e/scripts/e2e.sh $(shell git rev-parse --show-toplevel) --clean + .PHONY: covhtml covhtml: open .cover/coverage.html diff --git a/test/e2e/README.md b/test/e2e/README.md index 5514b1c5a..26e7332a8 100644 --- a/test/e2e/README.md +++ b/test/e2e/README.md @@ -5,7 +5,8 @@ Install [git](https://git-scm.com/download/linux), [docker](https://docs.docker. ## Run E2E Script ```shell -$REPO_ROOT/test/e2e/scripts/e2e.sh $REPO_ROOT --clean # REPO_ROOT is root folder of oras CLI code +REPO_ROOT=$(git rev-parse --show-toplevel) # REPO_ROOT is root folder of oras CLI code +$REPO_ROOT/test/e2e/scripts/e2e.sh $REPO_ROOT --clean ``` If the tests fails with errors like `ginkgo: not found`, use below command to add GOPATH into the PATH variable