aboutsummaryrefslogtreecommitdiffstats
path: root/tools/testing
diff options
context:
space:
mode:
authorJoel Stanley <joel@jms.id.au>2018-10-29 07:23:49 -0400
committerMichael Ellerman <mpe@ellerman.id.au>2018-10-31 08:56:19 -0400
commitc39b79082a38a4f8c801790edecbbb4d62ed2992 (patch)
tree2b6891d0550175dbfa13bb9dab759da5e9257e25 /tools/testing
parent9c87156cce5a63735d1218f0096a65c50a7a32aa (diff)
selftests/powerpc/ptrace: Fix out-of-tree build
We should use TEST_GEN_PROGS, not TEST_PROGS. That tells the selftests makefile (lib.mk) that those tests are generated (built), and so it adds the $(OUTPUT) prefix for us, making the out-of-tree build work correctly. It also means we don't need our own clean rule, lib.mk does it. We also have to update the ptrace-pkey and core-pkey rules to use $(OUTPUT). Signed-off-by: Joel Stanley <joel@jms.id.au> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Diffstat (limited to 'tools/testing')
-rw-r--r--tools/testing/selftests/powerpc/ptrace/Makefile13
1 files changed, 4 insertions, 9 deletions
diff --git a/tools/testing/selftests/powerpc/ptrace/Makefile b/tools/testing/selftests/powerpc/ptrace/Makefile
index 9b35ca8e8f13..8d3f006c98cc 100644
--- a/tools/testing/selftests/powerpc/ptrace/Makefile
+++ b/tools/testing/selftests/powerpc/ptrace/Makefile
@@ -1,5 +1,5 @@
1# SPDX-License-Identifier: GPL-2.0 1# SPDX-License-Identifier: GPL-2.0
2TEST_PROGS := ptrace-gpr ptrace-tm-gpr ptrace-tm-spd-gpr \ 2TEST_GEN_PROGS := ptrace-gpr ptrace-tm-gpr ptrace-tm-spd-gpr \
3 ptrace-tar ptrace-tm-tar ptrace-tm-spd-tar ptrace-vsx ptrace-tm-vsx \ 3 ptrace-tar ptrace-tm-tar ptrace-tm-spd-tar ptrace-vsx ptrace-tm-vsx \
4 ptrace-tm-spd-vsx ptrace-tm-spr ptrace-hwbreak ptrace-pkey core-pkey \ 4 ptrace-tm-spd-vsx ptrace-tm-spr ptrace-hwbreak ptrace-pkey core-pkey \
5 perf-hwbreak ptrace-syscall 5 perf-hwbreak ptrace-syscall
@@ -7,14 +7,9 @@ TEST_PROGS := ptrace-gpr ptrace-tm-gpr ptrace-tm-spd-gpr \
7top_srcdir = ../../../../.. 7top_srcdir = ../../../../..
8include ../../lib.mk 8include ../../lib.mk
9 9
10all: $(TEST_PROGS)
11
12CFLAGS += -m64 -I../../../../../usr/include -I../tm -mhtm -fno-pie 10CFLAGS += -m64 -I../../../../../usr/include -I../tm -mhtm -fno-pie
13 11
14ptrace-pkey core-pkey: child.h 12$(OUTPUT)/ptrace-pkey $(OUTPUT)/core-pkey: child.h
15ptrace-pkey core-pkey: LDLIBS += -pthread 13$(OUTPUT)/ptrace-pkey $(OUTPUT)/core-pkey: LDLIBS += -pthread
16
17$(TEST_PROGS): ../harness.c ../utils.c ../lib/reg.S ptrace.h
18 14
19clean: 15$(TEST_GEN_PROGS): ../harness.c ../utils.c ../lib/reg.S ptrace.h
20 rm -f $(TEST_PROGS) *.o