Skip to content

Commit

Permalink
accept tests
Browse files Browse the repository at this point in the history
  • Loading branch information
hhugo committed Jul 10, 2023
1 parent 8a9d9a4 commit 2061226
Show file tree
Hide file tree
Showing 4 changed files with 47 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Check that .bc.js rule is generated only if js mode is used.
ocamlc .b.eobjs/byte/b.{cmi,cmo,cmt}
js_of_ocaml .js/default/stdlib/std_exit.cmo.js
js_of_ocaml .js/default/stdlib/stdlib.cma.js
js_of_ocaml .b.eobjs/jsoo/b.cmo.js
js_of_ocaml .b.eobjs/jsoo/default/b.cmo.js
js_of_ocaml b.bc.js

We also check that .cmo.js rules are not generated if not specified.
Expand All @@ -24,10 +24,11 @@ JS compilation of libraries is always available to avoid having to annotate
every dependency of an executable.

$ dune build --display short _build/default/.foo.objs/jsoo/default/foo.cma.js
ocamlc .foo.objs/byte/foo.{cmi,cmo,cmt}
ocamldep .foo.objs/foo__C.impl.d
ocamlc .foo.objs/byte/foo.{cmi,cmo,cmt}
js_of_ocaml .foo.objs/jsoo/default/foo.cmo.js
ocamlc .foo.objs/byte/foo__C.{cmi,cmo,cmt}
ocamlc foo.cma
js_of_ocaml .foo.objs/jsoo/default/foo__C.cmo.js
js_of_ocaml .foo.objs/jsoo/default/foo.cma.js

