From b94c6034026291b1f3388f2a5ba27d506a8a7a75 Mon Sep 17 00:00:00 2001 From: Hugo Heuzard Date: Thu, 23 Mar 2023 15:56:09 +0100 Subject: [PATCH] accept tests --- .../jsoo/explicit-js-mode-specified.t/run.t | 18 +++++++++++------- .../test-cases/jsoo/jsoo-config.t/run.t | 12 +++++++----- .../test-cases/jsoo/no-check-prim.t/run.t | 7 +++++-- .../test-cases/jsoo/public-libs.t/run.t | 3 ++- 4 files changed, 25 insertions(+), 15 deletions(-) diff --git a/test/blackbox-tests/test-cases/jsoo/explicit-js-mode-specified.t/run.t b/test/blackbox-tests/test-cases/jsoo/explicit-js-mode-specified.t/run.t index 6b9460d9b141..8924d6250573 100644 --- a/test/blackbox-tests/test-cases/jsoo/explicit-js-mode-specified.t/run.t +++ b/test/blackbox-tests/test-cases/jsoo/explicit-js-mode-specified.t/run.t @@ -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. @@ -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 @@ -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. @@ -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 diff --git a/test/blackbox-tests/test-cases/jsoo/jsoo-config.t/run.t b/test/blackbox-tests/test-cases/jsoo/jsoo-config.t/run.t index ba4ddc341d54..2e74068b5137 100644 --- a/test/blackbox-tests/test-cases/jsoo/jsoo-config.t/run.t +++ b/test/blackbox-tests/test-cases/jsoo/jsoo-config.t/run.t @@ -12,18 +12,20 @@ tests js_of_ocaml conigs 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} - ocamlc lib/library1.cma + 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/!use-js-string/library1.cma.js js_of_ocaml lib/.library1.objs/jsoo/default/library1.cma.js - js_of_ocaml bin/.bin1.eobjs/jsoo/dune__exe__Bin1.cmo.js - js_of_ocaml bin/.bin2.eobjs/jsoo/dune__exe__Bin2.cmo.js - js_of_ocaml bin/.bin3.eobjs/jsoo/dune__exe__Bin3.cmo.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 diff --git a/test/blackbox-tests/test-cases/jsoo/no-check-prim.t/run.t b/test/blackbox-tests/test-cases/jsoo/no-check-prim.t/run.t index 33fc4afab30e..78af37931ae7 100644 --- a/test/blackbox-tests/test-cases/jsoo/no-check-prim.t/run.t +++ b/test/blackbox-tests/test-cases/jsoo/no-check-prim.t/run.t @@ -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 diff --git a/test/blackbox-tests/test-cases/jsoo/public-libs.t/run.t b/test/blackbox-tests/test-cases/jsoo/public-libs.t/run.t index bb44601c9c9e..c7908d2b2ed8 100644 --- a/test/blackbox-tests/test-cases/jsoo/public-libs.t/run.t +++ b/test/blackbox-tests/test-cases/jsoo/public-libs.t/run.t @@ -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