diff options
-rw-r--r-- | testsuite/Makefile | 27 | ||||
-rw-r--r-- | testsuite/makefiles/Makefile.several | 8 |
2 files changed, 18 insertions, 17 deletions
diff --git a/testsuite/Makefile b/testsuite/Makefile index d7a975699..db1be0faa 100644 --- a/testsuite/Makefile +++ b/testsuite/Makefile @@ -32,23 +32,24 @@ one: lib @$(MAKE) $(NO_PRINT) exec-one DIR=$(DIR) exec-one: - @echo "Running tests from '$$DIR' ..." - @(cd $(DIR) && $(MAKE) TERM=dumb BASEDIR=$(BASEDIR) && cd ../..) + @if [ ! -f $(DIR)/Makefile ]; then \ + for dir in $(DIR)/*; do \ + if [ -d $$dir ]; then \ + $(MAKE) exec-one DIR=$$dir; \ + fi; \ + done; \ + else \ + echo "Running tests from '$$DIR' ..."; \ + (cd $(DIR) && $(MAKE) TERM=dumb BASEDIR=$(BASEDIR)); \ + fi lib: FORCE - @(cd lib && $(MAKE) -s BASEDIR=$(BASEDIR) && cd ..) + @(cd lib && $(MAKE) -s BASEDIR=$(BASEDIR)) clean: FORCE - @(cd lib && $(MAKE) BASEDIR=$(BASEDIR) clean && cd ..) - @for file in tests/*; do \ - if [ -d $$file ]; then \ - (cd $$file && $(MAKE) BASEDIR=$(BASEDIR) clean && cd ../..); \ - fi \ - done - @for file in interactive/*; do \ - if [ -d $$file ]; then \ - (cd $$file && $(MAKE) BASEDIR=$(BASEDIR) clean && cd ../..); \ - fi \ + @(cd lib && $(MAKE) BASEDIR=$(BASEDIR) clean) + @for file in `find interactive tests -name Makefile`; do \ + (cd `dirname $$file` && $(MAKE) BASEDIR=$(BASEDIR) clean); \ done report: FORCE diff --git a/testsuite/makefiles/Makefile.several b/testsuite/makefiles/Makefile.several index 099251321..e81462da4 100644 --- a/testsuite/makefiles/Makefile.several +++ b/testsuite/makefiles/Makefile.several @@ -26,11 +26,11 @@ run-all: done; @for file in *.ml; do \ printf " ... testing '$$file':"; \ - $(MAKE) run-file DESC=ocamlc COMP='$(OCAMLC)' COMPFLAGS='$(ADD_COMPFLAGS) $(ADD_CFLAGS) $(O_FILES) -w a $(CMA_FILES) -I ../../lib $(CMO_FILES)' FILE=$$file PROGRAM_ARGS=$(PROGRAM_ARGS) && \ - $(MAKE) run-file DESC=ocamlopt COMP=$(PREFIX)/bin/ocamlopt COMPFLAGS='$(ADD_COMPFLAGS) $(ADD_OPTFLAGS) $(O_FILES) -w a $(CMXA_FILES) -I ../../lib $(CMX_FILES)' FILE=$$file PROGRAM_ARGS=$(PROGRAM_ARGS) && \ + $(MAKE) run-file DESC=ocamlc COMP='$(OCAMLC)' COMPFLAGS='$(ADD_COMPFLAGS) $(ADD_CFLAGS) $(O_FILES) -w a $(CMA_FILES) -I $(BASEDIR)/lib $(CMO_FILES)' FILE=$$file PROGRAM_ARGS=$(PROGRAM_ARGS) && \ + $(MAKE) run-file DESC=ocamlopt COMP=$(PREFIX)/bin/ocamlopt COMPFLAGS='$(ADD_COMPFLAGS) $(ADD_OPTFLAGS) $(O_FILES) -w a $(CMXA_FILES) -I $(BASEDIR)/lib $(CMX_FILES)' FILE=$$file PROGRAM_ARGS=$(PROGRAM_ARGS) && \ if [ ! -z $(UNSAFE) ]; then \ - $(MAKE) run-file DESC=ocamlc-unsafe COMP=$(PREFIX)/bin/ocamlc COMPFLAGS='-w a -unsafe -I ../../li $(CMO_FILES)' FILE=$$file && \ - $(MAKE) run-file DESC=ocamlopt-unsafe COMP=$(PREFIX)/bin/ocamlopt COMPFLAGS='-w a -unsafe -I ../../lib $(CMX_FILES)' FILE=$$file; \ + $(MAKE) run-file DESC=ocamlc-unsafe COMP=$(PREFIX)/bin/ocamlc COMPFLAGS='-w a -unsafe -I $(BASEDIR)/lib $(CMO_FILES)' FILE=$$file && \ + $(MAKE) run-file DESC=ocamlopt-unsafe COMP=$(PREFIX)/bin/ocamlopt COMPFLAGS='-w a -unsafe -I $(BASEDIR)/lib $(CMX_FILES)' FILE=$$file; \ fi && \ echo " => passed"; \ done; |