-
Notifications
You must be signed in to change notification settings - Fork 413
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
dune coq top: add --no-build option to avoid building dependencies
Signed-off-by: Ali Caglayan <[email protected]>
- Loading branch information
Showing
3 changed files
with
54 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
38 changes: 38 additions & 0 deletions
38
test/blackbox-tests/test-cases/coq/coqtop/coqtop-no-build.t
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
Testing the -no-build opion of dune coq top: | ||
|
||
$ mkdir dir | ||
$ cat >dir/bar.v <<EOF | ||
> From basic Require Import foo. | ||
> Definition mynum (i : mynat) := 3. | ||
> EOF | ||
$ cat >dir/foo.v <<EOF | ||
> Definition mynat := nat. | ||
> EOF | ||
$ cat >dir/dune <<EOF | ||
> (coq.theory | ||
> (name basic)) | ||
> EOF | ||
$ cat >dune-project <<EOF | ||
> (lang dune 3.8) | ||
> (using coq 0.8) | ||
> EOF | ||
|
||
On a fresh build, this should do nothing but should pass the correct flags: | ||
|
||
$ dune coq top --no-build --display short --toplevel echo dir/bar.v | ../scrub_coq_args.sh | ||
-topfile $TESTCASE_ROOT/_build/default/dir/bar.v | ||
-w -deprecated-native-compiler-option -native-output-dir . -native-compiler on | ||
-I coq-core/kernel | ||
-nI $TESTCASE_ROOT/_build/default/dir | ||
-R coqtop/_build/default/dir basic | ||
|
||
And for comparison normally a build would happen: | ||
|
||
$ dune coq top --display short --toplevel echo dir/bar.v | ../scrub_coq_args.sh | ||
coqdep dir/.basic.theory.d | ||
coqc dir/Nbasic_foo.{cmi,cmxs},dir/foo.{glob,vo} | ||
-topfile $TESTCASE_ROOT/_build/default/dir/bar.v | ||
-w -deprecated-native-compiler-option -native-output-dir . -native-compiler on | ||
-I coq-core/kernel | ||
-nI $TESTCASE_ROOT/_build/default/dir | ||
-R coqtop/_build/default/dir basic |