Skip to content

Commit

Permalink
Fix presubmit unit test run
Browse files Browse the repository at this point in the history
  • Loading branch information
efiacor committed May 14, 2024
1 parent ba02a03 commit 4cb39f7
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 21 deletions.
13 changes: 1 addition & 12 deletions .prow.yaml
Original file line number Diff line number Diff line change
@@ -1,22 +1,11 @@
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
command:
- 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
8 changes: 0 additions & 8 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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 [email protected]

.PHONY: ci-test-porch
ci-test-porch: configure-git test-porch

.PHONY: ci-unit
ci-unit: configure-git test

Expand Down
2 changes: 1 addition & 1 deletion default-go-test.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 4cb39f7

Please sign in to comment.