diff mbox

[v4,1/7] selftests: copy TEST_DIRS to INSTALL_PATH

Message ID 1429656588-8832-1-git-send-email-tyler.baker@linaro.org
State Accepted
Commit e8c1d7cdf13707a919f5a067c69d37b532cd09ab
Headers show

Commit Message

Tyler Baker April 21, 2015, 10:49 p.m. UTC
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.

Acked-by: Michael Ellerman <mpe@ellerman.id.au>
Signed-off-by: Tyler Baker <tyler.baker@linaro.org>
---
 tools/testing/selftests/lib.mk | 3 +++
 1 file changed, 3 insertions(+)
diff mbox

Patch

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