Commit bada7a0f authored by POTTIER Francois's avatar POTTIER Francois

bench/good: changed the naming convention.

parent a831271a
...@@ -157,6 +157,8 @@ ...@@ -157,6 +157,8 @@
Take priorities into account *during* the construction of the Take priorities into account *during* the construction of the
automaton? Is it feasible? Compatible with Pager? automaton? Is it feasible? Compatible with Pager?
* BUG: cutdown.mly
* le fichier .conflicts devrait etre supprime par --explain s'il * le fichier .conflicts devrait etre supprime par --explain s'il
n'y a aucun conflit n'y a aucun conflit
......
...@@ -17,7 +17,7 @@ CAMLC := $(shell if ocamlfind ocamlc -v >/dev/null 2>&1 ; \ ...@@ -17,7 +17,7 @@ CAMLC := $(shell if ocamlfind ocamlc -v >/dev/null 2>&1 ; \
# Some tests involve several input files. The naming convention for # Some tests involve several input files. The naming convention for
# these tests is /name/-[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=.opp.out)
test: clean $(RESULTS) test: clean $(RESULTS)
@ if test -e warnings; then \ @ if test -e warnings; then \
...@@ -30,12 +30,12 @@ test: clean $(RESULTS) ...@@ -30,12 +30,12 @@ test: clean $(RESULTS)
exit 1; \ exit 1; \
fi fi
# The file %.result stores the output of menhir --only-preprocess. # The file %.opp.out stores the output of menhir --only-preprocess.
# The file %.expected stores its expected output. # The file %.opp.exp stores its expected output.
# The file %.out stores the output of menhir. # The file %.out stores the output of menhir.
# The file %.exp stores its expected output. # The file %.exp stores its expected output.
%.result: %.mly %.opp.out: %.mly
@ 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`; \
...@@ -47,10 +47,10 @@ test: clean $(RESULTS) ...@@ -47,10 +47,10 @@ test: clean $(RESULTS)
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 $@ $*.opp.exp; \
fi; \ fi; \
if test -e $*.expected; then \ if test -e $*.opp.exp; then \
if diff $@ $*.expected >& /dev/null; then \ if diff $@ $*.opp.exp >& /dev/null; then \
if $(MENHIR) --explain $$CMD >& $*.out; then \ if $(MENHIR) --explain $$CMD >& $*.out; then \
if [ x$$CREATE_EXPECTED == x"1" ]; then \ if [ x$$CREATE_EXPECTED == x"1" ]; then \
cp $*.out $*.exp; \ cp $*.out $*.exp; \
...@@ -82,23 +82,23 @@ test: clean $(RESULTS) ...@@ -82,23 +82,23 @@ test: clean $(RESULTS)
else ( \ else ( \
echo "-> [KO] $$FILES:"; \ echo "-> [KO] $$FILES:"; \
echo " menhir --only-preprocess produced wrong output."; \ echo " menhir --only-preprocess produced wrong output."; \
echo " diff $*.expected $@"; \ echo " diff $*.opp.exp $@"; \
) | tee -a failures; \ ) | tee -a failures; \
fi; \ fi; \
else \ else \
echo "Warning: missing file: $*.expected" | tee -a warnings; \ echo "Warning: missing file: $*.opp.exp" | tee -a warnings; \
fi; \ fi; \
expected: expected:
@ echo "Are you sure ? (this will erase *.expected) [Press ENTER]" @ echo "Are you sure ? (this will erase *.exp) [Press ENTER]"
@ read @ read
@ mkdir -p /tmp/menhir-expected @ mkdir -p /tmp/menhir-expected
@ cp *.expected /tmp/menhir-expected >& /dev/null || true @ cp *.exp /tmp/menhir-expected >& /dev/null || true
@ CREATE_EXPECTED=1 $(MAKE) -s test @ CREATE_EXPECTED=1 $(MAKE) -s test
@ echo "Expected output re-generated." @ echo "Expected output re-generated."
clean: clean:
rm -f *~ rm -f *~
rm -f *.ml *.mli *.conflicts *.automaton rm -f *.ml *.mli *.conflicts *.automaton
rm -f *.result *.out failures warnings rm -f *.out failures warnings
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