diff options
author | Bamvor Jian Zhang <bamvor.zhangjian@linaro.org> | 2015-08-14 09:43:35 -0400 |
---|---|---|
committer | Shuah Khan <shuahkh@osg.samsung.com> | 2015-08-27 18:04:15 -0400 |
commit | a7d0f078892ee5e737cbe79541353c630bc71651 (patch) | |
tree | 18b4fea0c3b264d4ecedcffa383879c9659a5db9 /tools | |
parent | f21fb798fe38cf87b177d45820991f0e315c0ba8 (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')
-rw-r--r-- | tools/testing/selftests/Makefile | 1 | ||||
-rw-r--r-- | tools/testing/selftests/lib.mk | 13 |
2 files changed, 8 insertions, 6 deletions
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 | |||
72 | @# Ask all targets to install their files | 72 | @# Ask all targets to install their files |
73 | mkdir -p $(INSTALL_PATH) | 73 | mkdir -p $(INSTALL_PATH) |
74 | for TARGET in $(TARGETS); do \ | 74 | for TARGET in $(TARGETS); do \ |
75 | mkdir -p $(INSTALL_PATH)/$$TARGET ; \ | ||
76 | make -C $$TARGET INSTALL_PATH=$(INSTALL_PATH)/$$TARGET install; \ | 75 | make -C $$TARGET INSTALL_PATH=$(INSTALL_PATH)/$$TARGET install; \ |
77 | done; | 76 | done; |
78 | 77 | ||
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 | |||
12 | $(RUN_TESTS) | 12 | $(RUN_TESTS) |
13 | 13 | ||
14 | define INSTALL_RULE | 14 | define INSTALL_RULE |
15 | mkdir -p $(INSTALL_PATH) | 15 | @if [ "X$(TEST_PROGS)$(TEST_PROGS_EXTENDED)$(TEST_FILES)" != "X" ]; then \ |
16 | @for TEST_DIR in $(TEST_DIRS); do\ | 16 | mkdir -p $(INSTALL_PATH); \ |
17 | cp -r $$TEST_DIR $(INSTALL_PATH); \ | 17 | for TEST_DIR in $(TEST_DIRS); do \ |
18 | done; | 18 | cp -r $$TEST_DIR $(INSTALL_PATH); \ |
19 | install -t $(INSTALL_PATH) $(TEST_PROGS) $(TEST_PROGS_EXTENDED) $(TEST_FILES) | 19 | done; \ |
20 | echo "install -t $(INSTALL_PATH) $(TEST_PROGS) $(TEST_PROGS_EXTENDED) $(TEST_FILES)"; \ | ||
21 | install -t $(INSTALL_PATH) $(TEST_PROGS) $(TEST_PROGS_EXTENDED) $(TEST_FILES); \ | ||
22 | fi | ||
20 | endef | 23 | endef |
21 | 24 | ||
22 | install: all | 25 | install: all |