selftests: copy TEST_DIRS to INSTALL_PATH
authorTyler Baker <tyler.baker@linaro.org>
Tue, 21 Apr 2015 22:49:48 +0000 (15:49 -0700)
committerShuah Khan <shuahkh@osg.samsung.com>
Tue, 26 May 2015 21:58:06 +0000 (15:58 -0600)
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>
Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
tools/testing/selftests/lib.mk

index 2194155ae62a0f1cf4500b60dc58c4ec3a93a3ce..ee412bab7ed4bd29c264af117398be85b1999c4d 100644 (file)
@@ -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