Skip to content

Commit

Permalink
[coq] Backwards-compatible: Adapt to coq/coq#11980 : Improvements on …
Browse files Browse the repository at this point in the history
…Print Assumptions

Backwards compatible version of #793

Closes #793
  • Loading branch information
JasonGross committed May 19, 2020
1 parent 50fb0d7 commit 1562eea
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ nra.cache
/time-of-build.log

/*.out
/*.out.processed
output-tests/*.expected.processed

# OCaml
*.annot
Expand Down
11 changes: 10 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -949,9 +949,18 @@ curves: $(filter src/Spec/%Curve%.vo,$(REGULAR_VOFILES)) $(filter src/Curves/%.v
.PHONY: $(CHECK_OUTPUTS) $(ACCEPT_OUTPUTS)
check-output: $(CHECK_OUTPUTS)
accept-output: $(ACCEPT_OUTPUTS)
PROCESS_OUTPUT:={ output="$$(cat)"; \
if echo "$${output}" | grep -q '^Axioms:'; then \
echo "$${output}" | tr '\n' '~' | sed 's/\s*~\s\+/ /g' | tr '~' '\n'; \
else \
echo "$${output}"; \
fi; \
}
$(CHECK_OUTPUTS) : check-% : $(OUTPUT_VOS)
$(SHOW)'DIFF $*'
$(HIDE)diff output-tests/$*.expected $*.out || (RV=$$?; echo "To accept the new output, run make accept-$*"; exit $$RV)
$(HIDE)cat output-tests/$*.expected | $(PROCESS_OUTPUT) > output-tests/$*.expected.processed
$(HIDE)cat $*.out | $(PROCESS_OUTPUT) > $*.out.processed
$(HIDE)diff output-tests/$*.expected.processed $*.out.processed || (RV=$$?; echo "To accept the new output, run make accept-$*"; exit $$RV)

$(ACCEPT_OUTPUTS) : accept-% :
$(SHOW)'ACCEPT $*.out'
Expand Down

0 comments on commit 1562eea

Please sign in to comment.