Debian Codegraph @

test/blackbox-tests/test-cases/rocq/rocq-native/coqtop/coqtop-no-build.t

raw
1 Testing the -no-build option of dune rocq top:
2
3 $ mkdir dir
4 $ cat >dir/bar.v <<EOF
5 > From basic Require Import foo.
6 > Definition mynum (i : mynat) := 3.
7 > EOF
8 $ cat >dir/foo.v <<EOF
9 > Definition mynat := nat.
10 > EOF
11 $ cat >dir/dune <<EOF
12 > (rocq.theory
13 > (name basic))
14 > EOF
15 $ cat >dune-project <<EOF
16 > (lang dune 3.21)
17 > (using rocq 0.11)
18 > EOF
19
20 On a fresh build, this should do nothing but should pass the correct flags:
21
22 $ dune rocq top --no-build --display short --toplevel echo dir/bar.v | ../scrub_coq_args.sh
23 -topfile $TESTCASE_ROOT/_build/default/dir/bar.v
24 -w -deprecated-native-compiler-option -native-output-dir .
25 -native-compiler on
26 -nI lib/rocq-runtime/kernel
27 -nI $TESTCASE_ROOT/_build/default/dir
28 -boot
29 -R coq/theories Corelib
30 -R $TESTCASE_ROOT/_build/default/dir basic
31
32 And for comparison normally a build would happen:
33
34 $ dune rocq top --display short --toplevel echo dir/bar.v | ../scrub_coq_args.sh
35 rocq dir/.basic.theory.d
36 rocq dir/Nbasic_foo.{cmi,cmxs},dir/foo.{glob,vo}
37 -topfile $TESTCASE_ROOT/_build/default/dir/bar.v
38 -w -deprecated-native-compiler-option -native-output-dir .
39 -native-compiler on
40 -nI lib/rocq-runtime/kernel
41 -nI $TESTCASE_ROOT/_build/default/dir
42 -boot
43 -R coq/theories Corelib
44 -R $TESTCASE_ROOT/_build/default/dir basic