From 4cb39f7fd9a3557f2b3157ae90e5ea8fbd36f702 Mon Sep 17 00:00:00 2001 From: Fiachra Corcoran Date: Tue, 14 May 2024 15:21:54 +0100 Subject: [PATCH] Fix presubmit unit test run --- .prow.yaml | 13 +------------ Makefile | 8 -------- default-go-test.mk | 2 +- 3 files changed, 2 insertions(+), 21 deletions(-) diff --git a/.prow.yaml b/.prow.yaml index 9eed387f..2849fd39 100644 --- a/.prow.yaml +++ b/.prow.yaml @@ -1,7 +1,7 @@ presubmits: - name: presubmit-nephio-go-test decorate: true - run_if_changed: "(\\.go|Makefile)$" + run_if_changed: "(\\.go|Makefile|\\.mk)$" spec: containers: - image: nephio/gotests:1782782171367346176 @@ -9,14 +9,3 @@ presubmits: - make args: - ci-unit - - name: presubmit-porch-e2e - decorate: true - optional: true - run_if_changed: "(\\.go|Makefile)$" - spec: - containers: - - image: nephio/gotests:1782782171367346176 - command: - - make - args: - - ci-test-porch diff --git a/Makefile b/Makefile index 70fa7c2a..f8acabb8 100644 --- a/Makefile +++ b/Makefile @@ -159,19 +159,11 @@ generate: generate-api tidy: @for f in $(MODULES); do (cd $$f; echo "Tidying $$f"; go mod tidy) || exit 1; done -.PHONY: test-porch -test-porch: - #@for f in $(MODULES); do (cd $$f; echo "Testing $$f"; E2E=1 go test -v -race --count=1 ./...) || exit 1; done - @for f in $(MODULES); do (cd $$f; echo "Testing $$f"; go test -v -race --count=1 ./...) || exit 1; done - .PHONY: configure-git configure-git: git config --global --add user.name test git config --global --add user.email test@nephio.org -.PHONY: ci-test-porch -ci-test-porch: configure-git test-porch - .PHONY: ci-unit ci-unit: configure-git test diff --git a/default-go-test.mk b/default-go-test.mk index b7f9cbfa..b85b9a87 100644 --- a/default-go-test.mk +++ b/default-go-test.mk @@ -42,4 +42,4 @@ unit-clean: ## Clean up the artifacts created by the unit tests ifeq ($(CONTAINER_RUNNABLE), 0) $(CONTAINER_RUNTIME) system prune -f endif - rm ${TEST_COVERAGE_FILE} ${TEST_COVERAGE_HTML_FILE} ${TEST_COVERAGE_FUNC_FILE} > /dev/null 2>&1 + rm -f ${TEST_COVERAGE_FILE} ${TEST_COVERAGE_HTML_FILE} ${TEST_COVERAGE_FUNC_FILE} > /dev/null 2>&1