11# Tests Makefile
22# End-to-end test targets
33
4- # Go binary
5- GO := go
4+ # Copyright (c) 2025, NVIDIA CORPORATION. All rights reserved.
5+ #
6+ # Licensed under the Apache License, Version 2.0 (the "License");
7+ # you may not use this file except in compliance with the License.
8+ # You may obtain a copy of the License at
9+ #
10+ # http://www.apache.org/licenses/LICENSE-2.0
11+ #
12+ # Unless required by applicable law or agreed to in writing, software
13+ # distributed under the License is distributed on an "AS IS" BASIS,
14+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+ # See the License for the specific language governing permissions and
16+ # limitations under the License.
17+
18+ # =============================================================================
19+ # MODULE-SPECIFIC CONFIGURATION
20+ # =============================================================================
21+
22+ # E2E Tests module configuration
23+ IS_GO_MODULE := 1
24+ TEST_EXTRA_FLAGS := -timeout 40m -count 1 -failfast
25+
26+ # =============================================================================
27+ # INCLUDE COMMON DEFINITIONS
28+ # =============================================================================
29+
30+ include ../make/common.mk
31+ include ../make/go.mk
32+
33+ # =============================================================================
34+ # E2E-SPECIFIC TARGETS
35+ # =============================================================================
636
737# Default target
838.PHONY : all
939all : test
1040
41+ .PHONY : lint-test
42+ lint-test : lint # # Run linting only (override go.mk comprehensive version)
43+ @echo " Linting complete for $( MODULE_NAME) "
44+
1145# Run end-to-end tests in CI
1246.PHONY : test-ci
1347test-ci :
@@ -21,18 +55,27 @@ test-ci:
2155 kubectl rollout status deployment/fault-quarantine -n nvsentinel --timeout=10m
2256 $(MAKE ) test
2357
24- # Run end-to-end tests
58+ # Run end-to-end tests (override standard test to use gotestsum with custom format)
2559.PHONY : test
26- test :
27- gotestsum --format standard-verbose -- -timeout 40m -count 1 -failfast ./...
60+ test : # # Run end-to-end tests
61+ @echo " Running end-to-end tests on $( MODULE_NAME) ..."
62+ $(GOTESTSUM ) --format standard-verbose -- $(TEST_EXTRA_FLAGS ) ./... -coverprofile=coverage.txt -covermode atomic -coverpkg=github.com/nvidia/nvsentinel/$(MODULE_NAME ) /...
2863
29- # Help target
30- .PHONY : help
31- help :
32- @echo " Tests Makefile - Simple end-to-end test execution"
64+ # =============================================================================
65+ # MODULE HELP
66+ # =============================================================================
67+
68+ help : # # Show help for available targets
69+ @echo " Tests Makefile - E2E test execution with standard linting"
70+ @echo " "
71+ @echo " Standard targets from go.mk:"
72+ @echo " lint-test - Lint and test Go module (vet + golangci-lint + gotestsum)"
73+ @echo " lint - Run golangci-lint"
74+ @echo " vet - Run go vet"
75+ @echo " test - Run end-to-end tests with coverage"
76+ @echo " clean - Clean build artifacts"
3377 @echo " "
34- @echo " Targets :"
78+ @echo " E2E-specific targets :"
3579 @echo " all - Run test (default)"
3680 @echo " test-ci - Run end-to-end tests in CI environment"
37- @echo " test - Run end-to-end tests"
3881 @echo " help - Show this help message"
0 commit comments