Skip to content

Commit 9d85430

Browse files
authored
flambda-backend: Fix testsuite execution (#125)
1 parent ac964ca commit 9d85430

File tree

2 files changed

+24
-0
lines changed

2 files changed

+24
-0
lines changed

testsuite/Makefile

+20
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,26 @@ list: lib tools
195195
fi
196196
@$(MAKE) --no-print-directory one LIST="$(FILE)"
197197

198+
.PHONY: list-parallel
199+
list-parallel: lib tools
200+
@if [ -z "$(FILE)" ]; \
201+
then echo "No value set for variable 'FILE'."; \
202+
exit 1; \
203+
fi
204+
@echo | parallel >/dev/null 2>/dev/null \
205+
|| (echo "Unable to run the GNU parallel tool;";\
206+
echo "You should install it before using the parallel* targets.";\
207+
exit 1)
208+
@echo | parallel --gnu --no-notice >/dev/null 2>/dev/null \
209+
|| (echo "Your 'parallel' tool seems incompatible with GNU parallel.";\
210+
echo "This target requires GNU parallel.";\
211+
exit 1)
212+
@cat $(FILE) \
213+
| parallel --gnu --no-notice --keep-order \
214+
"$(MAKE) $(NO_PRINT) exec-one DIR={} 2>&1" \
215+
| tee $(TESTLOG)
216+
@$(MAKE) report
217+
198218
.PHONY: one
199219
one: lib tools
200220
@case "$(words $(DIR) $(LIST) $(TEST))" in \

testsuite/summarize.awk

+4
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,10 @@ END {
209209
if (reran != 0){
210210
printf(" %3d test dir re-runs\n", reran);
211211
}
212+
if (passed + skipped + failed + ignored + unexped + nresults == 0) {
213+
printf("#### No tests at all; probably a mistake. \n\n");
214+
exit 5;
215+
}
212216
if (failed || unexped){
213217
printf("#### Something failed. Exiting with error status.\n\n");
214218
exit 4;

0 commit comments

Comments
 (0)