selftests: change install command to rsync
authorBamvor Jian Zhang <bamvor.zhangjian@linaro.org>
Wed, 9 Sep 2015 13:06:28 +0000 (21:06 +0800)
committerShuah Khan <shuahkh@osg.samsung.com>
Mon, 14 Sep 2015 22:43:51 +0000 (16:43 -0600)
The command of install could not handle the special files in exec
testcases, change the default rule to rsync to fix this.

The installation is unchanged after this commit.

Suggested-by: Michael Ellerman <mpe@ellerman.id.au>
Signed-off-by: Bamvor Jian Zhang <bamvor.zhangjian@linaro.org>
Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
tools/testing/selftests/ftrace/Makefile
tools/testing/selftests/lib.mk

index 0acbeca472255f01bf6a987739f2b8d32213095f..4e6ed13e7f66150de10a8f645eff508fc0565cff 100644 (file)
@@ -1,7 +1,7 @@
 all:
 
 TEST_PROGS := ftracetest
-TEST_DIRS := test.d/
+TEST_DIRS := test.d
 
 include ../lib.mk
 
index 97f1c6742066352c6fd0a32599ecff93b3896499..50a93f5f13d64d5b0f9b4851d03f955da9b6e1d9 100644 (file)
@@ -12,13 +12,10 @@ run_tests: all
        $(RUN_TESTS)
 
 define INSTALL_RULE
-       @if [ "X$(TEST_PROGS)$(TEST_PROGS_EXTENDED)$(TEST_FILES)" != "X" ]; then                        \
-               mkdir -p $(INSTALL_PATH);                                                               \
-               for TEST_DIR in $(TEST_DIRS); do                                                        \
-                       cp -r $$TEST_DIR $(INSTALL_PATH);                                               \
-               done;                                                                                   \
-               echo "install -t $(INSTALL_PATH) $(TEST_PROGS) $(TEST_PROGS_EXTENDED) $(TEST_FILES)";   \
-               install -t $(INSTALL_PATH) $(TEST_PROGS) $(TEST_PROGS_EXTENDED) $(TEST_FILES);          \
+       @if [ "X$(TEST_PROGS)$(TEST_PROGS_EXTENDED)$(TEST_FILES)" != "X" ]; then                                        \
+               mkdir -p ${INSTALL_PATH};                                                                               \
+               echo "rsync -a $(TEST_DIRS) $(TEST_PROGS) $(TEST_PROGS_EXTENDED) $(TEST_FILES) $(INSTALL_PATH)/";       \
+               rsync -a $(TEST_DIRS) $(TEST_PROGS) $(TEST_PROGS_EXTENDED) $(TEST_FILES) $(INSTALL_PATH)/;              \
        fi
 endef