Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1221417

[PATCH v3 4/5] selftests: change install command to rsync

From Bamvor Jian Zhang <bamvor.zhangjian@linaro.org>
Newsgroups linux.kernel
Subject [PATCH v3 4/5] selftests: change install command to rsync
Date 2015-09-09 15:20 +0200
Message-ID <q6Ns7-48j-17@gated-at.bofh.it> (permalink)
References <q6Ns6-48j-7@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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>
---
 tools/testing/selftests/ftrace/Makefile |  2 +-
 tools/testing/selftests/lib.mk          | 11 ++++-------
 2 files changed, 5 insertions(+), 8 deletions(-)

diff --git a/tools/testing/selftests/ftrace/Makefile b/tools/testing/selftests/ftrace/Makefile
index 0acbeca..4e6ed13 100644
--- a/tools/testing/selftests/ftrace/Makefile
+++ b/tools/testing/selftests/ftrace/Makefile
@@ -1,7 +1,7 @@
 all:
 
 TEST_PROGS := ftracetest
-TEST_DIRS := test.d/
+TEST_DIRS := test.d
 
 include ../lib.mk
 
diff --git a/tools/testing/selftests/lib.mk b/tools/testing/selftests/lib.mk
index 97f1c67..50a93f5 100644
--- a/tools/testing/selftests/lib.mk
+++ b/tools/testing/selftests/lib.mk
@@ -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
 
-- 
2.1.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH v3 0/5] kselftest improvement and cleanup Bamvor Jian Zhang <bamvor.zhangjian@linaro.org> - 2015-09-09 15:20 +0200
  [PATCH v3 4/5] selftests: change install command to rsync Bamvor Jian Zhang <bamvor.zhangjian@linaro.org> - 2015-09-09 15:20 +0200
  [PATCH v3 3/5] selftests: mqueue: simplify the Makefile Bamvor Jian Zhang <bamvor.zhangjian@linaro.org> - 2015-09-09 15:20 +0200
  [PATCH v3 1/5] selftests: rename jump label to static_keys Bamvor Jian Zhang <bamvor.zhangjian@linaro.org> - 2015-09-09 15:20 +0200
  [PATCH v3 2/5] selftests: mqueue: allow extra cflags Bamvor Jian Zhang <bamvor.zhangjian@linaro.org> - 2015-09-09 15:20 +0200
  [PATCH v3 5/5] selftests: exec: revert to default emit rule Bamvor Jian Zhang <bamvor.zhangjian@linaro.org> - 2015-09-09 15:20 +0200
  Re: [PATCH v3 0/5] kselftest improvement and cleanup Shuah Khan <shuahkh@osg.samsung.com> - 2015-09-15 01:00 +0200

csiph-web