Skip to content

Commit

Permalink
Disable config file test for odoc_driver
Browse files Browse the repository at this point in the history
It needs to be run manually, I could not make it run with cram tests.
  • Loading branch information
panglesd authored and jonludlam committed Oct 3, 2024
1 parent 40d2149 commit f12a84c
Show file tree
Hide file tree
Showing 11 changed files with 40 additions and 51 deletions.
31 changes: 31 additions & 0 deletions src/driver/test/config_file/run.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
Unfortunately, cram test do not work well to test `odoc_driver`, due to
interaction with opam and the sandboxing.

Here is how to test the "pkg_args" feature, **by hand**.

From the test_odoc_driver/ folder:

```shell
$ opam pin .
```

Have a look at the `test_odoc_driver/odoc-config.sexp` file to see how it looks

```shell
$ cat test_odoc_driver/odoc-config.sexp
(packages brr)
(libraries brr brr.poke)
```

From where you want (Most likely the root of the repo):

```shell
$ dune exec -- odoc_driver -p test_odoc_driver -p brr --link-grep page-yo
'odoc' 'link' '_odoc/test_odoc_driver/doc/page-yo.odoc' '-o' '_odoc/test_odoc_driver/doc/page-yo.odocl' '-I' '_odoc/test_odoc_driver/doc/' '-I' 'test_odoc_driver/lib/test_odoc_driver' '-P' 'brr:_odoc/brr/doc' '-P' 'test_odoc_driver:_odoc/test_odoc_driver/doc' '-L' 'brr.poke:_odoc/brr/lib/brr.poke' '-L' 'brr:_odoc/brr/lib/brr' '-L' 'test_odoc_driver:_odoc/test_odoc_driver/lib/test_odoc_driver' '--current-package' 'test_odoc_driver' '--enable-missing-root-warning'
```

You can also check the references in the `yo` page resolves, by visiting the
generated page!

You can change the `odoc-config.sexp`, `opam upgrade test_odoc_driver` and rerun
the driver to see how that affects the `-P` and `-L` values passed.
9 changes: 9 additions & 0 deletions src/driver/test/config_file/test_odoc_driver/dune-project
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
(lang dune 3.16)

(name test_odoc_driver)

(generate_opam_files true)

(package
(name test_odoc_driver)
(depends ocaml dune))
25 changes: 0 additions & 25 deletions src/driver/test/pkg_args.t/run.t

This file was deleted.

26 changes: 0 additions & 26 deletions src/driver/test/pkg_args.t/test_odoc_driver/dune-project

This file was deleted.

0 comments on commit f12a84c

Please sign in to comment.