Add test for classical ppx
Test that generated META can be used by ocamlfind Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
This commit is contained in:
parent
62edd42d8a
commit
939341af16
|
@ -46,7 +46,7 @@ case "$TARGET" in
|
||||||
rm -rf ~/.opam
|
rm -rf ~/.opam
|
||||||
opam init --yes
|
opam init --yes
|
||||||
eval $(opam config env)
|
eval $(opam config env)
|
||||||
opam install utop ppx_driver odoc menhir ocaml-migrate-parsetree js_of_ocaml-ppx js_of_ocaml-compiler--yes
|
opam install ocamlfind utop ppx_driver odoc menhir ocaml-migrate-parsetree js_of_ocaml-ppx js_of_ocaml-compiler--yes
|
||||||
opam remove jbuilder `opam list --depends-on jbuilder --installed --short` --yes
|
opam remove jbuilder `opam list --depends-on jbuilder --installed --short` --yes
|
||||||
if opam info dune &> /dev/null; then
|
if opam info dune &> /dev/null; then
|
||||||
opam remove dune `opam list --depends-on dune --installed --short` --yes
|
opam remove dune `opam list --depends-on dune --installed --short` --yes
|
||||||
|
@ -82,7 +82,7 @@ case "$TARGET" in
|
||||||
echo "depends: [\"dune\"]" >> jbuilder.opam
|
echo "depends: [\"dune\"]" >> jbuilder.opam
|
||||||
opam pin add dune . --no-action --yes
|
opam pin add dune . --no-action --yes
|
||||||
opam pin add jbuilder . --no-action --yes
|
opam pin add jbuilder . --no-action --yes
|
||||||
opam install utop ppx_driver odoc ocaml-migrate-parsetree js_of_ocaml-ppx js_of_ocaml-compiler --yes
|
opam install ocamlfind utop ppx_driver odoc ocaml-migrate-parsetree js_of_ocaml-ppx js_of_ocaml-compiler --yes
|
||||||
echo -en "travis_fold:end:opam.deps\r"
|
echo -en "travis_fold:end:opam.deps\r"
|
||||||
fi
|
fi
|
||||||
echo -en "travis_fold:start:dune.bootstrap\r"
|
echo -en "travis_fold:start:dune.bootstrap\r"
|
||||||
|
|
|
@ -13,4 +13,4 @@
|
||||||
(executable
|
(executable
|
||||||
((name w_ppx_driver_flags)
|
((name w_ppx_driver_flags)
|
||||||
(modules (w_ppx_driver_flags))
|
(modules (w_ppx_driver_flags))
|
||||||
(preprocess (pps (fooppx -flag (-arg omp) ppx_driver.runner)))))
|
(preprocess (pps (fooppx -flag (-arg omp) ppx_driver.runner)))))
|
|
@ -1,4 +1,5 @@
|
||||||
(library
|
(library
|
||||||
((name fooppx)
|
((name fooppx)
|
||||||
|
(public_name fooppx)
|
||||||
(kind ppx_rewriter)
|
(kind ppx_rewriter)
|
||||||
(libraries (ocaml-migrate-parsetree))))
|
(libraries (ocaml-migrate-parsetree))))
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
ocamlc ppx/.fooppx.objs/fooppx.{cmi,cmo,cmt}
|
ocamlc ppx/.fooppx.objs/fooppx.{cmi,cmo,cmt}
|
||||||
ocamlopt ppx/.fooppx.objs/fooppx.{cmx,o}
|
ocamlopt ppx/.fooppx.objs/fooppx.{cmx,o}
|
||||||
ocamlopt ppx/fooppx.{a,cmxa}
|
ocamlopt ppx/fooppx.{a,cmxa}
|
||||||
ocamlopt .ppx/fooppx@./ppx.exe
|
ocamlopt .ppx/fooppx/ppx.exe
|
||||||
ppx w_omp_driver.pp.ml
|
ppx w_omp_driver.pp.ml
|
||||||
ocamldep w_omp_driver.pp.ml.d
|
ocamldep w_omp_driver.pp.ml.d
|
||||||
ocamlc .w_omp_driver.eobjs/w_omp_driver.{cmi,cmo,cmt}
|
ocamlc .w_omp_driver.eobjs/w_omp_driver.{cmi,cmo,cmt}
|
||||||
|
@ -18,3 +18,5 @@
|
||||||
ocamlopt w_ppx_driver.exe
|
ocamlopt w_ppx_driver.exe
|
||||||
This test is broken because ppx_driver doesn't support migrate custom arguments
|
This test is broken because ppx_driver doesn't support migrate custom arguments
|
||||||
# $ dune build ./w_ppx_driver_flags.exe --display short
|
# $ dune build ./w_ppx_driver_flags.exe --display short
|
||||||
|
$ dune build && dune exec -- ocamlfind opt -package fooppx -ppxopt "fooppx,-flag" -linkpkg w_omp_driver.ml -o w_omp_driver.exe
|
||||||
|
pass -arg to fooppx
|
||||||
|
|
Loading…
Reference in New Issue