summaryrefslogtreecommitdiff
path: root/tools/testing/selftests/lib.mk
diff options
context:
space:
mode:
authorBamvor Jian Zhang <bamvor.zhangjian@linaro.org>2015-08-14 21:43:35 +0800
committerShuah Khan <shuahkh@osg.samsung.com>2015-08-27 16:04:15 -0600
commita7d0f078892ee5e737cbe79541353c630bc71651 (patch)
tree18b4fea0c3b264d4ecedcffa383879c9659a5db9 /tools/testing/selftests/lib.mk
parentf21fb798fe38cf87b177d45820991f0e315c0ba8 (diff)
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 <bamvor.zhangjian@linaro.org> Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
Diffstat (limited to 'tools/testing/selftests/lib.mk')
-rw-r--r--tools/testing/selftests/lib.mk13
1 files changed, 8 insertions, 5 deletions
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