black box tests for .install file generation
This commit is contained in:
parent
b957e7d2dd
commit
5647ae83b0
|
@ -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))))))
|
||||
|
|
|
@ -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}"))))
|
|
@ -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"}
|
||||
]
|
Loading…
Reference in New Issue