-
Notifications
You must be signed in to change notification settings - Fork 89
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Driver: Add instructions to test the pkg_args values
I could not make it run in cram tests: it has to be tested by hand.
- Loading branch information
Showing
9 changed files
with
95 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
(documentation) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{0 Hey} | ||
|
||
Bli {!/brr/page-index} {!/brr.poke/Brr_poke} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
(install | ||
(files odoc-config.sexp) | ||
(section doc)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
(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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
(library | ||
(public_name test_odoc_driver) | ||
(name test_odoc_driver)) |
1 change: 1 addition & 0 deletions
1
src/driver/test/pkg_args.t/test_odoc_driver/lib/test_odoc_driver.ml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
let x = 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
(packages brr) | ||
(libraries brr brr.poke) |
31 changes: 31 additions & 0 deletions
31
src/driver/test/pkg_args.t/test_odoc_driver/test_odoc_driver.opam
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# This file is generated by dune, edit dune-project instead | ||
opam-version: "2.0" | ||
synopsis: "A short synopsis" | ||
description: "A longer description" | ||
maintainer: ["Maintainer Name"] | ||
authors: ["Author Name"] | ||
license: "LICENSE" | ||
tags: ["topics" "to describe" "your" "project"] | ||
homepage: "https://github.com/username/reponame" | ||
doc: "https://url/to/documentation" | ||
bug-reports: "https://github.com/username/reponame/issues" | ||
depends: [ | ||
"ocaml" | ||
"dune" {>= "3.16"} | ||
"odoc" {with-doc} | ||
] | ||
build: [ | ||
["dune" "subst"] {dev} | ||
[ | ||
"dune" | ||
"build" | ||
"-p" | ||
name | ||
"-j" | ||
jobs | ||
"@install" | ||
"@runtest" {with-test} | ||
"@doc" {with-doc} | ||
] | ||
] | ||
dev-repo: "git+https://github.com/username/reponame.git" |