diff options
author | Runhang Li <marklrh@gmail.com> | 2018-01-18 07:13:24 -0800 |
---|---|---|
committer | Gabriel Scherer <gabriel.scherer@gmail.com> | 2018-01-28 15:46:08 +0100 |
commit | 8f535f17be78a2ddb41cb3f4b675fd38f9b67905 (patch) | |
tree | 98bdf05e07a24c537445e6ed2f7c4c22324341aa | |
parent | 261c7144e18d54dd38ec1b0b48ae6e7c46eccb02 (diff) | |
download | ocaml-8f535f17be78a2ddb41cb3f4b675fd38f9b67905.tar.gz |
Fix in testsuite: `make one` and `make parallel`
The `parallel` and `one DIR=...` targets currently do not work as
inteded for tests using the new 'ocamltest' framework: `one ...` has
no effect, and `parallel` only runs on old-style tests and ignores new
tests. This commit fixes this discrepancy in behavior.
-rw-r--r-- | testsuite/Makefile | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/testsuite/Makefile b/testsuite/Makefile index 0e35bdde3a..2880ef6698 100644 --- a/testsuite/Makefile +++ b/testsuite/Makefile @@ -88,7 +88,7 @@ legacy: .PHONY: legacy-without-report legacy-without-report: lib tools @for dir in tests/*; do \ - $(MAKE) $(NO_PRINT) exec-one DIR=$$dir; \ + $(MAKE) $(NO_PRINT) exec-one DIR=$$dir LEGACY=y; \ done 2>&1 | tee -a _log @$(MAKE) $(NO_PRINT) retries @@ -200,6 +200,14 @@ exec-one: echo "Running tests from '$$DIR' ..."; \ cd $(DIR) && \ $(MAKE) TERM=dumb BASEDIR=$(BASEDIR) || echo '=> unexpected error'; \ + elif [ -f $(DIR)/ocamltests ] && [ -z $(LEGACY) ] ; then \ + echo "Running tests from '$$DIR' ..."; \ + file=$(DIR)/ocamltests; \ + (IFS=$$(printf "\r\n"); while read testfile; do \ + TERM=dumb \ + $(ocamltest) $(DIR)/$$testfile || \ + touch $(failstamp); \ + done < $$file) || touch $(failstamp); \ fi .PHONY: clean-one |