Skip to content

Commit

Permalink
PR(UNRELATED): Add rules to quickly run sub-tests
Browse files Browse the repository at this point in the history
  • Loading branch information
shahzadlone committed Sep 28, 2023
1 parent 1495223 commit a1c67cb
Showing 1 changed file with 24 additions and 10 deletions.
34 changes: 24 additions & 10 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -229,12 +229,36 @@ test\:http:
test\:names:
gotestsum --format testname -- $(DEFAULT_TEST_DIRECTORIES) $(TEST_FLAGS)

.PHONY: test\:lens
test\:lens:
@$(MAKE) deps:lens
gotestsum --format testname -- ./$(LENS_TEST_DIRECTORY)/... $(TEST_FLAGS)

.PHONY: test\:lens-quick
test\:lens-quick:
@$(MAKE) deps:lens
gotestsum --format testname -- ./$(LENS_TEST_DIRECTORY)/...

.PHONY: test\:cli
test\:cli:
gotestsum --format testname -- ./$(CLI_TEST_DIRECTORY)/... $(TEST_FLAGS)

.PHONY: test\:cli-quick
test\:cli-quick:
gotestsum --format testname -- ./$(CLI_TEST_DIRECTORY)/...

.PHONY: test\:all
test\:all:
@$(MAKE) test:names
@$(MAKE) test:lens
@$(MAKE) test:cli

.PHONY: test\:all-quick
test\:all-quick:
@$(MAKE) test:quick
@$(MAKE) test:lens-quick
@$(MAKE) test:cli-quick

.PHONY: test\:verbose
test\:verbose:
gotestsum --format standard-verbose -- $(DEFAULT_TEST_DIRECTORIES) $(TEST_FLAGS)
Expand All @@ -259,16 +283,6 @@ test\:bench-short:
test\:scripts:
@$(MAKE) -C ./tools/scripts/ test

.PHONY: test\:lens
test\:lens:
@$(MAKE) deps:lens
gotestsum --format testname -- ./$(LENS_TEST_DIRECTORY)/... $(TEST_FLAGS)

.PHONY: test\:cli
test\:cli:
@$(MAKE) deps:lens
gotestsum --format testname -- ./$(CLI_TEST_DIRECTORY)/... $(TEST_FLAGS)

# Using go-acc to ensure integration tests are included.
# Usage: `make test:coverage` or `make test:coverage path="{pathToPackage}"`
# Example: `make test:coverage path="./api/..."`
Expand Down

0 comments on commit a1c67cb

Please sign in to comment.