-
Notifications
You must be signed in to change notification settings - Fork 414
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor the test case into a single file
The only real change between this file and pkg/libraries.t is the build command. Signed-off-by: Andrew Patterson <[email protected]>
- Loading branch information
Showing
9 changed files
with
55 additions
and
36 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,55 @@ | ||
This test attempts to build the ocaml index while depending on a library | ||
installed through a lock file. | ||
|
||
We set up a library that will be installed as part of the package: | ||
|
||
$ mkdir external_sources | ||
$ cat >external_sources/dune-project <<EOF | ||
> (lang dune 3.11) | ||
> (package (name mypkg)) | ||
> EOF | ||
$ cat >external_sources/dune <<EOF | ||
> (library | ||
> (public_name mypkg.lib) | ||
> (name test_lib)) | ||
> EOF | ||
$ cat >external_sources/test_lib.ml <<EOF | ||
> let x = () | ||
> EOF | ||
|
||
Now we set up a lock file with this package and then attempt to use it: | ||
|
||
$ cat >dune-project <<EOF | ||
> (lang dune 3.11) | ||
> EOF | ||
|
||
$ mkdir dune.lock | ||
$ cat >dune.lock/lock.dune <<EOF | ||
> (lang package 0.1) | ||
> EOF | ||
|
||
$ cat >dune.lock/mypkg.pkg <<EOF | ||
> (version 0.0.1) | ||
> (source (copy $PWD/external_sources)) | ||
> (build (run dune build --release --promote-install-file=true . @install)) | ||
> EOF | ||
|
||
$ cat >dune <<EOF | ||
> (dirs (:standard \ external_sources)) | ||
> (library | ||
> (name foo) | ||
> (libraries mypkg.lib)) | ||
> EOF | ||
|
||
$ cat >foo.ml <<EOF | ||
> let () = Test_lib.x | ||
> EOF | ||
|
||
$ dune build @ocaml-index | ||
Error: This rule defines a directory target "default/.pkg/mypkg/target" that | ||
matches the requested path | ||
"default/.pkg/mypkg/target/lib/mypkg/lib/cctx.ocaml-index" but the rule's | ||
action didn't produce it | ||
-> required by _build/default/.foo.objs/cctx.ocaml-index | ||
-> required by alias ocaml-index | ||
[1] |
This file was deleted.
Oops, something went wrong.
1 change: 0 additions & 1 deletion
1
test/blackbox-tests/test-cases/ocaml-index/gh10985/dune-project
This file was deleted.
Oops, something went wrong.
1 change: 0 additions & 1 deletion
1
test/blackbox-tests/test-cases/ocaml-index/gh10985/dune.lock/lock.dune
This file was deleted.
Oops, something went wrong.
3 changes: 0 additions & 3 deletions
3
test/blackbox-tests/test-cases/ocaml-index/gh10985/external_sources/dune
This file was deleted.
Oops, something went wrong.
2 changes: 0 additions & 2 deletions
2
test/blackbox-tests/test-cases/ocaml-index/gh10985/external_sources/dune-project
This file was deleted.
Oops, something went wrong.
1 change: 0 additions & 1 deletion
1
test/blackbox-tests/test-cases/ocaml-index/gh10985/external_sources/test_lib.ml
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.