Skip to content

Commit

Permalink
Library tests: lighter conditions
Browse files Browse the repository at this point in the history
  • Loading branch information
vouillon committed Nov 4, 2024
1 parent 681b455 commit 641c8bf
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 19 deletions.
16 changes: 8 additions & 8 deletions lib/tests/dune.inc
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,10 @@
(library
;; lib/tests/test_fun_call.ml
(name test_fun_call_75)
(enabled_if (and (<> %{profile} using-effects) (<> %{profile} wasm) (<> %{profile} wasm-effects)))
(enabled_if (<> %{profile} using-effects))
(modules test_fun_call)
(libraries js_of_ocaml unix)
(inline_tests (modes js wasm))
(inline_tests (modes js))
(preprocess
(pps ppx_js_internal ppx_expect)))

Expand All @@ -52,10 +52,10 @@
(library
;; lib/tests/test_json.ml
(name test_json_75)
(enabled_if (and (<> %{profile} wasm) (<> %{profile} wasm-effects)))
(enabled_if true)
(modules test_json)
(libraries js_of_ocaml unix)
(inline_tests (modes js wasm))
(inline_tests (modes js))
(preprocess
(pps ppx_js_internal ppx_expect)))

Expand All @@ -72,10 +72,10 @@
(library
;; lib/tests/test_poly_compare.ml
(name test_poly_compare_75)
(enabled_if (and (<> %{profile} wasm) (<> %{profile} wasm-effects)))
(enabled_if true)
(modules test_poly_compare)
(libraries js_of_ocaml unix)
(inline_tests (modes js wasm))
(inline_tests (modes js))
(preprocess
(pps ppx_js_internal ppx_expect)))

Expand All @@ -102,10 +102,10 @@
(library
;; lib/tests/test_sys.ml
(name test_sys_75)
(enabled_if (and (>= %{ocaml_version} 5) (<> %{profile} wasm) (<> %{profile} wasm-effects)))
(enabled_if (>= %{ocaml_version} 5))
(modules test_sys)
(libraries js_of_ocaml unix)
(inline_tests (modes js wasm))
(inline_tests (modes js))
(preprocess
(pps ppx_js_internal ppx_expect)))

Expand Down
20 changes: 9 additions & 11 deletions lib/tests/gen-rules/gen.ml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ let () =
(enabled_if %s)
(modules %s)
(libraries js_of_ocaml unix)
(inline_tests (modes js wasm))
(inline_tests (modes js%s))
(preprocess
(pps ppx_js_internal ppx_expect)))
|}
Expand All @@ -80,13 +80,11 @@ let () =
basename
(Hashtbl.hash prefix mod 100)
(match enabled_if basename with
| Any -> "true"
| GE5 ->
(* ZZZ /static not yet implemented *)
"(and (>= %{ocaml_version} 5) (<> %{profile} wasm) (<> %{profile} \
wasm-effects))"
| Not_wasm -> "(and (<> %{profile} wasm) (<> %{profile} wasm-effects))"
| No_effects_not_wasm ->
"(and (<> %{profile} using-effects) (<> %{profile} wasm) (<> %{profile} \
wasm-effects))")
basename)
| Any | Not_wasm -> "true"
| GE5 -> "(>= %{ocaml_version} 5)"
| No_effects_not_wasm -> "(<> %{profile} using-effects)")
basename
(match enabled_if basename with
| Any -> " wasm"
| GE5 -> "" (* ZZZ /static not yet implemented *)
| Not_wasm | No_effects_not_wasm -> ""))

0 comments on commit 641c8bf

Please sign in to comment.