Skip to content

Commit 824a3c2

Browse files
committed
make: add ability to specify unit test case
This commit let's us specify commands of the form: `make unit case=TestNameHere`. Note that this commit by itself is not very useful in LiT since there are no tests in the main `terminal` package. A later commit will let us set a package name too and then this will be more useful.
1 parent 43e1c9e commit 824a3c2

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

make/testing_flags.mk

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,17 @@
11
include make/compile_flags.mk
22

33
ITEST_FLAGS =
4+
TEST_FLAGS =
45

56
# Define the integration test.run filter if the icase argument was provided.
67
ifneq ($(icase),)
78
ITEST_FLAGS += -test.run="TestLightningTerminal/$(icase)"
89
endif
910

10-
UNIT := $(GOLIST) | $(XARGS) env $(GOTEST) -tags="$(COMPILE_TAGS)"
11+
# If a specific unit test case is being targeted, construct test.run filter.
12+
ifneq ($(case),)
13+
TEST_FLAGS += -test.run=$(case)
14+
endif
15+
16+
UNIT := $(GOLIST) | $(XARGS) env $(GOTEST) -tags="$(COMPILE_TAGS)" $(TEST_FLAGS)
1117
UNIT_RACE := $(UNIT) -race

0 commit comments

Comments
 (0)