Check that js targets are attached to @all, but not for tests that do not
Expand All @@ -39,10 +40,12 @@ specify js mode (#1940).
js_of_ocaml .e.eobjs/jsoo/e.bc.runtime.js
js_of_ocaml .js/default/stdlib/std_exit.cmo.js
js_of_ocaml .js/default/stdlib/stdlib.cma.js
js_of_ocaml .b.eobjs/jsoo/b.cmo.js
js_of_ocaml .foo.objs/jsoo/default/foo.cmo.js
js_of_ocaml .b.eobjs/jsoo/default/b.cmo.js
js_of_ocaml .foo.objs/jsoo/default/foo__C.cmo.js
js_of_ocaml b.bc.js
js_of_ocaml .foo.objs/jsoo/default/foo.cma.js
js_of_ocaml .e.eobjs/jsoo/e.cmo.js
js_of_ocaml .e.eobjs/jsoo/default/e.cmo.js
js_of_ocaml e.bc.js

Check that building a JS-enabled executable that depends on a library works.
Expand All @@ -56,8 +59,9 @@ Check that building a JS-enabled executable that depends on a library works.
js_of_ocaml .js/default/stdlib/std_exit.cmo.js
js_of_ocaml .js/default/stdlib/stdlib.cma.js
ocamlc .foo.objs/byte/foo__C.{cmi,cmo,cmt}
js_of_ocaml .foo.objs/jsoo/default/foo.cmo.js
ocamlc .e.eobjs/byte/e.{cmi,cmo,cmt}
ocamlc foo.cma
js_of_ocaml .e.eobjs/jsoo/e.cmo.js
js_of_ocaml .foo.objs/jsoo/default/foo__C.cmo.js
js_of_ocaml .e.eobjs/jsoo/default/e.cmo.js
js_of_ocaml .foo.objs/jsoo/default/foo.cma.js
js_of_ocaml e.bc.js
30 changes: 29 additions & 1 deletion test/blackbox-tests/test-cases/jsoo/jsoo-config.t/run.t
Original file line number Diff line number Diff line change
@@ -1,6 +1,34 @@
tests js_of_ocaml conigs

$ dune build bin/bin1.bc.js bin/bin2.bc.js bin/bin3.bc.js
$ dune build bin/bin1.bc.js bin/bin2.bc.js bin/bin3.bc.js --display short
js_of_ocaml bin/.bin1.eobjs/jsoo/bin1.bc.runtime.js
js_of_ocaml bin/.bin2.eobjs/jsoo/bin2.bc.runtime.js
js_of_ocaml bin/.bin3.eobjs/jsoo/bin3.bc.runtime.js
js_of_ocaml .js/use-js-string/stdlib/std_exit.cmo.js
js_of_ocaml .js/use-js-string/stdlib/stdlib.cma.js
ocamlc lib/.library1.objs/byte/library1.{cmi,cmo,cmt}
js_of_ocaml .js/!use-js-string/stdlib/std_exit.cmo.js
js_of_ocaml .js/!use-js-string/stdlib/stdlib.cma.js
js_of_ocaml .js/default/stdlib/std_exit.cmo.js
js_of_ocaml .js/default/stdlib/stdlib.cma.js
ocamlc bin/.bin1.eobjs/byte/dune__exe__Bin1.{cmi,cmti}
js_of_ocaml lib/.library1.objs/jsoo/use-js-string/library1.cmo.js
ocamlc bin/.bin2.eobjs/byte/dune__exe__Bin2.{cmi,cmti}
ocamlc bin/.bin3.eobjs/byte/dune__exe__Bin3.{cmi,cmti}
js_of_ocaml lib/.library1.objs/jsoo/!use-js-string/library1.cmo.js
js_of_ocaml lib/.library1.objs/jsoo/default/library1.cmo.js
ocamlc bin/.bin1.eobjs/byte/dune__exe__Bin1.{cmo,cmt}
js_of_ocaml lib/.library1.objs/jsoo/use-js-string/library1.cma.js
ocamlc bin/.bin2.eobjs/byte/dune__exe__Bin2.{cmo,cmt}
ocamlc bin/.bin3.eobjs/byte/dune__exe__Bin3.{cmo,cmt}
js_of_ocaml lib/.library1.objs/jsoo/!use-js-string/library1.cma.js
js_of_ocaml lib/.library1.objs/jsoo/default/library1.cma.js
js_of_ocaml bin/.bin1.eobjs/jsoo/use-js-string/dune__exe__Bin1.cmo.js
js_of_ocaml bin/.bin2.eobjs/jsoo/!use-js-string/dune__exe__Bin2.cmo.js
js_of_ocaml bin/.bin3.eobjs/jsoo/default/dune__exe__Bin3.cmo.js
js_of_ocaml bin/bin1.bc.js
js_of_ocaml bin/bin2.bc.js
js_of_ocaml bin/bin3.bc.js
$ node _build/default/bin/bin1.bc.js
Hello bin1
Hi library1
Expand Down
7 changes: 5 additions & 2 deletions test/blackbox-tests/test-cases/jsoo/no-check-prim.t/run.t
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,20 @@ Compilation using jsoo
js_of_ocaml .js/default/js_of_ocaml/js_of_ocaml.cma.js
js_of_ocaml .js/default/stdlib/std_exit.cmo.js
js_of_ocaml .js/default/stdlib/stdlib.cma.js
js_of_ocaml lib/.x.objs/jsoo/default/x__.cmo.js
ocamlopt lib/.x.objs/native/x__Y.{cmx,o}
ocamlc lib/.x.objs/byte/x.{cmi,cmo,cmt}
js_of_ocaml lib/.x.objs/jsoo/default/x__Y.cmo.js
ocamlopt lib/.x.objs/native/x.{cmx,o}
ocamlc bin/.technologic.eobjs/byte/z.{cmi,cmo,cmt}
ocamlc lib/x.cma
js_of_ocaml lib/.x.objs/jsoo/default/x.cmo.js
ocamlopt lib/x.{a,cmxa}
ocamlc bin/.technologic.eobjs/byte/technologic.{cmi,cmo,cmt}
js_of_ocaml bin/.technologic.eobjs/jsoo/z.cmo.js
js_of_ocaml bin/.technologic.eobjs/jsoo/default/z.cmo.js
js_of_ocaml lib/.x.objs/jsoo/default/x.cma.js
ocamlopt lib/x.cmxs
js_of_ocaml bin/.technologic.eobjs/jsoo/technologic.cmo.js
js_of_ocaml bin/.technologic.eobjs/jsoo/default/technologic.cmo.js
js_of_ocaml bin/technologic.bc.js
$ node ./_build/default/bin/technologic.bc.js
buy it
Expand Down
3 changes: 2 additions & 1 deletion test/blackbox-tests/test-cases/jsoo/public-libs.t/run.t
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,11 @@ Compilation of libraries with pulic-names
ocamlc a/a.cma
js_of_ocaml .js/default/stdlib/std_exit.cmo.js
js_of_ocaml .js/default/stdlib/stdlib.cma.js
js_of_ocaml a/.a.objs/jsoo/default/a.cmo.js
ocamlopt a/a.{a,cmxa}
ocamlc b/.main.eobjs/byte/dune__exe__Main.{cmo,cmt}
js_of_ocaml a/.a.objs/jsoo/default/a.cma.js
ocamlopt a/a.cmxs
ocamlc b/main.bc-for-jsoo
js_of_ocaml b/.main.eobjs/jsoo/dune__exe__Main.cmo.js
js_of_ocaml b/.main.eobjs/jsoo/default/dune__exe__Main.cmo.js
js_of_ocaml b/main.bc.js

0 comments on commit 2061226

Please sign in to comment.