[PATCH v2 1/8] selftests: copy TEST_DIRS to INSTALL_PATH

flat view
DORMANTno replies

From: Tyler Baker <hidden>
Date: 2015-04-17 21:58:50
Also in: lkml
Subsystem: kernel selftest framework, the rest · Maintainers: Shuah Khan, Shuah Khan, Linus Torvalds

Loop over all TEST_DIRS and recursively copy them to the INSTALL_PATH. Tests
such as ftrace require a directory and all of it's contents to execute the
test properly, thus these directories and files need to be copied when we
perform an install.

Signed-off-by: Tyler Baker <redacted>
---
 tools/testing/selftests/lib.mk | 3 +++
 1 file changed, 3 insertions(+)
diff --git a/tools/testing/selftests/lib.mk b/tools/testing/selftests/lib.mk
index 2194155..ee412ba 100644
--- a/tools/testing/selftests/lib.mk
+++ b/tools/testing/selftests/lib.mk
@@ -13,6 +13,9 @@ run_tests: all
 
 define INSTALL_RULE
 	mkdir -p $(INSTALL_PATH)
+	@for TEST_DIR in $(TEST_DIRS); do\
+		cp -r $$TEST_DIR $(INSTALL_PATH); \
+	done;
 	install -t $(INSTALL_PATH) $(TEST_PROGS) $(TEST_PROGS_EXTENDED) $(TEST_FILES)
 endef
 
-- 
2.1.4
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help