Changeset 120 for trunk/Platforms
- Timestamp:
- May 26, 2009, 9:01:47 PM (16 years ago)
- Location:
- trunk/Platforms/Test
- Files:
-
- 86 added
- 1 edited
- 18 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/Platforms/Test/Makefile
r119 r120 30 30 ifeq ($(origin PRIORITY), undefined) 31 31 PRIORITY = 0 32 endif 33 ifeq ($(flavor CLEAN), undefined) 34 CLEAN = 0 32 35 endif 33 36 … … 134 137 run : 135 138 @\ 136 if $(TEST) "$(DATA)" != "$(DATA_ALL)"; then \ 137 $(RM) $(DIR_LOG)/$(DATA); \ 138 fi; \ 139 $(MAKE) $(DIR_LOGS); \ 140 declare logs="$(LOGS)"; \ 141 $(MAKE) $$logs; \ 142 declare -i nb_test=0; \ 143 declare -i nb_test_ko=0; \ 144 for log in $$logs; do \ 145 $(GREP) -q "Test OK" $$log; \ 146 declare -i test_ok=$$?; \ 147 $(GREP) -q "Test KO" $$log; \ 148 declare -i test_ko=$$?; \ 149 if $(TEST) $$test_ko -eq 0 -o $$test_ok -ne 0; \ 150 then nb_test_ko=$$(($${nb_test_ko} + 1)); \ 151 fi; \ 152 nb_test=$$(($${nb_test} + 1)); \ 153 done; \ 154 if $(TEST) $${nb_test_ko} -ne 0; \ 139 declare -i clean=$(CLEAN); \ 140 if $(TEST) $${clean} -ne 0 -a "$(DATA)" != "$(DATA_ALL)"; then \ 141 $(RM) $(DIR_LOG)/$(DATA); \ 142 fi; \ 143 $(MAKE) $(DIR_LOGS); \ 144 declare logs="$(LOGS)"; \ 145 $(MAKE) $${logs}; \ 146 declare -i nb_test=0; \ 147 declare -i nb_test_ko=0; \ 148 for log in $${logs}; do \ 149 $(GREP) -q "Test OK" $$log; \ 150 declare -i test_ok=$$?; \ 151 $(GREP) -q "Test KO" $$log; \ 152 declare -i test_ko=$$?; \ 153 if $(TEST) $${test_ko} -eq 0 -o $${test_ok} -ne 0; \ 154 then nb_test_ko=$$(($${nb_test_ko} + 1)); \ 155 fi; \ 156 nb_test=$$(($${nb_test} + 1)); \ 157 done; \ 158 if $(TEST) $${nb_test_ko} -ne 0; \ 155 159 then $(ECHO) "-------------------| Test KO !!! ($${nb_test_ko}/$${nb_test})"; exit 1; \ 156 else $(ECHO) "-------------------| Test OK"; exit 0; \160 else $(ECHO) "-------------------| Test OK"; exit 0; \ 157 161 fi; 158 162 … … 161 165 debug : 162 166 @\ 163 $(MAKE) run DATA=debug ;167 $(MAKE) run DATA=debug CLEAN=1; 164 168 165 169 bench : … … 179 183 declare -i test_ko=$$?; \ 180 184 declare timing=$$($(GREP) -h "Timing" $$log); \ 181 if $(TEST) $$ test_ko -ne 0 -a $$test_ok -eq 0;\185 if $(TEST) $${test_ko} -ne 0 -a $${test_ok} -eq 0; \ 182 186 then test="... OK "; \ 183 187 else test="... KO !!!"; \ … … 241 245 $(ECHO) " * all (default rules) : create software";\ 242 246 $(ECHO) " * run : execute platforms with test configuration";\ 243 $(ECHO) " set DATA to select a specific directory in $(DIR_DATA) (default : all)";\247 $(ECHO) " set DATA to select a specific directory in $(DIR_DATA) (default : all)";\ 244 248 $(ECHO) " set PRIORITY to nice the execution (default : 0)";\ 245 $(ECHO) " example : make run DATA=debug PRIORITY=10";\ 249 $(ECHO) " set CLEAN to remove previous log (default : 0)";\ 250 $(ECHO) " example : make run DATA=debug PRIORITY=10 CLEAN";\ 246 251 $(ECHO) " * execute : cf 'make run'";\ 247 252 $(ECHO) " * debug : cf 'make run DATA=debug'";\
Note: See TracChangeset
for help on using the changeset viewer.