Skip to content

Commit 4e49ed2

Browse files
compudjKAGA-KOKO
authored andcommitted
selftests/lib.mk: Introduce OVERRIDE_TARGETS
Introduce OVERRIDE_TARGETS to allow tests to express dependencies on header files and .so, which require to override the selftests lib.mk targets. Signed-off-by: Mathieu Desnoyers <[email protected]> Signed-off-by: Thomas Gleixner <[email protected]> Acked-by: Shuah Khan <[email protected]> Cc: Joel Fernandes <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Catalin Marinas <[email protected]> Cc: Dave Watson <[email protected]> Cc: Will Deacon <[email protected]> Cc: Andi Kleen <[email protected]> Cc: [email protected] Cc: "H . Peter Anvin" <[email protected]> Cc: Chris Lameter <[email protected]> Cc: Russell King <[email protected]> Cc: Andrew Hunter <[email protected]> Cc: Michael Kerrisk <[email protected]> Cc: "Paul E . McKenney" <[email protected]> Cc: Paul Turner <[email protected]> Cc: Boqun Feng <[email protected]> Cc: Josh Triplett <[email protected]> Cc: Steven Rostedt <[email protected]> Cc: Ben Maurer <[email protected]> Cc: [email protected] Cc: Andy Lutomirski <[email protected]> Cc: Andrew Morton <[email protected]> Cc: Linus Torvalds <[email protected]> Link: https://lkml.kernel.org/r/[email protected]
1 parent bb862b0 commit 4e49ed2

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

tools/testing/selftests/lib.mk

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,9 @@ COMPILE.S = $(CC) $(ASFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -c
106106
LINK.S = $(CC) $(ASFLAGS) $(CPPFLAGS) $(LDFLAGS) $(TARGET_ARCH)
107107
endif
108108

109+
# Selftest makefiles can override those targets by setting
110+
# OVERRIDE_TARGETS = 1.
111+
ifeq ($(OVERRIDE_TARGETS),)
109112
$(OUTPUT)/%:%.c
110113
$(LINK.c) $^ $(LDLIBS) -o $@
111114

@@ -114,5 +117,6 @@ $(OUTPUT)/%.o:%.S
114117

115118
$(OUTPUT)/%:%.S
116119
$(LINK.S) $^ $(LDLIBS) -o $@
120+
endif
117121

118122
.PHONY: run_tests all clean install emit_tests

0 commit comments

Comments
 (0)