]> rtime.felk.cvut.cz Git - omk.git/commitdiff
Run test first for Linux, then other platforms
authorMichal Sojka <sojkam1@fel.cvut.cz>
Mon, 11 Nov 2013 11:15:50 +0000 (12:15 +0100)
committerMichal Sojka <sojkam1@fel.cvut.cz>
Mon, 11 Nov 2013 11:15:50 +0000 (12:15 +0100)
Serious breakage will thus be detected faster.

tests/Makefile

index 24a460c5a803ee36ab19b8dbb07e2de7b0e164b0..7552fb2caa37c221df2d835ea9d7973ce3ec969d 100644 (file)
@@ -9,18 +9,16 @@ programs-test_PROGRAMS qt qt-qmake shlibs sources_dir                 \
 sources_in_subdirectory sources_list subdirs_first                     \
 subdirs_first-force-subdir use_leaf_makefiles vxworks whole_tree omkize
 
+RULES=$(shell cd ../rules; ls)
 
 all test:
        $(MAKE) -C ..
        ./wvtestrun $(MAKE) wvtest
 
-wvtest: $(wvtest_SCRIPTS:%=run-%)
+ALL_TESTS = $(foreach rule,$(RULES),$(foreach script,$(wvtest_SCRIPTS),$(rule)/$(script)))
 
-RULES=$(shell cd ../rules; ls)
+.PHONY: $(ALL_TESTS) wvtest
+wvtest: $(ALL_TESTS)
 
-run-%: %
-ifeq ($(OMK_RULES),)
-       for i in $(RULES); do LC_ALL=C OMK_RULES=$$i ./$* || exit 1; done
-else
-       LC_ALL=C ./$*
-endif
+$(ALL_TESTS):
+       LC_ALL=C OMK_RULES=$(patsubst %/,%,$(dir $@)) ./$(notdir $@)