Debian Codegraph @

test/blackbox-tests/test-cases/merlin/instrumentation.t/run.t

raw
1 $ ocamlc_where="$(ocamlc -where)"
2 $ export BUILD_PATH_PREFIX_MAP="/OCAMLC_WHERE=$ocamlc_where:$BUILD_PATH_PREFIX_MAP"
3 $ ocamlfind_libs="$(ocamlfind printconf path | while read line; do printf lib=${line}:; done)"
4 $ export BUILD_PATH_PREFIX_MAP="$ocamlfind_libs:$BUILD_PATH_PREFIX_MAP"
5
6 Here we test that instrumentation processing is not passed to merlin by setting
7 up a project with instrumentation and testing checking the merlin config.
8
9 $ dune build --instrument-with hello ./lib/.merlin-conf/lib-foo ./lib/.merlin-conf/lib-bar --profile release
10 $ dune ocaml merlin dump-config --format=json $PWD/lib \
11 > | jq -r '
12 > include "dune";
13 > .[]
14 > | select(
15 > .module_name == "Bar"
16 > or .module_name == "Foo"
17 > or .module_name == "Privmod"
18 > )
19 > | merlinJsonEntryWithConfigNames(["FLG", "UNIT_NAME"])'
20 Bar: _build/default/lib/bar
21 ["FLG",["-w","-40","-g"]]
22 ["UNIT_NAME","bar"]
23 Bar: _build/default/lib/bar.ml-gen
24 ["FLG",["-w","-40","-g"]]
25 ["UNIT_NAME","bar"]
26 Foo: _build/default/lib/foo
27 ["FLG",["-w","-40","-g"]]
28 ["UNIT_NAME","foo"]
29 Foo: _build/default/lib/foo.ml-gen
30 ["FLG",["-w","-40","-g"]]
31 ["UNIT_NAME","foo"]
32 Privmod: _build/default/lib/privmod
33 ["FLG",["-w","-40","-g"]]
34 ["FLG",["-open","Foo"]]
35 ["UNIT_NAME","foo__Privmod"]
36 Privmod: _build/default/lib/privmod.ml
37 ["FLG",["-w","-40","-g"]]
38 ["FLG",["-open","Foo"]]
39 ["UNIT_NAME","foo__Privmod"]