diff --git a/src/driver/test/config_file/run.md b/src/driver/test/config_file/run.md new file mode 100644 index 0000000000..16659db068 --- /dev/null +++ b/src/driver/test/config_file/run.md @@ -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. diff --git a/src/driver/test/pkg_args.t/test_odoc_driver/doc/dune b/src/driver/test/config_file/test_odoc_driver/doc/dune similarity index 100% rename from src/driver/test/pkg_args.t/test_odoc_driver/doc/dune rename to src/driver/test/config_file/test_odoc_driver/doc/dune diff --git a/src/driver/test/pkg_args.t/test_odoc_driver/doc/yo.mld b/src/driver/test/config_file/test_odoc_driver/doc/yo.mld similarity index 100% rename from src/driver/test/pkg_args.t/test_odoc_driver/doc/yo.mld rename to src/driver/test/config_file/test_odoc_driver/doc/yo.mld diff --git a/src/driver/test/pkg_args.t/test_odoc_driver/dune b/src/driver/test/config_file/test_odoc_driver/dune similarity index 100% rename from src/driver/test/pkg_args.t/test_odoc_driver/dune rename to src/driver/test/config_file/test_odoc_driver/dune diff --git a/src/driver/test/config_file/test_odoc_driver/dune-project b/src/driver/test/config_file/test_odoc_driver/dune-project new file mode 100644 index 0000000000..a1e23333c9 --- /dev/null +++ b/src/driver/test/config_file/test_odoc_driver/dune-project @@ -0,0 +1,9 @@ +(lang dune 3.16) + +(name test_odoc_driver) + +(generate_opam_files true) + +(package + (name test_odoc_driver) + (depends ocaml dune)) diff --git a/src/driver/test/pkg_args.t/test_odoc_driver/lib/dune b/src/driver/test/config_file/test_odoc_driver/lib/dune similarity index 100% rename from src/driver/test/pkg_args.t/test_odoc_driver/lib/dune rename to src/driver/test/config_file/test_odoc_driver/lib/dune diff --git a/src/driver/test/pkg_args.t/test_odoc_driver/lib/test_odoc_driver.ml b/src/driver/test/config_file/test_odoc_driver/lib/test_odoc_driver.ml similarity index 100% rename from src/driver/test/pkg_args.t/test_odoc_driver/lib/test_odoc_driver.ml rename to src/driver/test/config_file/test_odoc_driver/lib/test_odoc_driver.ml diff --git a/src/driver/test/pkg_args.t/test_odoc_driver/odoc-config.sexp b/src/driver/test/config_file/test_odoc_driver/odoc-config.sexp similarity index 100% rename from src/driver/test/pkg_args.t/test_odoc_driver/odoc-config.sexp rename to src/driver/test/config_file/test_odoc_driver/odoc-config.sexp diff --git a/src/driver/test/pkg_args.t/test_odoc_driver/test_odoc_driver.opam b/src/driver/test/config_file/test_odoc_driver/test_odoc_driver.opam similarity index 100% rename from src/driver/test/pkg_args.t/test_odoc_driver/test_odoc_driver.opam rename to src/driver/test/config_file/test_odoc_driver/test_odoc_driver.opam diff --git a/src/driver/test/pkg_args.t/run.t b/src/driver/test/pkg_args.t/run.t deleted file mode 100644 index 809bada196..0000000000 --- a/src/driver/test/pkg_args.t/run.t +++ /dev/null @@ -1,25 +0,0 @@ -Unfortunately, this cram test does not work 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: - - $ opam pin . - -Have a look at the `test_odoc_driver/odoc-config.sexp` file to see how it looks - - $ cat test_odoc_driver/odoc-config.sexp - (packages brr) - (libraries brr brr.poke) - -From where you want (Most likely the root of the repo): - - $ 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. diff --git a/src/driver/test/pkg_args.t/test_odoc_driver/dune-project b/src/driver/test/pkg_args.t/test_odoc_driver/dune-project deleted file mode 100644 index e7f7cece84..0000000000 --- a/src/driver/test/pkg_args.t/test_odoc_driver/dune-project +++ /dev/null @@ -1,26 +0,0 @@ -(lang dune 3.16) - -(name test_odoc_driver) - -(generate_opam_files true) - -(source - (github username/reponame)) - -(authors "Author Name") - -(maintainers "Maintainer Name") - -(license LICENSE) - -(documentation https://url/to/documentation) - -(package - (name test_odoc_driver) - (synopsis "A short synopsis") - (description "A longer description") - (depends ocaml dune) - (tags - (topics "to describe" your project))) - -; See the complete stanza docs at https://dune.readthedocs.io/en/stable/reference/dune-project/index.html