From 80d443e8876602be2c130f79c4de81e12e2a700d Mon Sep 17 00:00:00 2001 From: "bamvor.zhangjian@huawei.com" Date: Tue, 29 Nov 2016 19:55:51 +0800 Subject: selftests: add EXTRA_CLEAN for clean target Some testcases need the clean extra data after running. This patch introduce the "EXTRA_CLEAN" variable to address this requirement. After KBUILD_OUTPUT is enabled in later patch, it will be easy to decide to if we need do the cleanup in the KBUILD_OUTPUT path(if the testcase ran immediately after compiled). Signed-off-by: Bamvor Jian Zhang Signed-off-by: Shuah Khan --- tools/testing/selftests/exec/Makefile | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) (limited to 'tools/testing/selftests/exec') diff --git a/tools/testing/selftests/exec/Makefile b/tools/testing/selftests/exec/Makefile index 9eb1c3e4d339..48d1f863d584 100644 --- a/tools/testing/selftests/exec/Makefile +++ b/tools/testing/selftests/exec/Makefile @@ -1,5 +1,14 @@ CFLAGS = -Wall +TEST_GEN_PROGS := execveat +TEST_GEN_FILES := execveat.symlink execveat.denatured script subdir +# Makefile is a run-time dependency, since it's accessed by the execveat test +TEST_FILES := Makefile + +EXTRA_CLEAN := subdir.moved execveat.moved xxxxx* + +include ../lib.mk + subdir: mkdir -p $@ script: @@ -11,13 +20,3 @@ execveat.symlink: execveat execveat.denatured: execveat cp $< $@ chmod -x $@ - -TEST_GEN_PROGS := execveat -TEST_GEN_FILES := execveat.symlink execveat.denatured script subdir -# Makefile is a run-time dependency, since it's accessed by the execveat test -TEST_FILES := Makefile - -include ../lib.mk - -clean: - rm -rf $(TEST_GEN_PROGS) $(TEST_GEN_FILES) subdir.moved execveat.moved xxxxx* -- cgit v1.2.3-59-g8ed1b