Update the package-dep test to test dependencies between packages
This commit is contained in:
parent
b5fad14f16
commit
a729409fa7
|
@ -1,11 +1,33 @@
|
|||
(jbuild_version 1)
|
||||
|
||||
(library
|
||||
((name foo)
|
||||
((name foo)
|
||||
(public_name foo)
|
||||
(modules (foo))))
|
||||
(modules (foo))))
|
||||
|
||||
(library
|
||||
((name bar)
|
||||
(public_name bar)
|
||||
(libraries (foo))
|
||||
(modules (bar))))
|
||||
|
||||
(rule
|
||||
(with-stdout-to foo.ml
|
||||
(echo "let x = 42")))
|
||||
|
||||
(rule
|
||||
(with-stdout-to bar.ml
|
||||
(echo "let x = string_of_int Foo.x")))
|
||||
|
||||
(rule
|
||||
(with-stdout-to test.ml
|
||||
(echo "let () = Printf.printf \"%d %s\" Foo.x Bar.x")))
|
||||
|
||||
(rule
|
||||
((deps ((package bar)))
|
||||
(targets (test.exe))
|
||||
(action (run ocamlfind ocamlc -linkpkg -package bar -o test.exe test.ml))))
|
||||
|
||||
(alias
|
||||
((name runtest)
|
||||
(deps ((package foo)))
|
||||
(action (echo "package foo"))))
|
||||
((name runtest)
|
||||
(action (run ./test.exe))))
|
||||
|
|
|
@ -1,8 +1,14 @@
|
|||
$ $JBUILDER runtest -j1 --display short --root .
|
||||
ocamldep bar.ml.d
|
||||
ocamldep foo.ml.d
|
||||
ocamlc .foo.objs/foo.{cmi,cmo,cmt}
|
||||
ocamlc .bar.objs/bar.{cmi,cmo,cmt}
|
||||
ocamlc bar.cma
|
||||
ocamlopt .foo.objs/foo.{cmx,o}
|
||||
ocamlopt foo.{a,cmxa}
|
||||
ocamlopt foo.cmxs
|
||||
ocamlc foo.cma
|
||||
package foo
|
||||
ocamlopt .bar.objs/bar.{cmx,o}
|
||||
ocamlopt bar.{a,cmxa}
|
||||
ocamlopt bar.cmxs
|
||||
ocamlfind test.exe (exit 2)
|
||||
(cd _build/default && /Users/rgrinberg/.opam/4.05.0/bin/ocamlfind ocamlc -linkpkg -package bar -o test.exe test.ml)
|
||||
ocamlfind: Package `foo' not found - required by `bar'
|
||||
[1]
|
||||
|
|
Loading…
Reference in New Issue