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>
This commit is contained in:
committed by
Shuah Khan
parent
5a2d4a5763
commit
80d443e887
@@ -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*
|
||||
|
||||
Reference in New Issue
Block a user