Skip to content

Commit

Permalink
Disable JavaScript tests
Browse files Browse the repository at this point in the history
  • Loading branch information
vouillon committed Mar 22, 2024
1 parent 75a96df commit 3e1a839
Show file tree
Hide file tree
Showing 10 changed files with 121 additions and 96 deletions.
184 changes: 92 additions & 92 deletions compiler/tests-compiler/dune.inc

Large diffs are not rendered by default.

12 changes: 8 additions & 4 deletions compiler/tests-compiler/gen-rules/gen.ml
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,13 @@ let () =
basename
(Hashtbl.hash prefix mod 100)
(match lib_enabled_if basename with
| Any -> "true"
| GE5 -> "(>= %{ocaml_version} 5)")
| Any -> "(and (<> %{profile} wasm) (<> %{profile} wasm-effects))"
| GE5 ->
"(and (<> %{profile} wasm) (<> %{profile} wasm-effects) (>= \
%{ocaml_version} 5))")
basename
(match test_enabled_if basename with
| Any -> "true"
| GE5 -> "(>= %{ocaml_version} 5)"))
| Any -> "(and (<> %{profile} wasm) (<> %{profile} wasm-effects))"
| GE5 ->
"(and (<> %{profile} wasm) (<> %{profile} wasm-effects) (>= \
%{ocaml_version} 5))"))
4 changes: 4 additions & 0 deletions compiler/tests-dynlink-js/dune
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
(executable
(name main)
(enabled_if (and (<> %{profile} wasm) (<> %{profile} wasm-effects)))
(modules main)
(libraries js_of_ocaml)
(modes byte))

(rule
(target main.js)
(enabled_if (and (<> %{profile} wasm) (<> %{profile} wasm-effects)))
(action
(run %{bin:js_of_ocaml} --linkall -o %{target} %{dep:main.bc})))

Expand All @@ -21,6 +23,7 @@

(rule
(target main.out)
(enabled_if (and (<> %{profile} wasm) (<> %{profile} wasm-effects)))
(deps plugin.js)
(action
(with-outputs-to
Expand All @@ -29,5 +32,6 @@

(rule
(alias runtest)
(enabled_if (and (<> %{profile} wasm) (<> %{profile} wasm-effects)))
(action
(diff main.out.expected main.out)))
4 changes: 4 additions & 0 deletions compiler/tests-dynlink/dune
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
(executable
(name main)
(enabled_if (and (<> %{profile} wasm) (<> %{profile} wasm-effects)))
(modules main)
(libraries dynlink js_of_ocaml-compiler.dynlink)
(modes byte))

(rule
(target main.js)
(enabled_if (and (<> %{profile} wasm) (<> %{profile} wasm-effects)))
(deps plugin.cmo export)
(action
(run
Expand All @@ -25,6 +27,7 @@

(rule
(target main.out)
(enabled_if (and (<> %{profile} wasm) (<> %{profile} wasm-effects)))
(deps plugin.cmo)
(action
(with-outputs-to
Expand All @@ -33,5 +36,6 @@

(rule
(alias runtest)
(enabled_if (and (<> %{profile} wasm) (<> %{profile} wasm-effects)))
(action
(diff main.out.expected main.out)))
4 changes: 4 additions & 0 deletions compiler/tests-toplevel/dune
Original file line number Diff line number Diff line change
@@ -1,17 +1,20 @@
(executables
(names test_toplevel)
(enabled_if (and (<> %{profile} wasm) (<> %{profile} wasm-effects)))
(libraries js_of_ocaml-compiler.dynlink compiler-libs.toplevel)
(flags
(:standard -linkall))
(modes byte))

(rule
(targets test_toplevel.js)
(enabled_if (and (<> %{profile} wasm) (<> %{profile} wasm-effects)))
(action
(run %{bin:js_of_ocaml} --toplevel %{dep:test_toplevel.bc} -o %{targets})))

(rule
(target test_toplevel.referencejs)
(enabled_if (and (<> %{profile} wasm) (<> %{profile} wasm-effects)))
(deps test_toplevel.js)
(action
(with-stdout-to
Expand All @@ -20,6 +23,7 @@

(rule
(alias runtest)
(enabled_if (and (<> %{profile} wasm) (<> %{profile} wasm-effects)))
(deps test_toplevel.reference test_toplevel.referencejs)
(action
(diff test_toplevel.reference test_toplevel.referencejs)))
1 change: 1 addition & 0 deletions examples/namespace/dune
Original file line number Diff line number Diff line change
Expand Up @@ -59,5 +59,6 @@

(rule
(alias runtest)
(enabled_if (and (<> %{profile} wasm) (<> %{profile} wasm-effects)))
(action
(diff %{dep:for-node.expected} %{dep:for-node.actual})))
2 changes: 2 additions & 0 deletions examples/separate_compilation/dune
Original file line number Diff line number Diff line change
Expand Up @@ -110,12 +110,14 @@

(rule
(alias runtest)
(enabled_if (and (<> %{profile} wasm) (<> %{profile} wasm-effects)))
(deps bin.reference bin.referencejs)
(action
(diff bin.reference bin.referencejs)))

(alias
(name default)
(enabled_if (and (<> %{profile} wasm) (<> %{profile} wasm-effects)))
(deps
myruntime.js
stdlib.cma.js
Expand Down
4 changes: 4 additions & 0 deletions toplevel/examples/eval/dune
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
(executables
(names eval)
(enabled_if (and (<> %{profile} wasm) (<> %{profile} wasm-effects)))
(libraries js_of_ocaml-compiler js_of_ocaml-toplevel)
(link_flags
(:standard -linkall))
Expand All @@ -9,12 +10,14 @@

(rule
(targets export.txt)
(enabled_if (and (<> %{profile} wasm) (<> %{profile} wasm-effects)))
(deps eval.bc)
(action
(run jsoo_listunits -o %{targets} stdlib)))

(rule
(targets eval.js)
(enabled_if (and (<> %{profile} wasm) (<> %{profile} wasm-effects)))
(action
(run
%{bin:js_of_ocaml}
Expand All @@ -28,4 +31,5 @@

(alias
(name default)
(enabled_if (and (<> %{profile} wasm) (<> %{profile} wasm-effects)))
(deps eval.js index.html))
1 change: 1 addition & 0 deletions toplevel/examples/lwt_toplevel/dune
Original file line number Diff line number Diff line change
Expand Up @@ -149,4 +149,5 @@

(alias
(name default)
(enabled_if (and (<> %{profile} wasm) (<> %{profile} wasm-effects)))
(deps toplevel.js toplevel.bc.js index.html))
1 change: 1 addition & 0 deletions toplevel/test/dune
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@

(rule
(alias runtest)
(enabled_if (and (<> %{profile} wasm) (<> %{profile} wasm-effects)))
(deps test_toplevel.reference test_toplevel.referencejs)
(action
(diff test_toplevel.reference test_toplevel.referencejs)))

0 comments on commit 3e1a839

Please sign in to comment.