Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Janno
iris-coq
Commits
dbf8321a
Commit
dbf8321a
authored
Jun 20, 2018
by
Ralf Jung
Browse files
change the way we generate test reference files
parent
2f1ae293
Changes
4
Hide whitespace changes
Inline
Side-by-side
.gitlab-ci.yml
View file @
dbf8321a
...
...
@@ -29,7 +29,7 @@ variables:
build-coq.dev
:
<<
:
*template
variables
:
BUILD_TARGET
:
"
ref
"
# don't check test output
MAKE_REF
:
"
1
"
# don't check test output
OPAM_PINS
:
"
coq
version
dev"
VALIDATE
:
"
1"
...
...
Makefile.coq.local
View file @
dbf8321a
...
...
@@ -19,24 +19,14 @@ tests/.coqdeps.d: $(TESTFILES)
$(HIDE)$(COQDEP)
-dyndep
var
$(COQMF_COQLIBS_NOML)
$^
$(redir_if_ok)
-include
tests/.coqdeps.d
$(TESTFILES
:
.v=.vo): %.vo: %.v
$(TESTFILES
:
.v=.vo): %.vo: %.v
$(if $(MAKE_REF)
,,
%.ref)
$(SHOW)
COQTOP
[
test
]
$<
$(HIDE)TEST
=
"
$
$(
basename
-s .v
$<
)
"
&&
\
TMPFILE
=
"
$
$(mktemp)
"
&&
\
$(TIMER)
$(COQ_TEST)
$(TIMING_ARG)
$(COQFLAGS)
$(COQLIBS)
-load-vernac-source
$<
$(TIMING_EXTRA)
>
"
$$
TMPFILE"
&&
\
(
$(REF_FILTER)
<
"
$$
TMPFILE"
>
"
$$
TMPFILE.filtered"
||
true
)
&&
\
(
diff
-u
"tests/
$$
TEST.ref"
"
$$
TMPFILE.filtered"
||
rm
-f
"tests/
$$
TEST.vo"
"
$$
TMPFILE"
"
$$
TMPFILE.filtered"
)
&&
\
rm
"
$$
TMPFILE"
"
$$
TMPFILE.filtered"
&&
\
$(
if
$(MAKE_REF)
,
\
mv
"
$$
TMPFILE.filtered"
"tests/
$$
TEST.ref"
,
\
diff
-u
"tests/
$$
TEST.ref"
"
$$
TMPFILE.filtered"
)
&&
\
rm
-f
"
$$
TMPFILE"
"
$$
TMPFILE.filtered"
&&
\
touch
$@
# a target, for convenience sake, to create the .ref file with the current output
ref
:
$(TESTFILES:.v=.ref)
.PHONY
:
ref
# coqdep doesn't emit dependencies for these so we just depend on everything
tests/%.ref
:
tests/%.v $(VFILES:.v=.vo)
$(SHOW)
COQTOP
[
ref]
$<
$(HIDE)TEST
=
"
$
$(
basename
-s .v
$<
)
"
&&
\
$(TIMER)
$(COQ_TEST)
$(TIMING_ARG)
$(COQFLAGS)
$(COQLIBS)
-load-vernac-source
$<
$(TIMING_EXTRA)
>
"tests/
$$
TEST.ref"
&&
\
(
$(REF_FILTER)
<
"tests/
$$
TEST.ref"
>
"tests/
$$
TEST.ref.filtered"
||
true
)
&&
\
mv
"tests/
$$
TEST.ref.filtered"
"tests/
$$
TEST.ref"
README.md
View file @
dbf8321a
...
...
@@ -118,6 +118,6 @@ The files in `tests/` are test cases. Each of the `.v` files comes with a
matching
`.ref`
file containing the expected output of
`coqc`
. Adding
`Show.`
in selected places in the proofs makes
`coqc`
print the current goal state.
This is used to make sure the proof mode prints goals and reduces terms the way
we expect it to. You can run
`make
ref
`
to re-generate all the
`.ref`
files;
we expect it to. You can run
`
MAKE_REF=1
make`
to re-generate all the
`.ref`
files;
this is useful after adding or removing
`Show.`
from a test. If you do this,
make sure to check the diff for any unexpected changes in the output!
ci
@
8ec855ae
Compare
16c8b610
...
8ec855ae
Subproject commit
16c8b6107119db3448b6828d3d2757888f2b2376
Subproject commit
8ec855ae44ec77fa7ce4e13101c6a08441d3abba
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment