Skip to content
Snippets Groups Projects
Commit e6fdf4fe authored by Ralf Jung's avatar Ralf Jung
Browse files

perform style checks in parallel with main build

parent 5a2cf2e2
No related branches found
No related tags found
No related merge requests found
Pipeline #47463 passed
...@@ -5,19 +5,22 @@ NO_TEST:= ...@@ -5,19 +5,22 @@ NO_TEST:=
MAKE_REF:= MAKE_REF:=
# Run tests interleaved with main build. They have to be in the same target for this. # Run tests interleaved with main build. They have to be in the same target for this.
real-all: $(if $(NO_TEST),,test) real-all: style $(if $(NO_TEST),,test)
# the test suite style: $(VFILES)
TESTFILES:=$(shell find tests -name "*.v")
NORMALIZER:=test-normalizer.sed
test: $(TESTFILES:.v=.vo)
# Make sure everything imports the options, and all Instance/Argument/Hint are qualified. # Make sure everything imports the options, and all Instance/Argument/Hint are qualified.
$(SHOW)"Performing some style checks..." $(SHOW)"Performing some style checks..."
$(HIDE)for FILE in $(VFILES); do \ $(HIDE)for FILE in $(VFILES); do \
if ! fgrep -q 'From stdpp Require Import options.' "$$FILE"; then echo "ERROR: $$FILE does not import 'options'."; echo; exit 1; fi ; \ if ! fgrep -q 'From stdpp Require Import options.' "$$FILE"; then echo "ERROR: $$FILE does not import 'options'."; echo; exit 1; fi ; \
if egrep -n '^\s*((Existing\s+|Program\s+)Instance|Arguments|Remove|Hint\s+(Extern|Constructors|Resolve|Immediate|Mode|Opaque|Transparent|Unfold)|(Open|Close)\s+Scope|Opaque|Transparent)\b' "$$FILE"; then echo "ERROR: $$FILE contains 'Instance'/'Arguments'/'Hint' or another side-effect without locality (see above)."; echo "Please add 'Global' or 'Local' as appropriate."; echo; exit 1; fi \ if egrep -n '^\s*((Existing\s+|Program\s+)Instance|Arguments|Remove|Hint\s+(Extern|Constructors|Resolve|Immediate|Mode|Opaque|Transparent|Unfold)|(Open|Close)\s+Scope|Opaque|Transparent)\b' "$$FILE"; then echo "ERROR: $$FILE contains 'Instance'/'Arguments'/'Hint' or another side-effect without locality (see above)."; echo "Please add 'Global' or 'Local' as appropriate."; echo; exit 1; fi \
done done
.PHONY: style
# the test suite
TESTFILES:=$(shell find tests -name "*.v")
NORMALIZER:=test-normalizer.sed
test: $(TESTFILES:.v=.vo)
.PHONY: test .PHONY: test
COQ_TEST=$(COQTOP) $(COQDEBUG) -batch -test-mode COQ_TEST=$(COQTOP) $(COQDEBUG) -batch -test-mode
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment