Skip to content

Commit

Permalink
Use dune test stanza
Browse files Browse the repository at this point in the history
  • Loading branch information
vouillon committed Jun 26, 2024
1 parent 999bf16 commit 5448903
Show file tree
Hide file tree
Showing 116 changed files with 70 additions and 1,210 deletions.
16 changes: 1 addition & 15 deletions compiler/tests-ocaml/basic-modules/dune
Original file line number Diff line number Diff line change
@@ -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)))
11 changes: 2 additions & 9 deletions compiler/tests-ocaml/lib-atomic/dune
Original file line number Diff line number Diff line change
@@ -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)))
72 changes: 1 addition & 71 deletions compiler/tests-ocaml/lib-bigarray/dune
Original file line number Diff line number Diff line change
@@ -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)))
16 changes: 1 addition & 15 deletions compiler/tests-ocaml/lib-bool/dune
Original file line number Diff line number Diff line change
@@ -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)))
File renamed without changes.
16 changes: 1 addition & 15 deletions compiler/tests-ocaml/lib-buffer/dune
Original file line number Diff line number Diff line change
@@ -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)))
16 changes: 1 addition & 15 deletions compiler/tests-ocaml/lib-bytes-utf/dune
Original file line number Diff line number Diff line change
@@ -1,22 +1,8 @@
(executables
(tests
(names test)
(libraries)
(flags
(:standard \ -strict-sequence))
(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)))
28 changes: 1 addition & 27 deletions compiler/tests-ocaml/lib-bytes/dune
Original file line number Diff line number Diff line change
@@ -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))
28 changes: 3 additions & 25 deletions compiler/tests-ocaml/lib-digest/dune
Original file line number Diff line number Diff line change
@@ -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)))
Loading

0 comments on commit 5448903

Please sign in to comment.