diff --git a/CHANGES.md b/CHANGES.md index 5a4a9e1a4f..668a2d57c9 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -2,6 +2,7 @@ ## Features/Changes * Lib: fix the type of some DOM properties and methods (#1747) +* Test: use dune test stanzas (#1631) # 5.9.0 (2024-11-22) - Lille diff --git a/compiler/tests-env/dune b/compiler/tests-env/dune index 908269b062..1a392b7b9b 100644 --- a/compiler/tests-env/dune +++ b/compiler/tests-env/dune @@ -1,27 +1,11 @@ -(executable +(test (modes js) (js_of_ocaml + (javascript_files setup.js) (flags :standard --setenv JSOO_C=from-jsoo-args)) - (name test)) - -(rule - (target test.js) - (action - (with-outputs-to - %{target} - (cat %{dep:setup.js} %{dep:./test.bc.js})))) - -(rule - (target test.output) (action - (with-outputs-to - %{target} - (setenv - JSOO_B - from-env - (run node %{dep:./test.js}))))) - -(rule - (alias runtest) - (action - (diff test.reference test.output))) + (setenv + JSOO_B + from-env + (run node %{test}))) + (name test)) diff --git a/compiler/tests-env/test.reference b/compiler/tests-env/test.expected similarity index 100% rename from compiler/tests-env/test.reference rename to compiler/tests-env/test.expected diff --git a/compiler/tests-jsoo/dune b/compiler/tests-jsoo/dune index 711186b489..ca6f45862f 100644 --- a/compiler/tests-jsoo/dune +++ b/compiler/tests-jsoo/dune @@ -20,16 +20,32 @@ (preprocess (pps ppx_expect))) +(library + (name jsoo_testsuite_parsing) + (modules test_parsing calc_parser calc_lexer) + (libraries unix compiler-libs.common js_of_ocaml-compiler) + (enabled_if + (>= %{ocaml_version} 5.1.1)) + (inline_tests + (modes js best)) + (preprocess + (pps ppx_expect))) + (library (name jsoo_testsuite) (modules - (:standard \ test_io test_floats test_marshal_compressed)) + (:standard + \ + test_io + test_floats + test_marshal_compressed + test_parsing + calc_parser + calc_lexer)) (libraries unix compiler-libs.common js_of_ocaml-compiler) (foreign_stubs (language c) - (names bigarray_stubs flush_stubs)) - (js_of_ocaml - (javascript_files runtime.js)) + (names bigarray_stubs)) (inline_tests (modes js best)) (preprocess diff --git a/compiler/tests-jsoo/flush_stubs.c b/compiler/tests-jsoo/flush_stubs.c deleted file mode 100644 index 099b0927d6..0000000000 --- a/compiler/tests-jsoo/flush_stubs.c +++ /dev/null @@ -1,12 +0,0 @@ - -#include -#include "caml/mlvalues.h" -#include "caml/memory.h" - -CAMLprim value flush_stdout_stderr (value unit) { - (void)unit; - CAMLparam0 (); /* v is ignored */ - fflush(stderr); - fflush(stdout); - CAMLreturn (Val_unit); -} diff --git a/compiler/tests-jsoo/lib-effects/dune b/compiler/tests-jsoo/lib-effects/dune index 62319c8a50..42475386b2 100644 --- a/compiler/tests-jsoo/lib-effects/dune +++ b/compiler/tests-jsoo/lib-effects/dune @@ -1,12 +1,17 @@ +(env + (using-effects) + (wasm) + (wasm-effects) + (_ + (js_of_ocaml + (flags + (:standard --enable effects))))) + (library (name jsoo_testsuite_effect) (enabled_if - (and - (>= %{ocaml_version} 5) - (= %{profile} using-effects))) + (>= %{ocaml_version} 5)) (inline_tests - ;; This requires the unreleased dune 3.7 to work - (enabled_if true) (modes js best)) (preprocess (pps ppx_expect))) diff --git a/compiler/tests-jsoo/runtime.js b/compiler/tests-jsoo/runtime.js deleted file mode 100644 index 0734415a19..0000000000 --- a/compiler/tests-jsoo/runtime.js +++ /dev/null @@ -1,2 +0,0 @@ -//Provides: flush_stdout_stderr -function flush_stdout_stderr(_unit) { return 0 } diff --git a/compiler/tests-jsoo/test_parsing.ml b/compiler/tests-jsoo/test_parsing.ml index 4be62aa8f7..cba1eee0c9 100644 --- a/compiler/tests-jsoo/test_parsing.ml +++ b/compiler/tests-jsoo/test_parsing.ml @@ -17,22 +17,15 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *) -(* see https://github.com/ocaml/ocaml/pull/12046 *) -external flush_stdout_stderr : unit -> unit = "flush_stdout_stderr" - let parse s = - flush_stdout_stderr (); try let lexbuf = Lexing.from_string s in while true do let result = Calc_parser.main Calc_lexer.token lexbuf in - flush_stdout_stderr (); print_int result; print_newline () done - with Calc_lexer.Eof -> - flush_stdout_stderr (); - print_endline "EOF" + with Calc_lexer.Eof -> print_endline "EOF" let%expect_test "parsing" = let (old : bool) = Parsing.set_trace true in diff --git a/compiler/tests-linkall/dune b/compiler/tests-linkall/dune index 23747dc90f..4b1df9f693 100644 --- a/compiler/tests-linkall/dune +++ b/compiler/tests-linkall/dune @@ -5,7 +5,7 @@ (js_of_ocaml (compilation_mode separate)))) -(executable +(test (name test) (modes byte js) (libraries dynlink) @@ -15,15 +15,3 @@ ;; Let's use it for the test (link_flags (:standard -linkall))) - -(rule - (target test.output) - (action - (with-stdout-to - %{target} - (run node %{dep:test.bc.js})))) - -(rule - (alias runtest) - (action - (diff test.reference test.output))) diff --git a/compiler/tests-linkall/test.reference b/compiler/tests-linkall/test.expected similarity index 100% rename from compiler/tests-linkall/test.reference rename to compiler/tests-linkall/test.expected diff --git a/compiler/tests-num/dune b/compiler/tests-num/dune index f68719a5a6..38ac98ecbf 100644 --- a/compiler/tests-num/dune +++ b/compiler/tests-num/dune @@ -1,4 +1,4 @@ -(executable +(test (name main) (modules main test_nats test test_big_ints test_ratios test_nums test_io) (libraries num) @@ -9,23 +9,9 @@ (:standard -linkall -w -3-7-33-35-37 -safe-string -no-strict-sequence))) (rule - (target main.referencejs) - (deps main.bc.js) - (action - (with-stdout-to - %{target} - (run node ./main.bc.js)))) - -(rule - (target main.reference) + (target main.expected) (deps main.exe) (action (with-stdout-to %{target} (run ./main.exe)))) - -(rule - (alias runtest) - (deps main.reference main.referencejs) - (action - (diff main.reference main.referencejs))) diff --git a/compiler/tests-ocaml/basic-modules/dune b/compiler/tests-ocaml/basic-modules/dune index 26aa2a5ffe..d5bfb9f8a9 100644 --- a/compiler/tests-ocaml/basic-modules/dune +++ b/compiler/tests-ocaml/basic-modules/dune @@ -1,18 +1,4 @@ -(executables +(tests (names recursive_module_init) (libraries) (modes js)) - -(rule - (target recursive_module_init.referencejs) - (deps recursive_module_init.bc.js) - (action - (with-stdout-to - %{target} - (run node ./recursive_module_init.bc.js)))) - -(rule - (alias runtest) - (deps recursive_module_init.reference recursive_module_init.referencejs) - (action - (diff recursive_module_init.reference recursive_module_init.referencejs))) diff --git a/compiler/tests-ocaml/basic-modules/recursive_module_init.reference b/compiler/tests-ocaml/basic-modules/recursive_module_init.expected similarity index 100% rename from compiler/tests-ocaml/basic-modules/recursive_module_init.reference rename to compiler/tests-ocaml/basic-modules/recursive_module_init.expected diff --git a/compiler/tests-ocaml/lib-atomic/dune b/compiler/tests-ocaml/lib-atomic/dune index b523fca818..ca4c49b456 100644 --- a/compiler/tests-ocaml/lib-atomic/dune +++ b/compiler/tests-ocaml/lib-atomic/dune @@ -1,10 +1,3 @@ -(executables - (names test_atomic) - (libraries) +(test + (name test_atomic) (modes js)) - -(rule - (alias runtest) - (deps test_atomic.bc.js) - (action - (run node test_atomic.bc.js))) diff --git a/compiler/tests-ocaml/lib-bigarray/bigarrays.reference b/compiler/tests-ocaml/lib-bigarray/bigarrays.expected similarity index 100% rename from compiler/tests-ocaml/lib-bigarray/bigarrays.reference rename to compiler/tests-ocaml/lib-bigarray/bigarrays.expected diff --git a/compiler/tests-ocaml/lib-bigarray/change_layout.reference b/compiler/tests-ocaml/lib-bigarray/change_layout.expected similarity index 100% rename from compiler/tests-ocaml/lib-bigarray/change_layout.reference rename to compiler/tests-ocaml/lib-bigarray/change_layout.expected diff --git a/compiler/tests-ocaml/lib-bigarray/dune b/compiler/tests-ocaml/lib-bigarray/dune index 3fc4e421c1..38ac683d5e 100644 --- a/compiler/tests-ocaml/lib-bigarray/dune +++ b/compiler/tests-ocaml/lib-bigarray/dune @@ -1,74 +1,4 @@ -(executables +(tests (names bigarrays change_layout fftba pr5115 weak_bigarray) (libraries) (modes js)) - -(rule - (target bigarrays.referencejs) - (deps bigarrays.bc.js) - (action - (with-stdout-to - %{target} - (run node ./bigarrays.bc.js)))) - -(rule - (alias runtest) - (deps bigarrays.reference bigarrays.referencejs) - (action - (diff bigarrays.reference bigarrays.referencejs))) - -(rule - (target change_layout.referencejs) - (deps change_layout.bc.js) - (action - (with-stdout-to - %{target} - (run node ./change_layout.bc.js)))) - -(rule - (alias runtest) - (deps change_layout.reference change_layout.referencejs) - (action - (diff change_layout.reference change_layout.referencejs))) - -(rule - (target fftba.referencejs) - (deps fftba.bc.js) - (action - (with-stdout-to - %{target} - (run node ./fftba.bc.js)))) - -(rule - (alias runtest) - (deps fftba.reference fftba.referencejs) - (action - (diff fftba.reference fftba.referencejs))) - -(rule - (target pr5115.referencejs) - (deps pr5115.bc.js) - (action - (with-stdout-to - %{target} - (run node ./pr5115.bc.js)))) - -(rule - (alias runtest) - (deps pr5115.reference pr5115.referencejs) - (action - (diff pr5115.reference pr5115.referencejs))) - -(rule - (target weak_bigarray.referencejs) - (deps weak_bigarray.bc.js) - (action - (with-stdout-to - %{target} - (run node ./weak_bigarray.bc.js)))) - -(rule - (alias runtest) - (deps weak_bigarray.reference weak_bigarray.referencejs) - (action - (diff weak_bigarray.reference weak_bigarray.referencejs))) diff --git a/compiler/tests-ocaml/lib-bigarray/fftba.reference b/compiler/tests-ocaml/lib-bigarray/fftba.expected similarity index 100% rename from compiler/tests-ocaml/lib-bigarray/fftba.reference rename to compiler/tests-ocaml/lib-bigarray/fftba.expected diff --git a/compiler/tests-ocaml/lib-bigarray/pr5115.reference b/compiler/tests-ocaml/lib-bigarray/pr5115.expected similarity index 100% rename from compiler/tests-ocaml/lib-bigarray/pr5115.reference rename to compiler/tests-ocaml/lib-bigarray/pr5115.expected diff --git a/compiler/tests-ocaml/lib-bigarray/weak_bigarray.reference b/compiler/tests-ocaml/lib-bigarray/weak_bigarray.expected similarity index 100% rename from compiler/tests-ocaml/lib-bigarray/weak_bigarray.reference rename to compiler/tests-ocaml/lib-bigarray/weak_bigarray.expected diff --git a/compiler/tests-ocaml/lib-bool/dune b/compiler/tests-ocaml/lib-bool/dune index cbf1c10306..9047167ba4 100644 --- a/compiler/tests-ocaml/lib-bool/dune +++ b/compiler/tests-ocaml/lib-bool/dune @@ -1,18 +1,4 @@ -(executables +(tests (names test) (libraries) (modes js)) - -(rule - (target test.referencejs) - (deps test.bc.js) - (action - (with-stdout-to - %{target} - (run node ./test.bc.js)))) - -(rule - (alias runtest) - (deps test.reference test.referencejs) - (action - (diff test.reference test.referencejs))) diff --git a/compiler/tests-ocaml/lib-bool/test.reference b/compiler/tests-ocaml/lib-bool/test.expected similarity index 100% rename from compiler/tests-ocaml/lib-bool/test.reference rename to compiler/tests-ocaml/lib-bool/test.expected diff --git a/compiler/tests-ocaml/lib-buffer/dune b/compiler/tests-ocaml/lib-buffer/dune index cbf1c10306..9047167ba4 100644 --- a/compiler/tests-ocaml/lib-buffer/dune +++ b/compiler/tests-ocaml/lib-buffer/dune @@ -1,18 +1,4 @@ -(executables +(tests (names test) (libraries) (modes js)) - -(rule - (target test.referencejs) - (deps test.bc.js) - (action - (with-stdout-to - %{target} - (run node ./test.bc.js)))) - -(rule - (alias runtest) - (deps test.reference test.referencejs) - (action - (diff test.reference test.referencejs))) diff --git a/compiler/tests-ocaml/lib-buffer/test.reference b/compiler/tests-ocaml/lib-buffer/test.expected similarity index 100% rename from compiler/tests-ocaml/lib-buffer/test.reference rename to compiler/tests-ocaml/lib-buffer/test.expected diff --git a/compiler/tests-ocaml/lib-bytes-utf/dune b/compiler/tests-ocaml/lib-bytes-utf/dune index d3706ba020..9b2db1c33a 100644 --- a/compiler/tests-ocaml/lib-bytes-utf/dune +++ b/compiler/tests-ocaml/lib-bytes-utf/dune @@ -1,4 +1,4 @@ -(executables +(tests (names test) (libraries) (flags @@ -6,17 +6,3 @@ (modes js (best exe))) - -(rule - (target test.referencejs) - (deps test.bc.js) - (action - (with-stdout-to - %{target} - (run node ./test.bc.js)))) - -(rule - (alias runtest) - (deps test.reference test.referencejs) - (action - (diff test.reference test.referencejs))) diff --git a/compiler/tests-ocaml/lib-bytes-utf/test.reference b/compiler/tests-ocaml/lib-bytes-utf/test.expected similarity index 100% rename from compiler/tests-ocaml/lib-bytes-utf/test.reference rename to compiler/tests-ocaml/lib-bytes-utf/test.expected diff --git a/compiler/tests-ocaml/lib-bytes/dune b/compiler/tests-ocaml/lib-bytes/dune index ae78ccf96a..10725957d6 100644 --- a/compiler/tests-ocaml/lib-bytes/dune +++ b/compiler/tests-ocaml/lib-bytes/dune @@ -1,30 +1,4 @@ -(executables +(tests (names test_bytes binary) (libraries) (modes js)) - -(rule - (target test_bytes.referencejs) - (deps test_bytes.bc.js) - (action - (with-stdout-to - %{target} - (run node ./test_bytes.bc.js)))) - -(rule - (alias runtest) - (deps test_bytes.reference test_bytes.referencejs) - (action - (diff test_bytes.reference test_bytes.referencejs))) - -(rule - (target binary.referencejs) - (deps binary.bc.js) - (action - (with-stdout-to - %{target} - (run node ./binary.bc.js)))) - -(alias - (name runtest) - (deps binary.referencejs)) diff --git a/compiler/tests-ocaml/lib-bytes/test_bytes.reference b/compiler/tests-ocaml/lib-bytes/test_bytes.expected similarity index 100% rename from compiler/tests-ocaml/lib-bytes/test_bytes.reference rename to compiler/tests-ocaml/lib-bytes/test_bytes.expected diff --git a/compiler/tests-ocaml/lib-digest/dune b/compiler/tests-ocaml/lib-digest/dune index e68a7bae95..efd881b016 100644 --- a/compiler/tests-ocaml/lib-digest/dune +++ b/compiler/tests-ocaml/lib-digest/dune @@ -1,35 +1,13 @@ -(executables +(tests (names md5) (libraries) (modules md5) (modes js)) -(rule - (target md5.referencejs) - (deps md5.bc.js) - (action - (with-stdout-to - %{target} - (run node ./md5.bc.js)))) - -(rule - (alias runtest) - (deps md5.reference md5.referencejs) - (action - (diff md5.reference md5.referencejs))) - -(executables +(tests (names digests) (libraries) - (enabled_if + (build_if (>= %{ocaml_version} 5.2)) (modules digests) (modes js)) - -(rule - (alias runtest) - (deps digests.bc.js) - (enabled_if - (>= %{ocaml_version} 5.2)) - (action - (run node ./digests.bc.js))) diff --git a/compiler/tests-ocaml/lib-digest/md5.reference b/compiler/tests-ocaml/lib-digest/md5.expected similarity index 100% rename from compiler/tests-ocaml/lib-digest/md5.reference rename to compiler/tests-ocaml/lib-digest/md5.expected diff --git a/compiler/tests-ocaml/lib-effects/cmphash.reference b/compiler/tests-ocaml/lib-effects/cmphash.expected similarity index 100% rename from compiler/tests-ocaml/lib-effects/cmphash.reference rename to compiler/tests-ocaml/lib-effects/cmphash.expected diff --git a/compiler/tests-ocaml/lib-effects/dune b/compiler/tests-ocaml/lib-effects/dune index ab5ff55d45..d73836514e 100644 --- a/compiler/tests-ocaml/lib-effects/dune +++ b/compiler/tests-ocaml/lib-effects/dune @@ -9,8 +9,8 @@ (flags (:standard --enable effects))))) -(executables - (enabled_if +(tests + (build_if (>= %{ocaml_version} 5)) (names cmphash @@ -38,411 +38,15 @@ (:standard \ unhandled_unlinked)) (modes js)) -(executables - (enabled_if +(tests + (build_if (>= %{ocaml_version} 5)) (names unhandled_unlinked) (modules unhandled_unlinked) - (modes js)) - -(rule - (target effects.referencejs) - (enabled_if - (>= %{ocaml_version} 5)) - (deps effects.bc.js) - (action - (with-stdout-to - %{target} - (run node ./effects.bc.js)))) - -(rule - (alias runtest) - (enabled_if - (>= %{ocaml_version} 5)) - (deps effects.reference effects.referencejs) - (action - (diff effects.reference effects.referencejs))) - -(rule - (target evenodd.referencejs) - (enabled_if - (>= %{ocaml_version} 5)) - (deps evenodd.bc.js) - (action - (with-stdout-to - %{target} - (run node ./evenodd.bc.js)))) - -(rule - (alias runtest) - (enabled_if - (>= %{ocaml_version} 5)) - (deps evenodd.reference evenodd.referencejs) - (action - (diff evenodd.reference evenodd.referencejs))) - -(rule - (target manylive.referencejs) - (enabled_if - (>= %{ocaml_version} 5)) - (deps manylive.bc.js) - (action - (with-stdout-to - %{target} - (run node ./manylive.bc.js)))) - -(rule - (alias runtest) - (enabled_if - (>= %{ocaml_version} 5)) - (deps manylive.reference manylive.referencejs) - (action - (diff manylive.reference manylive.referencejs))) - -(rule - (target overflow.referencejs) - (enabled_if - (>= %{ocaml_version} 5)) - (deps overflow.bc.js) - (action - (with-stdout-to - %{target} - (run node ./overflow.bc.js)))) - -(rule - (alias runtest) - (enabled_if - (>= %{ocaml_version} 5)) - (deps overflow.reference overflow.referencejs) - (action - (diff overflow.reference overflow.referencejs))) - -(rule - (target partial.referencejs) - (enabled_if - (>= %{ocaml_version} 5)) - (deps partial.bc.js) - (action - (with-stdout-to - %{target} - (run node ./partial.bc.js)))) - -(rule - (alias runtest) - (enabled_if - (>= %{ocaml_version} 5)) - (deps partial.reference partial.referencejs) - (action - (diff partial.reference partial.referencejs))) - -(rule - (target reperform.referencejs) - (enabled_if - (>= %{ocaml_version} 5)) - (deps reperform.bc.js) - (action - (with-stdout-to - %{target} - (run node ./reperform.bc.js)))) - -(rule - (alias runtest) - (enabled_if - (>= %{ocaml_version} 5)) - (deps reperform.reference reperform.referencejs) - (action - (diff reperform.reference reperform.referencejs))) - -(rule - (target sched.referencejs) - (enabled_if - (>= %{ocaml_version} 5)) - (deps sched.bc.js) - (action - (with-stdout-to - %{target} - (run node ./sched.bc.js)))) - -(rule - (alias runtest) - (enabled_if - (>= %{ocaml_version} 5)) - (deps sched.reference sched.referencejs) - (action - (diff sched.reference sched.referencejs))) - -(rule - (target shallow_state_io.referencejs) - (enabled_if - (>= %{ocaml_version} 5)) - (deps shallow_state_io.bc.js) - (action - (with-stdout-to - %{target} - (run node ./shallow_state_io.bc.js)))) - -(rule - (alias runtest) - (enabled_if - (>= %{ocaml_version} 5)) - (deps shallow_state_io.reference shallow_state_io.referencejs) - (action - (diff shallow_state_io.reference shallow_state_io.referencejs))) - -(rule - (target shallow_state.referencejs) - (enabled_if - (>= %{ocaml_version} 5)) - (deps shallow_state.bc.js) - (action - (with-stdout-to - %{target} - (run node ./shallow_state.bc.js)))) - -(rule - (alias runtest) - (enabled_if - (>= %{ocaml_version} 5)) - (deps shallow_state.reference shallow_state.referencejs) - (action - (diff shallow_state.reference shallow_state.referencejs))) - -(rule - (target test10.referencejs) - (enabled_if - (>= %{ocaml_version} 5)) - (deps test10.bc.js) - (action - (with-stdout-to - %{target} - (run node ./test10.bc.js)))) - -(rule - (alias runtest) - (enabled_if - (>= %{ocaml_version} 5)) - (deps test10.reference test10.referencejs) - (action - (diff test10.reference test10.referencejs))) - -(rule - (target test11.referencejs) - (enabled_if - (>= %{ocaml_version} 5)) - (deps test11.bc.js) - (action - (with-stdout-to - %{target} - (run node ./test11.bc.js)))) - -(rule - (alias runtest) - (enabled_if - (>= %{ocaml_version} 5)) - (deps test11.reference test11.referencejs) (action - (diff test11.reference test11.referencejs))) - -(rule - (target test1.referencejs) - (enabled_if - (>= %{ocaml_version} 5)) - (deps test1.bc.js) - (action - (with-stdout-to - %{target} - (run node ./test1.bc.js)))) - -(rule - (alias runtest) - (enabled_if - (>= %{ocaml_version} 5)) - (deps test1.reference test1.referencejs) - (action - (diff test1.reference test1.referencejs))) - -(rule - (target test2.referencejs) - (enabled_if - (>= %{ocaml_version} 5)) - (deps test2.bc.js) - (action - (with-stdout-to - %{target} - (run node ./test2.bc.js)))) - -(rule - (alias runtest) - (enabled_if - (>= %{ocaml_version} 5)) - (deps test2.reference test2.referencejs) - (action - (diff test2.reference test2.referencejs))) - -(rule - (target test3.referencejs) - (enabled_if - (>= %{ocaml_version} 5)) - (deps test3.bc.js) - (action - (with-stdout-to - %{target} - (run node ./test3.bc.js)))) - -(rule - (alias runtest) - (enabled_if - (>= %{ocaml_version} 5)) - (deps test3.reference test3.referencejs) - (action - (diff test3.reference test3.referencejs))) - -(rule - (target test4.referencejs) - (enabled_if - (>= %{ocaml_version} 5)) - (deps test4.bc.js) - (action - (with-stdout-to - %{target} - (run node ./test4.bc.js)))) - -(rule - (alias runtest) - (enabled_if - (>= %{ocaml_version} 5)) - (deps test4.reference test4.referencejs) - (action - (diff test4.reference test4.referencejs))) - -(rule - (target test5.referencejs) - (enabled_if - (>= %{ocaml_version} 5)) - (deps test5.bc.js) - (action - (with-stdout-to - %{target} - (run node ./test5.bc.js)))) - -(rule - (alias runtest) - (enabled_if - (>= %{ocaml_version} 5)) - (deps test5.reference test5.referencejs) - (action - (diff test5.reference test5.referencejs))) - -(rule - (target test6.referencejs) - (enabled_if - (>= %{ocaml_version} 5)) - (deps test6.bc.js) - (action - (with-stdout-to - %{target} - (run node ./test6.bc.js)))) - -(rule - (alias runtest) - (enabled_if - (>= %{ocaml_version} 5)) - (deps test6.reference test6.referencejs) - (action - (diff test6.reference test6.referencejs))) - -(rule - (target test_lazy.referencejs) - (enabled_if - (>= %{ocaml_version} 5)) - (deps test_lazy.bc.js) - (action - (with-stdout-to - %{target} - (run node ./test_lazy.bc.js)))) - -(rule - (alias runtest) - (enabled_if - (>= %{ocaml_version} 5)) - (deps test_lazy.reference test_lazy.referencejs) - (action - (diff test_lazy.reference test_lazy.referencejs))) - -(rule - (target unhandled_unlinked.referencejs) - (enabled_if - (and - (>= %{ocaml_version} 5) - (<> %{profile} using-effects))) - (deps unhandled_unlinked.bc.js) - (action - (with-accepted-exit-codes - 2 - (with-outputs-to - %{target} - (run node ./unhandled_unlinked.bc.js))))) - -(rule - (alias runtest) - (enabled_if - (and - (>= %{ocaml_version} 5) - (<> %{profile} using-effects))) - (deps unhandled_unlinked.reference unhandled_unlinked.referencejs) - (action - (diff unhandled_unlinked.reference unhandled_unlinked.referencejs))) - -(rule - (target used_cont.referencejs) - (enabled_if - (>= %{ocaml_version} 5)) - (deps used_cont.bc.js) - (action - (with-stdout-to - %{target} - (run node ./used_cont.bc.js)))) - -(rule - (alias runtest) - (enabled_if - (>= %{ocaml_version} 5)) - (deps used_cont.reference used_cont.referencejs) - (action - (diff used_cont.reference used_cont.referencejs))) - -(rule - (target cmphash.referencejs) - (enabled_if - (>= %{ocaml_version} 5)) - (deps cmphash.bc.js) - (action - (with-stdout-to - %{target} - (run node ./cmphash.bc.js)))) - -(rule - (alias runtest) - (enabled_if - (>= %{ocaml_version} 5)) - (deps cmphash.reference cmphash.referencejs) - (action - (diff cmphash.reference cmphash.referencejs))) - -(rule - (target marshal.referencejs) - (enabled_if - (>= %{ocaml_version} 5)) - (deps marshal.bc.js) - (action - (with-stdout-to - %{target} - (run node ./marshal.bc.js)))) - -(rule - (alias runtest) - (enabled_if - (>= %{ocaml_version} 5)) - (deps marshal.reference marshal.referencejs) - (action - (diff marshal.reference marshal.referencejs))) + (pipe-outputs + (with-accepted-exit-codes + 2 + (run node %{test})) + (run cat))) + (modes js)) diff --git a/compiler/tests-ocaml/lib-effects/effects.reference b/compiler/tests-ocaml/lib-effects/effects.expected similarity index 100% rename from compiler/tests-ocaml/lib-effects/effects.reference rename to compiler/tests-ocaml/lib-effects/effects.expected diff --git a/compiler/tests-ocaml/lib-effects/evenodd.reference b/compiler/tests-ocaml/lib-effects/evenodd.expected similarity index 100% rename from compiler/tests-ocaml/lib-effects/evenodd.reference rename to compiler/tests-ocaml/lib-effects/evenodd.expected diff --git a/compiler/tests-ocaml/lib-effects/manylive.reference b/compiler/tests-ocaml/lib-effects/manylive.expected similarity index 100% rename from compiler/tests-ocaml/lib-effects/manylive.reference rename to compiler/tests-ocaml/lib-effects/manylive.expected diff --git a/compiler/tests-ocaml/lib-effects/marshal.reference b/compiler/tests-ocaml/lib-effects/marshal.expected similarity index 100% rename from compiler/tests-ocaml/lib-effects/marshal.reference rename to compiler/tests-ocaml/lib-effects/marshal.expected diff --git a/compiler/tests-ocaml/lib-effects/overflow.reference b/compiler/tests-ocaml/lib-effects/overflow.expected similarity index 100% rename from compiler/tests-ocaml/lib-effects/overflow.reference rename to compiler/tests-ocaml/lib-effects/overflow.expected diff --git a/compiler/tests-ocaml/lib-effects/partial.reference b/compiler/tests-ocaml/lib-effects/partial.expected similarity index 100% rename from compiler/tests-ocaml/lib-effects/partial.reference rename to compiler/tests-ocaml/lib-effects/partial.expected diff --git a/compiler/tests-ocaml/lib-effects/reperform.reference b/compiler/tests-ocaml/lib-effects/reperform.expected similarity index 100% rename from compiler/tests-ocaml/lib-effects/reperform.reference rename to compiler/tests-ocaml/lib-effects/reperform.expected diff --git a/compiler/tests-ocaml/lib-effects/sched.reference b/compiler/tests-ocaml/lib-effects/sched.expected similarity index 100% rename from compiler/tests-ocaml/lib-effects/sched.reference rename to compiler/tests-ocaml/lib-effects/sched.expected diff --git a/compiler/tests-ocaml/lib-effects/shallow_state.reference b/compiler/tests-ocaml/lib-effects/shallow_state.expected similarity index 100% rename from compiler/tests-ocaml/lib-effects/shallow_state.reference rename to compiler/tests-ocaml/lib-effects/shallow_state.expected diff --git a/compiler/tests-ocaml/lib-effects/shallow_state_io.reference b/compiler/tests-ocaml/lib-effects/shallow_state_io.expected similarity index 100% rename from compiler/tests-ocaml/lib-effects/shallow_state_io.reference rename to compiler/tests-ocaml/lib-effects/shallow_state_io.expected diff --git a/compiler/tests-ocaml/lib-effects/test1.reference b/compiler/tests-ocaml/lib-effects/test1.expected similarity index 100% rename from compiler/tests-ocaml/lib-effects/test1.reference rename to compiler/tests-ocaml/lib-effects/test1.expected diff --git a/compiler/tests-ocaml/lib-effects/test10.reference b/compiler/tests-ocaml/lib-effects/test10.expected similarity index 100% rename from compiler/tests-ocaml/lib-effects/test10.reference rename to compiler/tests-ocaml/lib-effects/test10.expected diff --git a/compiler/tests-ocaml/lib-effects/test11.reference b/compiler/tests-ocaml/lib-effects/test11.expected similarity index 100% rename from compiler/tests-ocaml/lib-effects/test11.reference rename to compiler/tests-ocaml/lib-effects/test11.expected diff --git a/compiler/tests-ocaml/lib-effects/test2.reference b/compiler/tests-ocaml/lib-effects/test2.expected similarity index 100% rename from compiler/tests-ocaml/lib-effects/test2.reference rename to compiler/tests-ocaml/lib-effects/test2.expected diff --git a/compiler/tests-ocaml/lib-effects/test3.reference b/compiler/tests-ocaml/lib-effects/test3.expected similarity index 100% rename from compiler/tests-ocaml/lib-effects/test3.reference rename to compiler/tests-ocaml/lib-effects/test3.expected diff --git a/compiler/tests-ocaml/lib-effects/test4.reference b/compiler/tests-ocaml/lib-effects/test4.expected similarity index 100% rename from compiler/tests-ocaml/lib-effects/test4.reference rename to compiler/tests-ocaml/lib-effects/test4.expected diff --git a/compiler/tests-ocaml/lib-effects/test5.reference b/compiler/tests-ocaml/lib-effects/test5.expected similarity index 100% rename from compiler/tests-ocaml/lib-effects/test5.reference rename to compiler/tests-ocaml/lib-effects/test5.expected diff --git a/compiler/tests-ocaml/lib-effects/test6.reference b/compiler/tests-ocaml/lib-effects/test6.expected similarity index 100% rename from compiler/tests-ocaml/lib-effects/test6.reference rename to compiler/tests-ocaml/lib-effects/test6.expected diff --git a/compiler/tests-ocaml/lib-effects/test_lazy.reference b/compiler/tests-ocaml/lib-effects/test_lazy.expected similarity index 100% rename from compiler/tests-ocaml/lib-effects/test_lazy.reference rename to compiler/tests-ocaml/lib-effects/test_lazy.expected diff --git a/compiler/tests-ocaml/lib-effects/unhandled_unlinked.reference b/compiler/tests-ocaml/lib-effects/unhandled_unlinked.expected similarity index 100% rename from compiler/tests-ocaml/lib-effects/unhandled_unlinked.reference rename to compiler/tests-ocaml/lib-effects/unhandled_unlinked.expected diff --git a/compiler/tests-ocaml/lib-effects/used_cont.reference b/compiler/tests-ocaml/lib-effects/used_cont.expected similarity index 100% rename from compiler/tests-ocaml/lib-effects/used_cont.reference rename to compiler/tests-ocaml/lib-effects/used_cont.expected diff --git a/compiler/tests-ocaml/lib-filename/dune b/compiler/tests-ocaml/lib-filename/dune index ea24f8524d..407a53e557 100644 --- a/compiler/tests-ocaml/lib-filename/dune +++ b/compiler/tests-ocaml/lib-filename/dune @@ -1,32 +1,4 @@ -(executables +(tests (names suffix extension) (libraries) (modes js)) - -(rule - (target suffix.referencejs) - (deps suffix.bc.js) - (action - (with-stdout-to - %{target} - (run node ./suffix.bc.js)))) - -(rule - (alias runtest) - (deps suffix.reference suffix.referencejs) - (action - (diff suffix.reference suffix.referencejs))) - -(rule - (target extension.referencejs) - (deps extension.bc.js) - (action - (with-stdout-to - %{target} - (run node ./extension.bc.js)))) - -(rule - (alias runtest) - (deps extension.reference extension.referencejs) - (action - (diff extension.reference extension.referencejs))) diff --git a/compiler/tests-ocaml/lib-filename/extension.reference b/compiler/tests-ocaml/lib-filename/extension.expected similarity index 100% rename from compiler/tests-ocaml/lib-filename/extension.reference rename to compiler/tests-ocaml/lib-filename/extension.expected diff --git a/compiler/tests-ocaml/lib-filename/suffix.reference b/compiler/tests-ocaml/lib-filename/suffix.expected similarity index 100% rename from compiler/tests-ocaml/lib-filename/suffix.reference rename to compiler/tests-ocaml/lib-filename/suffix.expected diff --git a/compiler/tests-ocaml/lib-float/dune b/compiler/tests-ocaml/lib-float/dune index cbf1c10306..9047167ba4 100644 --- a/compiler/tests-ocaml/lib-float/dune +++ b/compiler/tests-ocaml/lib-float/dune @@ -1,18 +1,4 @@ -(executables +(tests (names test) (libraries) (modes js)) - -(rule - (target test.referencejs) - (deps test.bc.js) - (action - (with-stdout-to - %{target} - (run node ./test.bc.js)))) - -(rule - (alias runtest) - (deps test.reference test.referencejs) - (action - (diff test.reference test.referencejs))) diff --git a/compiler/tests-ocaml/lib-float/test.reference b/compiler/tests-ocaml/lib-float/test.expected similarity index 100% rename from compiler/tests-ocaml/lib-float/test.reference rename to compiler/tests-ocaml/lib-float/test.expected diff --git a/compiler/tests-ocaml/lib-floatarray/dune b/compiler/tests-ocaml/lib-floatarray/dune index 15a2441d44..b3af4c6d57 100644 --- a/compiler/tests-ocaml/lib-floatarray/dune +++ b/compiler/tests-ocaml/lib-floatarray/dune @@ -1,16 +1,4 @@ -(executables +(tests (names floatarray) (libraries) (modes js)) - -(rule - (target floatarray.referencejs) - (deps floatarray.bc.js) - (action - (with-stdout-to - %{target} - (run node ./floatarray.bc.js)))) - -(alias - (name runtest) - (deps floatarray.referencejs)) diff --git a/compiler/tests-ocaml/lib-format/dune b/compiler/tests-ocaml/lib-format/dune index cd96782a03..94c4cfe76f 100644 --- a/compiler/tests-ocaml/lib-format/dune +++ b/compiler/tests-ocaml/lib-format/dune @@ -1,76 +1,6 @@ -(executables +(tests (names pr6824 print_if_newline pp_print_custom_break print_seq tformat) (libraries) (flags (:standard -no-strict-formats \ -strict-formats)) (modes js)) - -(rule - (target pr6824.referencejs) - (deps pr6824.bc.js) - (action - (with-stdout-to - %{target} - (run node ./pr6824.bc.js)))) - -(rule - (alias runtest) - (deps pr6824.reference pr6824.referencejs) - (action - (diff pr6824.reference pr6824.referencejs))) - -(rule - (target print_if_newline.referencejs) - (deps print_if_newline.bc.js) - (action - (with-stdout-to - %{target} - (run node ./print_if_newline.bc.js)))) - -(rule - (alias runtest) - (deps print_if_newline.reference print_if_newline.referencejs) - (action - (diff print_if_newline.reference print_if_newline.referencejs))) - -(rule - (target pp_print_custom_break.referencejs) - (deps pp_print_custom_break.bc.js) - (action - (with-stdout-to - %{target} - (run node ./pp_print_custom_break.bc.js)))) - -(rule - (alias runtest) - (deps pp_print_custom_break.reference pp_print_custom_break.referencejs) - (action - (diff pp_print_custom_break.reference pp_print_custom_break.referencejs))) - -(rule - (target print_seq.referencejs) - (deps print_seq.bc.js) - (action - (with-stdout-to - %{target} - (run node ./print_seq.bc.js)))) - -(rule - (alias runtest) - (deps print_seq.reference print_seq.referencejs) - (action - (diff print_seq.reference print_seq.referencejs))) - -(rule - (target tformat.referencejs) - (deps tformat.bc.js) - (action - (with-stdout-to - %{target} - (run node ./tformat.bc.js)))) - -(rule - (alias runtest) - (deps tformat.reference tformat.referencejs) - (action - (diff tformat.reference tformat.referencejs))) diff --git a/compiler/tests-ocaml/lib-format/pp_print_custom_break.reference b/compiler/tests-ocaml/lib-format/pp_print_custom_break.expected similarity index 100% rename from compiler/tests-ocaml/lib-format/pp_print_custom_break.reference rename to compiler/tests-ocaml/lib-format/pp_print_custom_break.expected diff --git a/compiler/tests-ocaml/lib-format/pr6824.reference b/compiler/tests-ocaml/lib-format/pr6824.expected similarity index 100% rename from compiler/tests-ocaml/lib-format/pr6824.reference rename to compiler/tests-ocaml/lib-format/pr6824.expected diff --git a/compiler/tests-ocaml/lib-format/print_if_newline.reference b/compiler/tests-ocaml/lib-format/print_if_newline.expected similarity index 100% rename from compiler/tests-ocaml/lib-format/print_if_newline.reference rename to compiler/tests-ocaml/lib-format/print_if_newline.expected diff --git a/compiler/tests-ocaml/lib-format/print_seq.reference b/compiler/tests-ocaml/lib-format/print_seq.expected similarity index 100% rename from compiler/tests-ocaml/lib-format/print_seq.reference rename to compiler/tests-ocaml/lib-format/print_seq.expected diff --git a/compiler/tests-ocaml/lib-format/tformat.reference b/compiler/tests-ocaml/lib-format/tformat.expected similarity index 100% rename from compiler/tests-ocaml/lib-format/tformat.reference rename to compiler/tests-ocaml/lib-format/tformat.expected diff --git a/compiler/tests-ocaml/lib-fun/dune b/compiler/tests-ocaml/lib-fun/dune index cbf1c10306..9047167ba4 100644 --- a/compiler/tests-ocaml/lib-fun/dune +++ b/compiler/tests-ocaml/lib-fun/dune @@ -1,18 +1,4 @@ -(executables +(tests (names test) (libraries) (modes js)) - -(rule - (target test.referencejs) - (deps test.bc.js) - (action - (with-stdout-to - %{target} - (run node ./test.bc.js)))) - -(rule - (alias runtest) - (deps test.reference test.referencejs) - (action - (diff test.reference test.referencejs))) diff --git a/compiler/tests-ocaml/lib-fun/test.reference b/compiler/tests-ocaml/lib-fun/test.expected similarity index 100% rename from compiler/tests-ocaml/lib-fun/test.reference rename to compiler/tests-ocaml/lib-fun/test.expected diff --git a/compiler/tests-ocaml/lib-gc/dune b/compiler/tests-ocaml/lib-gc/dune index fab49e8243..13e636f3e2 100644 --- a/compiler/tests-ocaml/lib-gc/dune +++ b/compiler/tests-ocaml/lib-gc/dune @@ -1,11 +1,5 @@ -(executables +(tests (names test_gc) (libraries) (flags -w -69) (modes js)) - -(rule - (alias runtest) - (deps test_gc.bc.js) - (action - (run node test_gc.bc.js))) diff --git a/compiler/tests-ocaml/lib-hashtbl/dune b/compiler/tests-ocaml/lib-hashtbl/dune index 2f402e17c8..91ffd3fe48 100644 --- a/compiler/tests-ocaml/lib-hashtbl/dune +++ b/compiler/tests-ocaml/lib-hashtbl/dune @@ -1,45 +1,15 @@ -(executables +(tests (names hfun) + (deps ../../../LICENSE) (modules hfun) (libraries) (modes js)) -(executables +(tests (names htbl) + (deps ../../../LICENSE) (modules htbl) - (enabled_if + (build_if (>= %{ocaml_version} 5)) (libraries) (modes js)) - -(rule - (target hfun.referencejs) - (deps hfun.bc.js ../../../LICENSE) - (action - (with-stdout-to - %{target} - (run node ./hfun.bc.js)))) - -(rule - (alias runtest) - (deps hfun.referencejs hfun.reference) - (action - (diff hfun.referencejs hfun.reference))) - -(rule - (target htbl.referencejs) - (enabled_if - (>= %{ocaml_version} 5)) - (deps htbl.bc.js ../../../LICENSE) - (action - (with-stdout-to - %{target} - (run node ./htbl.bc.js)))) - -(rule - (alias runtest) - (enabled_if - (>= %{ocaml_version} 5)) - (deps htbl.reference htbl.referencejs) - (action - (diff htbl.reference htbl.referencejs))) diff --git a/compiler/tests-ocaml/lib-hashtbl/hfun.reference b/compiler/tests-ocaml/lib-hashtbl/hfun.expected similarity index 100% rename from compiler/tests-ocaml/lib-hashtbl/hfun.reference rename to compiler/tests-ocaml/lib-hashtbl/hfun.expected diff --git a/compiler/tests-ocaml/lib-hashtbl/htbl.reference b/compiler/tests-ocaml/lib-hashtbl/htbl.expected similarity index 100% rename from compiler/tests-ocaml/lib-hashtbl/htbl.reference rename to compiler/tests-ocaml/lib-hashtbl/htbl.expected diff --git a/compiler/tests-ocaml/lib-int/dune b/compiler/tests-ocaml/lib-int/dune index cbf1c10306..9047167ba4 100644 --- a/compiler/tests-ocaml/lib-int/dune +++ b/compiler/tests-ocaml/lib-int/dune @@ -1,18 +1,4 @@ -(executables +(tests (names test) (libraries) (modes js)) - -(rule - (target test.referencejs) - (deps test.bc.js) - (action - (with-stdout-to - %{target} - (run node ./test.bc.js)))) - -(rule - (alias runtest) - (deps test.reference test.referencejs) - (action - (diff test.reference test.referencejs))) diff --git a/compiler/tests-ocaml/lib-int/test.reference b/compiler/tests-ocaml/lib-int/test.expected similarity index 100% rename from compiler/tests-ocaml/lib-int/test.reference rename to compiler/tests-ocaml/lib-int/test.expected diff --git a/compiler/tests-ocaml/lib-int64/dune b/compiler/tests-ocaml/lib-int64/dune index 78550bb5e3..4ff01bc02f 100644 --- a/compiler/tests-ocaml/lib-int64/dune +++ b/compiler/tests-ocaml/lib-int64/dune @@ -1,32 +1,4 @@ -(executables +(tests (names test issue9460) (libraries) (modes js)) - -(rule - (target test.referencejs) - (deps test.bc.js) - (action - (with-stdout-to - %{target} - (run node ./test.bc.js)))) - -(rule - (alias runtest) - (deps test.reference test.referencejs) - (action - (diff test.reference test.referencejs))) - -(rule - (target issue9460.referencejs) - (deps issue9460.bc.js) - (action - (with-stdout-to - %{target} - (run node ./issue9460.bc.js)))) - -(rule - (alias runtest) - (deps issue9460.reference issue9460.referencejs) - (action - (diff issue9460.reference issue9460.referencejs))) diff --git a/compiler/tests-ocaml/lib-int64/issue9460.reference b/compiler/tests-ocaml/lib-int64/issue9460.expected similarity index 100% rename from compiler/tests-ocaml/lib-int64/issue9460.reference rename to compiler/tests-ocaml/lib-int64/issue9460.expected diff --git a/compiler/tests-ocaml/lib-int64/test.reference b/compiler/tests-ocaml/lib-int64/test.expected similarity index 100% rename from compiler/tests-ocaml/lib-int64/test.reference rename to compiler/tests-ocaml/lib-int64/test.expected diff --git a/compiler/tests-ocaml/lib-list/dune b/compiler/tests-ocaml/lib-list/dune index cbf1c10306..9047167ba4 100644 --- a/compiler/tests-ocaml/lib-list/dune +++ b/compiler/tests-ocaml/lib-list/dune @@ -1,18 +1,4 @@ -(executables +(tests (names test) (libraries) (modes js)) - -(rule - (target test.referencejs) - (deps test.bc.js) - (action - (with-stdout-to - %{target} - (run node ./test.bc.js)))) - -(rule - (alias runtest) - (deps test.reference test.referencejs) - (action - (diff test.reference test.referencejs))) diff --git a/compiler/tests-ocaml/lib-list/test.reference b/compiler/tests-ocaml/lib-list/test.expected similarity index 100% rename from compiler/tests-ocaml/lib-list/test.reference rename to compiler/tests-ocaml/lib-list/test.expected diff --git a/compiler/tests-ocaml/lib-option/dune b/compiler/tests-ocaml/lib-option/dune index cbf1c10306..9047167ba4 100644 --- a/compiler/tests-ocaml/lib-option/dune +++ b/compiler/tests-ocaml/lib-option/dune @@ -1,18 +1,4 @@ -(executables +(tests (names test) (libraries) (modes js)) - -(rule - (target test.referencejs) - (deps test.bc.js) - (action - (with-stdout-to - %{target} - (run node ./test.bc.js)))) - -(rule - (alias runtest) - (deps test.reference test.referencejs) - (action - (diff test.reference test.referencejs))) diff --git a/compiler/tests-ocaml/lib-option/test.reference b/compiler/tests-ocaml/lib-option/test.expected similarity index 100% rename from compiler/tests-ocaml/lib-option/test.reference rename to compiler/tests-ocaml/lib-option/test.expected diff --git a/compiler/tests-ocaml/lib-printf/dune b/compiler/tests-ocaml/lib-printf/dune index 766ae6ff86..69defbd4e8 100644 --- a/compiler/tests-ocaml/lib-printf/dune +++ b/compiler/tests-ocaml/lib-printf/dune @@ -1,4 +1,4 @@ -(executables +(tests (names pr6534 pr6938 tprintf) (libraries) (flags @@ -6,45 +6,3 @@ (modes js (best exe))) - -(rule - (target pr6534.referencejs) - (deps pr6534.bc.js) - (action - (with-stdout-to - %{target} - (run node ./pr6534.bc.js)))) - -(rule - (alias runtest) - (deps pr6534.reference pr6534.referencejs) - (action - (diff pr6534.reference pr6534.referencejs))) - -(rule - (target pr6938.referencejs) - (deps pr6938.bc.js) - (action - (with-stdout-to - %{target} - (run node ./pr6938.bc.js)))) - -(rule - (alias runtest) - (deps pr6938.reference pr6938.referencejs) - (action - (diff pr6938.reference pr6938.referencejs))) - -(rule - (target tprintf.referencejs) - (deps tprintf.bc.js) - (action - (with-stdout-to - %{target} - (run node ./tprintf.bc.js)))) - -(rule - (alias runtest) - (deps tprintf.reference tprintf.referencejs) - (action - (diff tprintf.reference tprintf.referencejs))) diff --git a/compiler/tests-ocaml/lib-printf/pr6534.reference b/compiler/tests-ocaml/lib-printf/pr6534.expected similarity index 100% rename from compiler/tests-ocaml/lib-printf/pr6534.reference rename to compiler/tests-ocaml/lib-printf/pr6534.expected diff --git a/compiler/tests-ocaml/lib-printf/pr6938.reference b/compiler/tests-ocaml/lib-printf/pr6938.expected similarity index 100% rename from compiler/tests-ocaml/lib-printf/pr6938.reference rename to compiler/tests-ocaml/lib-printf/pr6938.expected diff --git a/compiler/tests-ocaml/lib-printf/tprintf.reference b/compiler/tests-ocaml/lib-printf/tprintf.expected similarity index 100% rename from compiler/tests-ocaml/lib-printf/tprintf.reference rename to compiler/tests-ocaml/lib-printf/tprintf.expected diff --git a/compiler/tests-ocaml/lib-queue/dune b/compiler/tests-ocaml/lib-queue/dune index cbf1c10306..9047167ba4 100644 --- a/compiler/tests-ocaml/lib-queue/dune +++ b/compiler/tests-ocaml/lib-queue/dune @@ -1,18 +1,4 @@ -(executables +(tests (names test) (libraries) (modes js)) - -(rule - (target test.referencejs) - (deps test.bc.js) - (action - (with-stdout-to - %{target} - (run node ./test.bc.js)))) - -(rule - (alias runtest) - (deps test.reference test.referencejs) - (action - (diff test.reference test.referencejs))) diff --git a/compiler/tests-ocaml/lib-queue/test.reference b/compiler/tests-ocaml/lib-queue/test.expected similarity index 100% rename from compiler/tests-ocaml/lib-queue/test.reference rename to compiler/tests-ocaml/lib-queue/test.expected diff --git a/compiler/tests-ocaml/lib-random/defaultinit.reference b/compiler/tests-ocaml/lib-random/defaultinit.expected similarity index 100% rename from compiler/tests-ocaml/lib-random/defaultinit.reference rename to compiler/tests-ocaml/lib-random/defaultinit.expected diff --git a/compiler/tests-ocaml/lib-random/dune b/compiler/tests-ocaml/lib-random/dune index 8669046443..840bec2a7f 100644 --- a/compiler/tests-ocaml/lib-random/dune +++ b/compiler/tests-ocaml/lib-random/dune @@ -1,52 +1,8 @@ -(executables +(tests (names chi2 selfinit testvectors) - (enabled_if + (build_if (>= %{ocaml_version} 5)) (libraries) (modes js (best exe))) - -(rule - (alias runtest) - (enabled_if - (>= %{ocaml_version} 5)) - (deps chi2.bc.js) - (action - (run node chi2.bc.js))) - -(rule - (target selfinit.referencejs) - (enabled_if - (>= %{ocaml_version} 5)) - (deps selfinit.bc.js) - (action - (with-stdout-to - %{target} - (run node ./selfinit.bc.js)))) - -(rule - (alias runtest) - (enabled_if - (>= %{ocaml_version} 5)) - (deps selfinit.reference selfinit.referencejs) - (action - (diff selfinit.reference selfinit.referencejs))) - -(rule - (target testvectors.referencejs) - (enabled_if - (>= %{ocaml_version} 5)) - (deps testvectors.bc.js) - (action - (with-stdout-to - %{target} - (run node ./testvectors.bc.js)))) - -(rule - (alias runtest) - (enabled_if - (>= %{ocaml_version} 5)) - (deps testvectors.reference testvectors.referencejs) - (action - (diff testvectors.reference testvectors.referencejs))) diff --git a/compiler/tests-ocaml/lib-random/selfinit.reference b/compiler/tests-ocaml/lib-random/selfinit.expected similarity index 100% rename from compiler/tests-ocaml/lib-random/selfinit.reference rename to compiler/tests-ocaml/lib-random/selfinit.expected diff --git a/compiler/tests-ocaml/lib-random/testvectors.reference b/compiler/tests-ocaml/lib-random/testvectors.expected similarity index 100% rename from compiler/tests-ocaml/lib-random/testvectors.reference rename to compiler/tests-ocaml/lib-random/testvectors.expected diff --git a/compiler/tests-ocaml/lib-result/dune b/compiler/tests-ocaml/lib-result/dune index cbf1c10306..9047167ba4 100644 --- a/compiler/tests-ocaml/lib-result/dune +++ b/compiler/tests-ocaml/lib-result/dune @@ -1,18 +1,4 @@ -(executables +(tests (names test) (libraries) (modes js)) - -(rule - (target test.referencejs) - (deps test.bc.js) - (action - (with-stdout-to - %{target} - (run node ./test.bc.js)))) - -(rule - (alias runtest) - (deps test.reference test.referencejs) - (action - (diff test.reference test.referencejs))) diff --git a/compiler/tests-ocaml/lib-result/test.reference b/compiler/tests-ocaml/lib-result/test.expected similarity index 100% rename from compiler/tests-ocaml/lib-result/test.reference rename to compiler/tests-ocaml/lib-result/test.expected diff --git a/compiler/tests-ocaml/lib-seq/dune b/compiler/tests-ocaml/lib-seq/dune index cbf1c10306..9047167ba4 100644 --- a/compiler/tests-ocaml/lib-seq/dune +++ b/compiler/tests-ocaml/lib-seq/dune @@ -1,18 +1,4 @@ -(executables +(tests (names test) (libraries) (modes js)) - -(rule - (target test.referencejs) - (deps test.bc.js) - (action - (with-stdout-to - %{target} - (run node ./test.bc.js)))) - -(rule - (alias runtest) - (deps test.reference test.referencejs) - (action - (diff test.reference test.referencejs))) diff --git a/compiler/tests-ocaml/lib-seq/test.reference b/compiler/tests-ocaml/lib-seq/test.expected similarity index 100% rename from compiler/tests-ocaml/lib-seq/test.reference rename to compiler/tests-ocaml/lib-seq/test.expected diff --git a/compiler/tests-ocaml/lib-set/dune b/compiler/tests-ocaml/lib-set/dune index 3c850fd441..9e8fed86d5 100644 --- a/compiler/tests-ocaml/lib-set/dune +++ b/compiler/tests-ocaml/lib-set/dune @@ -1,32 +1,4 @@ -(executables +(tests (names testmap testset) (libraries) (modes js)) - -(rule - (target testmap.referencejs) - (deps testmap.bc.js) - (action - (with-stdout-to - %{target} - (run node ./testmap.bc.js)))) - -(rule - (alias runtest) - (deps testmap.reference testmap.referencejs) - (action - (diff testmap.reference testmap.referencejs))) - -(rule - (target testset.referencejs) - (deps testset.bc.js) - (action - (with-stdout-to - %{target} - (run node ./testset.bc.js)))) - -(rule - (alias runtest) - (deps testset.reference testset.referencejs) - (action - (diff testset.reference testset.referencejs))) diff --git a/compiler/tests-ocaml/lib-set/testmap.reference b/compiler/tests-ocaml/lib-set/testmap.expected similarity index 100% rename from compiler/tests-ocaml/lib-set/testmap.reference rename to compiler/tests-ocaml/lib-set/testmap.expected diff --git a/compiler/tests-ocaml/lib-set/testset.reference b/compiler/tests-ocaml/lib-set/testset.expected similarity index 100% rename from compiler/tests-ocaml/lib-set/testset.reference rename to compiler/tests-ocaml/lib-set/testset.expected diff --git a/compiler/tests-ocaml/lib-stack/dune b/compiler/tests-ocaml/lib-stack/dune index cbf1c10306..9047167ba4 100644 --- a/compiler/tests-ocaml/lib-stack/dune +++ b/compiler/tests-ocaml/lib-stack/dune @@ -1,18 +1,4 @@ -(executables +(tests (names test) (libraries) (modes js)) - -(rule - (target test.referencejs) - (deps test.bc.js) - (action - (with-stdout-to - %{target} - (run node ./test.bc.js)))) - -(rule - (alias runtest) - (deps test.reference test.referencejs) - (action - (diff test.reference test.referencejs))) diff --git a/compiler/tests-ocaml/lib-stack/test.reference b/compiler/tests-ocaml/lib-stack/test.expected similarity index 100% rename from compiler/tests-ocaml/lib-stack/test.reference rename to compiler/tests-ocaml/lib-stack/test.expected diff --git a/compiler/tests-ocaml/lib-str/dune b/compiler/tests-ocaml/lib-str/dune index bfd1aeb60c..18b732190a 100644 --- a/compiler/tests-ocaml/lib-str/dune +++ b/compiler/tests-ocaml/lib-str/dune @@ -1,18 +1,4 @@ -(executables +(tests (names t01) (libraries str) (modes js)) - -(rule - (target t01.referencejs) - (deps t01.bc.js) - (action - (with-stdout-to - %{target} - (run node ./t01.bc.js)))) - -(rule - (alias runtest) - (deps t01.reference t01.referencejs) - (action - (diff t01.reference t01.referencejs))) diff --git a/compiler/tests-ocaml/lib-str/t01.reference b/compiler/tests-ocaml/lib-str/t01.expected similarity index 100% rename from compiler/tests-ocaml/lib-str/t01.reference rename to compiler/tests-ocaml/lib-str/t01.expected diff --git a/compiler/tests-ocaml/lib-string/dune b/compiler/tests-ocaml/lib-string/dune index 03cbf02fd4..f1b08d6ad0 100644 --- a/compiler/tests-ocaml/lib-string/dune +++ b/compiler/tests-ocaml/lib-string/dune @@ -1,32 +1,6 @@ -(executables +(tests (names test_string binary) - (enabled_if + (build_if (>= %{ocaml_version} 5)) (libraries) (modes js)) - -(rule - (target test_string.referencejs) - (enabled_if - (>= %{ocaml_version} 5)) - (deps test_string.bc.js) - (action - (with-stdout-to - %{target} - (run node ./test_string.bc.js)))) - -(rule - (alias runtest) - (enabled_if - (>= %{ocaml_version} 5)) - (deps test_string.reference test_string.referencejs) - (action - (diff test_string.reference test_string.referencejs))) - -(rule - (alias runtest) - (enabled_if - (>= %{ocaml_version} 5)) - (deps binary.bc.js) - (action - (run node binary.bc.js))) diff --git a/compiler/tests-ocaml/lib-string/test_string.reference b/compiler/tests-ocaml/lib-string/test_string.expected similarity index 100% rename from compiler/tests-ocaml/lib-string/test_string.reference rename to compiler/tests-ocaml/lib-string/test_string.expected diff --git a/compiler/tests-ocaml/lib-uchar/dune b/compiler/tests-ocaml/lib-uchar/dune index cbf1c10306..9047167ba4 100644 --- a/compiler/tests-ocaml/lib-uchar/dune +++ b/compiler/tests-ocaml/lib-uchar/dune @@ -1,18 +1,4 @@ -(executables +(tests (names test) (libraries) (modes js)) - -(rule - (target test.referencejs) - (deps test.bc.js) - (action - (with-stdout-to - %{target} - (run node ./test.bc.js)))) - -(rule - (alias runtest) - (deps test.reference test.referencejs) - (action - (diff test.reference test.referencejs))) diff --git a/compiler/tests-ocaml/lib-uchar/test.reference b/compiler/tests-ocaml/lib-uchar/test.expected similarity index 100% rename from compiler/tests-ocaml/lib-uchar/test.reference rename to compiler/tests-ocaml/lib-uchar/test.expected diff --git a/compiler/tests-ocaml/prim-bigstring/bigstring_access.reference b/compiler/tests-ocaml/prim-bigstring/bigstring_access.expected similarity index 100% rename from compiler/tests-ocaml/prim-bigstring/bigstring_access.reference rename to compiler/tests-ocaml/prim-bigstring/bigstring_access.expected diff --git a/compiler/tests-ocaml/prim-bigstring/dune b/compiler/tests-ocaml/prim-bigstring/dune index 7c85997d5e..2e162bd45a 100644 --- a/compiler/tests-ocaml/prim-bigstring/dune +++ b/compiler/tests-ocaml/prim-bigstring/dune @@ -1,32 +1,4 @@ -(executables +(tests (names bigstring_access string_access) (libraries) (modes js)) - -(rule - (target bigstring_access.referencejs) - (deps bigstring_access.bc.js) - (action - (with-stdout-to - %{target} - (run node ./bigstring_access.bc.js)))) - -(rule - (alias runtest) - (deps bigstring_access.reference bigstring_access.referencejs) - (action - (diff bigstring_access.reference bigstring_access.referencejs))) - -(rule - (target string_access.referencejs) - (deps string_access.bc.js) - (action - (with-stdout-to - %{target} - (run node ./string_access.bc.js)))) - -(rule - (alias runtest) - (deps string_access.reference string_access.referencejs) - (action - (diff string_access.reference string_access.referencejs))) diff --git a/compiler/tests-ocaml/prim-bigstring/string_access.reference b/compiler/tests-ocaml/prim-bigstring/string_access.expected similarity index 100% rename from compiler/tests-ocaml/prim-bigstring/string_access.reference rename to compiler/tests-ocaml/prim-bigstring/string_access.expected diff --git a/compiler/tests-ocaml/prim-bswap/bswap.reference b/compiler/tests-ocaml/prim-bswap/bswap.expected similarity index 100% rename from compiler/tests-ocaml/prim-bswap/bswap.reference rename to compiler/tests-ocaml/prim-bswap/bswap.expected diff --git a/compiler/tests-ocaml/prim-bswap/dune b/compiler/tests-ocaml/prim-bswap/dune index 5fa32da796..36c5b217b1 100644 --- a/compiler/tests-ocaml/prim-bswap/dune +++ b/compiler/tests-ocaml/prim-bswap/dune @@ -1,18 +1,4 @@ -(executables +(tests (names bswap) (libraries) (modes js)) - -(rule - (target bswap.referencejs) - (deps bswap.bc.js) - (action - (with-stdout-to - %{target} - (run node ./bswap.bc.js)))) - -(rule - (alias runtest) - (deps bswap.reference bswap.referencejs) - (action - (diff bswap.reference bswap.referencejs))) diff --git a/compiler/tests-ocaml/prim-revapply/apply.reference b/compiler/tests-ocaml/prim-revapply/apply.expected similarity index 100% rename from compiler/tests-ocaml/prim-revapply/apply.reference rename to compiler/tests-ocaml/prim-revapply/apply.expected diff --git a/compiler/tests-ocaml/prim-revapply/dune b/compiler/tests-ocaml/prim-revapply/dune index bddaf61921..bf4e90bb65 100644 --- a/compiler/tests-ocaml/prim-revapply/dune +++ b/compiler/tests-ocaml/prim-revapply/dune @@ -1,32 +1,4 @@ -(executables +(tests (names apply revapply) (libraries) (modes js)) - -(rule - (target apply.referencejs) - (deps apply.bc.js) - (action - (with-stdout-to - %{target} - (run node ./apply.bc.js)))) - -(rule - (alias runtest) - (deps apply.reference apply.referencejs) - (action - (diff apply.reference apply.referencejs))) - -(rule - (target revapply.referencejs) - (deps revapply.bc.js) - (action - (with-stdout-to - %{target} - (run node ./revapply.bc.js)))) - -(rule - (alias runtest) - (deps revapply.reference revapply.referencejs) - (action - (diff revapply.reference revapply.referencejs))) diff --git a/compiler/tests-ocaml/prim-revapply/revapply.reference b/compiler/tests-ocaml/prim-revapply/revapply.expected similarity index 100% rename from compiler/tests-ocaml/prim-revapply/revapply.reference rename to compiler/tests-ocaml/prim-revapply/revapply.expected diff --git a/compiler/tests-re/dune b/compiler/tests-re/dune index cc867c42a2..10c45d2c5b 100644 --- a/compiler/tests-re/dune +++ b/compiler/tests-re/dune @@ -3,13 +3,7 @@ (flags (:standard -w -32-69)))) -(executables +(tests (names test_str) (libraries str re) (modes js)) - -(rule - (alias runtest) - (deps test_str.bc.js) - (action - (run node ./test_str.bc.js))) diff --git a/compiler/tests-runtime-events/dune b/compiler/tests-runtime-events/dune index 15083cc9e0..f387de95eb 100644 --- a/compiler/tests-runtime-events/dune +++ b/compiler/tests-runtime-events/dune @@ -3,17 +3,9 @@ (flags (:standard -w -32-69)))) -(executables +(tests (names test_runtime_events) - (enabled_if + (build_if (>= %{ocaml_version} 5.1.0)) (libraries runtime_events) (modes js)) - -(rule - (alias runtest) - (deps test_runtime_events.bc.js) - (enabled_if - (>= %{ocaml_version} 5.1.0)) - (action - (run node ./test_runtime_events.bc.js))) diff --git a/compiler/tests-sourcemap/dump.reference b/compiler/tests-sourcemap/dump_sourcemap.expected similarity index 100% rename from compiler/tests-sourcemap/dump.reference rename to compiler/tests-sourcemap/dump_sourcemap.expected diff --git a/compiler/tests-sourcemap/dune b/compiler/tests-sourcemap/dune index 6c96b3aef1..2582f218bc 100644 --- a/compiler/tests-sourcemap/dune +++ b/compiler/tests-sourcemap/dune @@ -6,6 +6,8 @@ (executable (name test) (modules test) + (enabled_if + (<> %{profile} using-effects)) (modes js) (js_of_ocaml (link_flags @@ -16,24 +18,11 @@ (name testlib) (modules a b c d)) -(executable +(test (name dump_sourcemap) (modules dump_sourcemap) - (libraries js_of_ocaml-compiler)) - -(rule - (target dump) - (enabled_if - (= %{profile} dev)) (action - (with-stdout-to - %{target} - (run ./dump_sourcemap.exe %{dep:test.bc.js})))) - -(rule - (alias runtest) + (run %{test} %{dep:test.bc.js})) (enabled_if (= %{profile} dev)) - (deps dump.reference dump) - (action - (diff dump.reference dump))) + (libraries js_of_ocaml-compiler)) diff --git a/compiler/tests-toplevel/dune b/compiler/tests-toplevel/dune index 33e549643f..abd0a7828a 100644 --- a/compiler/tests-toplevel/dune +++ b/compiler/tests-toplevel/dune @@ -13,31 +13,28 @@ (run %{bin:js_of_ocaml} --toplevel %{dep:test_toplevel.bc} -o %{targets}))) (rule - (target test_toplevel.referencejs) - (deps test_toplevel.js) + (target test_toplevel.bc.js.actual) (enabled_if (>= %{ocaml_version} 5.2)) (action (with-stdout-to %{target} - (run node ./test_toplevel.js)))) + (run node %{dep:test_toplevel.bc.js})))) (rule - (target test_toplevel.referencebcjs) - (deps test_toplevel.bc.js) + (target test_toplevel.js.actual) (enabled_if (>= %{ocaml_version} 5.2)) (action (with-stdout-to %{target} - (run node ./test_toplevel.bc.js)))) + (run node %{dep:test_toplevel.js})))) (rule (alias runtest) (enabled_if (>= %{ocaml_version} 5.2)) - (deps test_toplevel.reference test_toplevel.referencejs) (action (progn - (diff test_toplevel.reference test_toplevel.referencebcjs) - (diff test_toplevel.reference test_toplevel.referencejs)))) + (diff test_toplevel.expected test_toplevel.bc.js.actual) + (diff test_toplevel.expected test_toplevel.js.actual)))) diff --git a/compiler/tests-toplevel/test_toplevel.reference b/compiler/tests-toplevel/test_toplevel.expected similarity index 100% rename from compiler/tests-toplevel/test_toplevel.reference rename to compiler/tests-toplevel/test_toplevel.expected diff --git a/dune-project b/dune-project index a93d82f117..c821bbe45b 100644 --- a/dune-project +++ b/dune-project @@ -1,4 +1,4 @@ -(lang dune 3.15) +(lang dune 3.17) (using menhir 2.0) (name js_of_ocaml) diff --git a/dune-workspace.dev b/dune-workspace.dev index 0f4dc203a3..5b5373a125 100644 --- a/dune-workspace.dev +++ b/dune-workspace.dev @@ -1,4 +1,4 @@ -(lang dune 3.15) +(lang dune 3.17) ;; Install the following opam switches, copy this file as ;; dune-workspace and run: diff --git a/examples/separate_compilation/bin.reference b/examples/separate_compilation/bin.expected similarity index 100% rename from examples/separate_compilation/bin.reference rename to examples/separate_compilation/bin.expected diff --git a/examples/separate_compilation/dune b/examples/separate_compilation/dune index 4115a57ce8..17d9055b21 100644 --- a/examples/separate_compilation/dune +++ b/examples/separate_compilation/dune @@ -101,7 +101,7 @@ %{targets}))) (rule - (target bin.referencejs) + (target bin.actual) (deps bin.js) (action (with-stdout-to @@ -110,9 +110,8 @@ (rule (alias runtest) - (deps bin.reference bin.referencejs) (action - (diff bin.reference bin.referencejs))) + (diff bin.expected bin.actual))) (alias (name default) diff --git a/js_of_ocaml-compiler.opam b/js_of_ocaml-compiler.opam index 131e3e5c12..8eb65727b8 100644 --- a/js_of_ocaml-compiler.opam +++ b/js_of_ocaml-compiler.opam @@ -12,7 +12,7 @@ homepage: "https://ocsigen.org/js_of_ocaml/latest/manual/overview" doc: "https://ocsigen.org/js_of_ocaml/latest/manual/overview" bug-reports: "https://github.com/ocsigen/js_of_ocaml/issues" depends: [ - "dune" {>= "3.15"} + "dune" {>= "3.17"} "ocaml" {>= "4.08" & < "5.4"} "num" {with-test} "ppx_expect" {>= "v0.14.2" & with-test} diff --git a/js_of_ocaml-lwt.opam b/js_of_ocaml-lwt.opam index 040e9c1009..af46230bdb 100644 --- a/js_of_ocaml-lwt.opam +++ b/js_of_ocaml-lwt.opam @@ -12,7 +12,7 @@ homepage: "https://ocsigen.org/js_of_ocaml/latest/manual/overview" doc: "https://ocsigen.org/js_of_ocaml/latest/manual/overview" bug-reports: "https://github.com/ocsigen/js_of_ocaml/issues" depends: [ - "dune" {>= "3.15"} + "dune" {>= "3.17"} "ocaml" {>= "4.08"} "js_of_ocaml" {= version} "js_of_ocaml-ppx" {= version} diff --git a/js_of_ocaml-ppx.opam b/js_of_ocaml-ppx.opam index 7e65f4f2db..52f72e2c13 100644 --- a/js_of_ocaml-ppx.opam +++ b/js_of_ocaml-ppx.opam @@ -12,7 +12,7 @@ homepage: "https://ocsigen.org/js_of_ocaml/latest/manual/overview" doc: "https://ocsigen.org/js_of_ocaml/latest/manual/overview" bug-reports: "https://github.com/ocsigen/js_of_ocaml/issues" depends: [ - "dune" {>= "3.15"} + "dune" {>= "3.17"} "ocaml" {>= "4.08"} "js_of_ocaml" {= version} "ppxlib" {>= "0.15.0"} diff --git a/js_of_ocaml-ppx_deriving_json.opam b/js_of_ocaml-ppx_deriving_json.opam index 23afe4fa25..0600f216b2 100644 --- a/js_of_ocaml-ppx_deriving_json.opam +++ b/js_of_ocaml-ppx_deriving_json.opam @@ -12,7 +12,7 @@ homepage: "https://ocsigen.org/js_of_ocaml/latest/manual/overview" doc: "https://ocsigen.org/js_of_ocaml/latest/manual/overview" bug-reports: "https://github.com/ocsigen/js_of_ocaml/issues" depends: [ - "dune" {>= "3.15"} + "dune" {>= "3.17"} "ocaml" {>= "4.08"} "js_of_ocaml" {= version} "ppxlib" {>= "0.15"} diff --git a/js_of_ocaml-toplevel.opam b/js_of_ocaml-toplevel.opam index 820a523a19..b2daa598b2 100644 --- a/js_of_ocaml-toplevel.opam +++ b/js_of_ocaml-toplevel.opam @@ -12,7 +12,7 @@ homepage: "https://ocsigen.org/js_of_ocaml/latest/manual/overview" doc: "https://ocsigen.org/js_of_ocaml/latest/manual/overview" bug-reports: "https://github.com/ocsigen/js_of_ocaml/issues" depends: [ - "dune" {>= "3.15"} + "dune" {>= "3.17"} "ocaml" {>= "4.08"} "js_of_ocaml-compiler" {= version} "ocamlfind" {>= "1.5.1"} diff --git a/js_of_ocaml-tyxml.opam b/js_of_ocaml-tyxml.opam index 0feed79e0e..7f7af606f1 100644 --- a/js_of_ocaml-tyxml.opam +++ b/js_of_ocaml-tyxml.opam @@ -12,7 +12,7 @@ homepage: "https://ocsigen.org/js_of_ocaml/latest/manual/overview" doc: "https://ocsigen.org/js_of_ocaml/latest/manual/overview" bug-reports: "https://github.com/ocsigen/js_of_ocaml/issues" depends: [ - "dune" {>= "3.15"} + "dune" {>= "3.17"} "ocaml" {>= "4.08"} "js_of_ocaml" {= version} "js_of_ocaml-ppx" {= version} diff --git a/js_of_ocaml.opam b/js_of_ocaml.opam index b3300ecde4..5425a5c0e8 100644 --- a/js_of_ocaml.opam +++ b/js_of_ocaml.opam @@ -12,7 +12,7 @@ homepage: "https://ocsigen.org/js_of_ocaml/latest/manual/overview" doc: "https://ocsigen.org/js_of_ocaml/latest/manual/overview" bug-reports: "https://github.com/ocsigen/js_of_ocaml/issues" depends: [ - "dune" {>= "3.15"} + "dune" {>= "3.17"} "ocaml" {>= "4.08"} "js_of_ocaml-compiler" {= version} "ppxlib" {>= "0.15"} diff --git a/toplevel/examples/lwt_toplevel/dune b/toplevel/examples/lwt_toplevel/dune index ca635edf0b..65a80eba6e 100644 --- a/toplevel/examples/lwt_toplevel/dune +++ b/toplevel/examples/lwt_toplevel/dune @@ -39,11 +39,9 @@ (:standard -linkall)) (modes byte js) (js_of_ocaml - (link_flags - :standard - ; We use the generated file in the doc. Let's not bloat it with sourcemap. - ; Plus, the source map would be too large on 32-bit architectures - --no-source-map) + ; We use the generated file in the doc. Let's not bloat it with sourcemap. + ; Plus, the source map would be too large on 32-bit architectures + (sourcemap no) (build_runtime_flags (:standard --file diff --git a/toplevel/test/dune b/toplevel/test/dune index e7fe80e479..648bc9eeee 100644 --- a/toplevel/test/dune +++ b/toplevel/test/dune @@ -27,7 +27,7 @@ %{targets}))) (rule - (target test_toplevel.referencejs) + (target test_toplevel.actual) (deps test_toplevel.js) (action (with-stdout-to @@ -36,6 +36,5 @@ (rule (alias runtest) - (deps test_toplevel.reference test_toplevel.referencejs) (action - (diff test_toplevel.reference test_toplevel.referencejs))) + (diff test_toplevel.expected test_toplevel.actual))) diff --git a/toplevel/test/test_toplevel.reference b/toplevel/test/test_toplevel.expected similarity index 100% rename from toplevel/test/test_toplevel.reference rename to toplevel/test/test_toplevel.expected