summaryrefslogtreecommitdiff
path: root/tools/testing/selftests/exec
diff options
context:
space:
mode:
authorbamvor.zhangjian@huawei.com <bamvor.zhangjian@huawei.com>2016-11-29 14:55:51 +0300
committerShuah Khan <shuahkh@osg.samsung.com>2017-01-05 23:42:17 +0300
commit80d443e8876602be2c130f79c4de81e12e2a700d (patch)
treedbe443dd36f2b043654ccff605dca385f4b8e70a /tools/testing/selftests/exec
parent5a2d4a5763c96a19170f81f2c4bb3cc9515f854a (diff)
downloadlinux-80d443e8876602be2c130f79c4de81e12e2a700d.tar.xz
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 <bamvor.zhangjian@linaro.org> Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
Diffstat (limited to 'tools/testing/selftests/exec')
-rw-r--r--tools/testing/selftests/exec/Makefile19
1 files changed, 9 insertions, 10 deletions
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*