Maj terminée. Pour consulter la release notes associée voici le lien :
https://about.gitlab.com/releases/2021/07/07/critical-security-release-gitlab-14-0-4-released/

Commit ff33b05d authored by POTTIER Francois's avatar POTTIER Francois
Browse files

Cleanup and nicer output in bench/good/Makefile.

parent e4d72f52
*.ml *.ml
*.mli *.mli
*.result *.result
*.out
*.automaton *.automaton
*.conflicts *.conflicts
failures failures
......
...@@ -14,8 +14,8 @@ CAMLC := $(shell if ocamlfind ocamlc -v >/dev/null 2>&1 ; \ ...@@ -14,8 +14,8 @@ CAMLC := $(shell if ocamlfind ocamlc -v >/dev/null 2>&1 ; \
then echo ocamlc.opt ; \ then echo ocamlc.opt ; \
else echo ocamlc ; fi) else echo ocamlc ; fi)
# La convention de nommage des tests multi-grammaires # Some tests involve several input files. The naming convention for
# est : /nom/-[1-9].mly # these tests is /name/-[1-9].mly.
TESTS=$(shell ls | egrep '*([1]|[^2-9]).mly') TESTS=$(shell ls | egrep '*([1]|[^2-9]).mly')
RESULTS=$(TESTS:.mly=.result) RESULTS=$(TESTS:.mly=.result)
...@@ -24,42 +24,49 @@ test: clean $(RESULTS) ...@@ -24,42 +24,49 @@ test: clean $(RESULTS)
echo WARNINGS: ; \ echo WARNINGS: ; \
cat warnings; \ cat warnings; \
fi fi
@ if test -e failures; then \ @ if test -e failures; then \
echo FAILURES: ; \ echo FAILURES: ; \
cat failures; \ cat failures; \
exit 1; \ exit 1; \
fi fi
# The file %.result stores the output of menhir --only-preprocess. # The file %.result stores the output of menhir --only-preprocess.
# The file %.expected stores its expected output. # The file %.expected stores its expected output.
# The file %.out stores the output of menhir.
# (There is presently no expected output file.)
%.result: %.mly %.result: %.mly
# Single-file or multi-file test?
@ if echo $< | grep -e "-1.mly" &> /dev/null; then \ @ if echo $< | grep -e "-1.mly" &> /dev/null; then \
export BASE=`echo $< | sed s/"-1.mly"/""/`; \ export BASE=`echo $< | sed s/"-1.mly"/""/`; \
export FILES=`echo $$BASE-[1-9].mly`; \ export FILES=`echo $$BASE-[1-9].mly`; \
export CMD="$$FILES --base $$BASE"; \ export CMD="$$FILES --base $$BASE"; \
else \ else \
export FILES="$<"; \ export FILES="$<"; \
export BASE=`echo $< | sed s/".mly"/""/`; \ export BASE=`echo $< | sed s/".mly"/""/`; \
export CMD="$<"; \ export CMD="$<"; \
fi; \ fi; \
$(SHELL) -c '$(MENHIR) --only-preprocess $$CMD >& $@'; \ $(SHELL) -c '$(MENHIR) --only-preprocess $$CMD >& $@'; \
if [ x$$CREATE_EXPECTED == x"1" ]; then \ if [ x$$CREATE_EXPECTED == x"1" ]; then \
cp $@ $*.expected; \ cp $@ $*.expected; \
fi; \ fi; \
if test -e $*.expected; then \ if test -e $*.expected; then \
if diff $@ $*.expected >& /dev/null; then \ if diff $@ $*.expected >& /dev/null; then \
if $(MENHIR) $$CMD >& /dev/null; then \ if $(MENHIR) $$CMD >& $*.out; then \
echo "[OK] $$FILES"; \ echo "[OK] $$FILES"; \
else \ else ( \
echo "-> [KO] $$FILES:" | tee -a failures; \ echo "-> [KO] $$FILES:"; \
echo " menhir --only-preprocess succeeded," | tee -a failures; \ echo " menhir --only-preprocess succeeded,"; \
echo " but menhir failed." | tee -a failures; \ echo " but menhir failed."; \
fi; \ echo " cat $*.out"; \
else \ ) | tee -a failures; \
echo "-> [KO] $$FILES:" | tee -a failures; \ fi; \
echo " menhir --only-preprocess produced unexpected output."; \ else ( \
fi; \ echo "-> [KO] $$FILES:"; \
echo " menhir --only-preprocess produced wrong output."; \
echo " diff $*.expected $@"; \
) | tee -a failures; \
fi; \
else \ else \
echo "Warning: missing file: $*.expected" | tee -a warnings; \ echo "Warning: missing file: $*.expected" | tee -a warnings; \
fi; \ fi; \
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment