Skip to content

Commit f12a84c

Browse files
panglesdjonludlam
authored andcommitted
Disable config file test for odoc_driver
It needs to be run manually, I could not make it run with cram tests.
1 parent 40d2149 commit f12a84c

File tree

11 files changed

+40
-51
lines changed

11 files changed

+40
-51
lines changed

src/driver/test/config_file/run.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
Unfortunately, cram test do not work well to test `odoc_driver`, due to
2+
interaction with opam and the sandboxing.
3+
4+
Here is how to test the "pkg_args" feature, **by hand**.
5+
6+
From the test_odoc_driver/ folder:
7+
8+
```shell
9+
$ opam pin .
10+
```
11+
12+
Have a look at the `test_odoc_driver/odoc-config.sexp` file to see how it looks
13+
14+
```shell
15+
$ cat test_odoc_driver/odoc-config.sexp
16+
(packages brr)
17+
(libraries brr brr.poke)
18+
```
19+
20+
From where you want (Most likely the root of the repo):
21+
22+
```shell
23+
$ dune exec -- odoc_driver -p test_odoc_driver -p brr --link-grep page-yo
24+
'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'
25+
```
26+
27+
You can also check the references in the `yo` page resolves, by visiting the
28+
generated page!
29+
30+
You can change the `odoc-config.sexp`, `opam upgrade test_odoc_driver` and rerun
31+
the driver to see how that affects the `-P` and `-L` values passed.
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
(lang dune 3.16)
2+
3+
(name test_odoc_driver)
4+
5+
(generate_opam_files true)
6+
7+
(package
8+
(name test_odoc_driver)
9+
(depends ocaml dune))

src/driver/test/pkg_args.t/run.t

Lines changed: 0 additions & 25 deletions
This file was deleted.

0 commit comments

Comments
 (0)