testsuite: ability to organize tests in subdirectories.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@11089 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02master
parent
d9b3046c49
commit
3f334eb176
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue