Switch examples testing to cram
This commit is contained in:
parent
e1114d18df
commit
142155551d
|
@ -1,27 +1,19 @@
|
||||||
(* -*- tuareg -*- *)
|
(jbuild_version 1)
|
||||||
|
|
||||||
module J = Jbuild_plugin.V1
|
|
||||||
|
|
||||||
let example_dir = "sample-projects"
|
|
||||||
|
|
||||||
let buf = Buffer.create 1024
|
|
||||||
let () = Buffer.add_string buf "(jbuild_version 1)\n"
|
|
||||||
|
|
||||||
let gen_example example =
|
|
||||||
let dir = Printf.sprintf "%s/%s" example_dir example in
|
|
||||||
Printf.bprintf buf {|
|
|
||||||
(alias
|
(alias
|
||||||
((name runtest)
|
((name runtest)
|
||||||
(deps ((files_recursively_in %s)))
|
(deps ((files_recursively_in sample-projects/hello_world)))
|
||||||
(action
|
(action
|
||||||
(chdir %s
|
(chdir sample-projects/hello_world
|
||||||
(ignore-outputs (run ${bin:jbuilder} build -j1 --root . @install @runtest))))))
|
(setenv JBUILDER ${bin:jbuilder}
|
||||||
|}
|
(run ${exe:../test/blackbox-tests/cram.exe} run.t))))))
|
||||||
dir dir
|
|
||||||
|
|
||||||
let () =
|
(alias
|
||||||
Array.iter gen_example (Sys.readdir "sample-projects")
|
((name runtest)
|
||||||
|
(deps ((files_recursively_in sample-projects/with-configure-step)))
|
||||||
let () = J.send (Buffer.contents buf)
|
(action
|
||||||
|
(chdir sample-projects/with-configure-step
|
||||||
|
(setenv JBUILDER ${bin:jbuilder}
|
||||||
|
(run ${exe:../test/blackbox-tests/cram.exe} run.t))))))
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,13 @@
|
||||||
|
$ $JBUILDER build -j1 --root . @install @runtest
|
||||||
|
ocamldep bin/main.depends.ocamldep-output
|
||||||
|
ocamldep lib/hello_world.depends.ocamldep-output
|
||||||
|
ocamlc lib/hello_world.{cmi,cmo,cmt}
|
||||||
|
ocamlopt lib/hello_world.{cmx,o}
|
||||||
|
ocamlc bin/main.{cmi,cmo,cmt}
|
||||||
|
ocamlc lib/hello_world.cma
|
||||||
|
ocamlopt lib/hello_world.{a,cmxa}
|
||||||
|
ocamlopt bin/main.{cmx,o}
|
||||||
|
ocamlopt lib/hello_world.cmxs
|
||||||
|
ocamlopt bin/main.exe
|
||||||
|
hello_world test/hello_world.output
|
||||||
|
diff alias test/runtest
|
|
@ -0,0 +1,8 @@
|
||||||
|
$ $JBUILDER build -j1 --root . @install @runtest
|
||||||
|
ocaml config.full
|
||||||
|
ocamldep src/plop.depends.ocamldep-output
|
||||||
|
ocamlc src/config.{cmi,cmo,cmt}
|
||||||
|
ocamlopt src/config.{cmx,o}
|
||||||
|
ocamlc src/plop.{cmi,cmo,cmt}
|
||||||
|
ocamlopt src/plop.{cmx,o}
|
||||||
|
ocamlopt src/plop.exe
|
Loading…
Reference in New Issue