From: Bamvor Jian Zhang Date: Fri, 14 Aug 2015 13:43:35 +0000 (+0800) Subject: selftests: check before install X-Git-Tag: v4.3-rc1~42^2~3 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=a7d0f078892ee5e737cbe79541353c630bc71651;p=karo-tx-linux.git selftests: check before install When the test cases is not supported by the current architecture the install files(TEST_PROGS, TEST_PROGS_EXTENDED and TEST_FILES) will be empty. Check it before installation to dismiss a failure reported by install program. Signed-off-by: Bamvor Jian Zhang Signed-off-by: Shuah Khan --- diff --git a/tools/testing/selftests/Makefile b/tools/testing/selftests/Makefile index 9763dd95b4c8..b2179587c8fe 100644 --- a/tools/testing/selftests/Makefile +++ b/tools/testing/selftests/Makefile @@ -72,7 +72,6 @@ ifdef INSTALL_PATH @# Ask all targets to install their files mkdir -p $(INSTALL_PATH) for TARGET in $(TARGETS); do \ - mkdir -p $(INSTALL_PATH)/$$TARGET ; \ make -C $$TARGET INSTALL_PATH=$(INSTALL_PATH)/$$TARGET install; \ done; diff --git a/tools/testing/selftests/lib.mk b/tools/testing/selftests/lib.mk index ee412bab7ed4..97f1c6742066 100644 --- a/tools/testing/selftests/lib.mk +++ b/tools/testing/selftests/lib.mk @@ -12,11 +12,14 @@ run_tests: all $(RUN_TESTS) 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) + @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); \ + fi endef install: all