Skip to content

Commit

Permalink
test(pkg): local sources in opam repo (ocaml#9583)
Browse files Browse the repository at this point in the history
Signed-off-by: Rudi Grinberg <me@rgrinberg.com>
  • Loading branch information
rgrinberg authored Dec 29, 2023
1 parent abed684 commit 77b531e
Showing 1 changed file with 26 additions and 1 deletion.
27 changes: 26 additions & 1 deletion test/blackbox-tests/test-cases/pkg/opam-source-conversion.t
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,36 @@ Test conversion of opam sources into lock dir package specifications
$ solve testpkg
Solution for dune.lock:
- testpkg.0.0.1

$ showpkg() {
> local f=dune.lock/testpkg.pkg
> [ -e $f ] && cat $f
> }

$ cat dune.lock/testpkg.pkg
$ showpkg
(version 0.0.1)

(source
(fetch
(url http://caml.inria.fr/pub/distrib/ocaml-3.11/ocaml-3.11.1.tar.gz)
(checksum md5=069aa55d40e548280f92af693f6c625a)))

$ mkdir testpkgsources

$ mkpkg testpkg <<EOF
> url {
> src: "file://$PWD/testpkgsources"
> }
> EOF

$ rm -rf dune.lock

$ solve testpkg 2>&1 | sed -E 's#.*.sandbox/[^/]+#.sandbox/$SANDBOX#g' | sed '/File "/q'
Package "testpkg" has source archive which lacks a checksum.
The source archive will be downloaded from:
.sandbox/$SANDBOX/default/test/blackbox-tests/test-cases/pkg/testpkgsources
Dune will compute its own checksum for this source archive.
File "vendor/opam/src/repository/opamRepository.ml", line 405, characters 31-37:

$ showpkg
[1]

0 comments on commit 77b531e

Please sign in to comment.