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 14, 2023
1 parent bc31092 commit 33d5f6a
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 @@ -228,12 +228,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 @@ -258,16 +282,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 33d5f6a

Please sign in to comment.