Skip to content

Commit

Permalink
Merge pull request #50 from Nordix/clean_up_unit_test_flow
Browse files Browse the repository at this point in the history
Fix presubmit unit test run
  • Loading branch information
radoslawc authored May 14, 2024
2 parents 7d7a815 + 4cb39f7 commit 1754fc8
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 test@nephio.org

.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 1754fc8

Please sign in to comment.