diff --git a/test/blackbox-tests/jbuild b/test/blackbox-tests/jbuild index 3a4e56cc..081f2e7e 100644 --- a/test/blackbox-tests/jbuild +++ b/test/blackbox-tests/jbuild @@ -99,3 +99,10 @@ (action (chdir test-cases/ocaml-syntax (setenv JBUILDER ${bin:jbuilder} (run ${exe:cram.exe} run.t)))))) + +(alias + ((name runtest) + (deps ((files_recursively_in test-cases/gen-opam-install-file))) + (action + (chdir test-cases/gen-opam-install-file + (setenv JBUILDER ${bin:jbuilder} (run ${exe:cram.exe} run.t)))))) diff --git a/test/blackbox-tests/test-cases/gen-opam-install-file/bar.ml b/test/blackbox-tests/test-cases/gen-opam-install-file/bar.ml new file mode 100644 index 00000000..e69de29b diff --git a/test/blackbox-tests/test-cases/gen-opam-install-file/foo.ml b/test/blackbox-tests/test-cases/gen-opam-install-file/foo.ml new file mode 100644 index 00000000..e69de29b diff --git a/test/blackbox-tests/test-cases/gen-opam-install-file/foo.opam b/test/blackbox-tests/test-cases/gen-opam-install-file/foo.opam new file mode 100644 index 00000000..e69de29b diff --git a/test/blackbox-tests/test-cases/gen-opam-install-file/foo_byte.ml b/test/blackbox-tests/test-cases/gen-opam-install-file/foo_byte.ml new file mode 100644 index 00000000..e69de29b diff --git a/test/blackbox-tests/test-cases/gen-opam-install-file/jbuild b/test/blackbox-tests/test-cases/gen-opam-install-file/jbuild new file mode 100644 index 00000000..69c81765 --- /dev/null +++ b/test/blackbox-tests/test-cases/gen-opam-install-file/jbuild @@ -0,0 +1,28 @@ +(jbuild_version 1) + +(library + ((name foo) + (modules (foo)) + (wrapped false) + (public_name foo))) + +(library + ((name foo_byte) + (modules (foo_byte)) + (modes (byte)) + (public_name foo.byte))) + +(executables + ((names (bar)) + (modules (bar)) + (public_names (bar)) + (libraries (foo)))) + +(install + ((section share) + (files (bar.ml (bar.ml as baz.ml))))) + +(alias + ((name runtest) + (deps (foo.install)) + (action (echo "${read:foo.install}")))) diff --git a/test/blackbox-tests/test-cases/gen-opam-install-file/run.t b/test/blackbox-tests/test-cases/gen-opam-install-file/run.t new file mode 100644 index 00000000..d43cab93 --- /dev/null +++ b/test/blackbox-tests/test-cases/gen-opam-install-file/run.t @@ -0,0 +1,37 @@ + $ $JBUILDER runtest -j1 --root . + ocamldep bar.depends.ocamldep-output + ocamldep foo_byte.depends.ocamldep-output + ocamldep foo.depends.ocamldep-output + ocamlc foo_byte.{cmi,cmo,cmt} + ocamlc foo.{cmi,cmo,cmt} + ocamlc foo_byte.cma + ocamlopt foo.{cmx,o} + ocamlc bar.{cmi,cmo,cmt} + ocamlc foo.cma + ocamlopt foo.{a,cmxa} + ocamlopt bar.{cmx,o} + ocamlopt foo.cmxs + ocamlopt bar.exe + lib: [ + "_build/install/default/lib/foo/META" {"META"} + "_build/install/default/lib/foo/opam" {"opam"} + "_build/install/default/lib/foo/foo.cmi" + "_build/install/default/lib/foo/foo.cmx" + "_build/install/default/lib/foo/foo.cmt" + "_build/install/default/lib/foo/foo.ml" + "_build/install/default/lib/foo/foo.cma" + "_build/install/default/lib/foo/foo.cmxa" + "_build/install/default/lib/foo/foo.a" + "_build/install/default/lib/foo/foo.cmxs" + "_build/install/default/lib/foo/byte/foo_byte.cmi" {"byte/foo_byte.cmi"} + "_build/install/default/lib/foo/byte/foo_byte.cmt" {"byte/foo_byte.cmt"} + "_build/install/default/lib/foo/byte/foo_byte.ml" {"byte/foo_byte.ml"} + "_build/install/default/lib/foo/byte/foo_byte.cma" {"byte/foo_byte.cma"} + ] + bin: [ + "_build/install/default/bin/bar" {"bar"} + ] + share: [ + "_build/install/default/share/foo/bar.ml" + "_build/install/default/share/foo/baz.ml" {"baz.ml"} + ]