Skip to content

Commit

Permalink
Add test using instrumentation backend defined in installed library
Browse files Browse the repository at this point in the history
Signed-off-by: Nicolás Ojeda Bär <n.oje.bar@gmail.com>
  • Loading branch information
nojb committed Aug 22, 2020
1 parent 25cf0fe commit cd81c10
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion test/blackbox-tests/test-cases/instrumentation.t/run.t
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ Dune!" at the beginning of the module.
> (modules main)
> (libraries mylib)
> (instrumentation (backend hello)))
>
> (library
> (name mylib)
> (modules mylib)
Expand Down Expand Up @@ -106,3 +105,20 @@ Per-context setting takes precedence over per-workspace setting.
$ dune build

$ _build/coverage/main.exe

Next, we check the backend can be used when it is installed.

$ dune build ppx/hello.install
$ dune install hello --prefix _install 2>/dev/null
$ grep instrumentation.backend _install/lib/hello/dune-package
(instrumentation.backend hello.ppx))
$ mkdir -p installed
$ cat >installed/dune-workspace <<EOF
> (lang dune 2.7)
> (instrument_with hello)
> EOF
$ cp dune dune-project main.ml mylib.ml installed
$ OCAMLPATH=$PWD/_install/lib dune build --root installed
Entering directory 'installed'
$ installed/_build/default/main.exe
Hello, Dune!

0 comments on commit cd81c10

Please sign in to comment.