Skip to content

Commit 8c2a813

Browse files
committed
Fix testing plugin Makefile override warning
1 parent ea253f8 commit 8c2a813

2 files changed

Lines changed: 6 additions & 0 deletions

File tree

plugins.mk

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,20 @@
1010
# - build-examples: build the plugin examples binaries
1111
# - clean: clean the plugin examples binaries
1212
#
13+
# Set PLUGIN_CUSTOM_TEST=1 before including this file when the plugin Makefile
14+
# defines its own test target.
15+
#
1316
# Targets:
1417
# - "all" calls "gen", "test", "lint", "build-examples" and "clean"
1518
# - "lint" runs the linter and checks the code format using goimports
1619
# - "test" runs the tests
1720

1821
all: gen test lint build-examples clean
1922

23+
ifndef PLUGIN_CUSTOM_TEST
2024
test:
2125
@go test ./...
26+
endif
2227

2328
lint:
2429
$(eval GO_FILES := $(shell find . -type f -name '*.go' ! -name '*.pb.go'))

testing/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77

88
# Include the common plugin makefile
99
PLUGIN_DIR := $(dir $(abspath $(lastword $(MAKEFILE_LIST))))
10+
PLUGIN_CUSTOM_TEST := 1
1011
include ../plugins.mk
1112

1213
gen:

0 commit comments

Comments
 (0)