Skip to content

Commit f7ad262

Browse files
vouillonhhugo
authored andcommitted
Use dune test stanza
1 parent 427b3a7 commit f7ad262

File tree

126 files changed

+88
-1275
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

126 files changed

+88
-1275
lines changed

compiler/tests-env/dune

Lines changed: 7 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,11 @@
1-
(executable
1+
(test
22
(modes js)
33
(js_of_ocaml
4+
(javascript_files setup.js)
45
(flags :standard --setenv JSOO_C=from-jsoo-args))
5-
(name test))
6-
7-
(rule
8-
(target test.js)
9-
(action
10-
(with-outputs-to
11-
%{target}
12-
(cat %{dep:setup.js} %{dep:./test.bc.js}))))
13-
14-
(rule
15-
(target test.output)
166
(action
17-
(with-outputs-to
18-
%{target}
19-
(setenv
20-
JSOO_B
21-
from-env
22-
(run node %{dep:./test.js})))))
23-
24-
(rule
25-
(alias runtest)
26-
(action
27-
(diff test.reference test.output)))
7+
(setenv
8+
JSOO_B
9+
from-env
10+
(run node %{test})))
11+
(name test))
File renamed without changes.

compiler/tests-linkall/dune

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
(js_of_ocaml
66
(compilation_mode separate))))
77

8-
(executable
8+
(test
99
(name test)
1010
(modes byte js)
1111
(libraries dynlink)
@@ -15,15 +15,3 @@
1515
;; Let's use it for the test
1616
(link_flags
1717
(:standard -linkall)))
18-
19-
(rule
20-
(target test.output)
21-
(action
22-
(with-stdout-to
23-
%{target}
24-
(run node %{dep:test.bc.js}))))
25-
26-
(rule
27-
(alias runtest)
28-
(action
29-
(diff test.reference test.output)))
File renamed without changes.

compiler/tests-num/dune

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
(executable
1+
(test
22
(name main)
33
(modules main test_nats test test_big_ints test_ratios test_nums test_io)
44
(libraries num)
@@ -9,23 +9,9 @@
99
(:standard -linkall -w -3-7-33-35-37 -safe-string -no-strict-sequence)))
1010

1111
(rule
12-
(target main.referencejs)
13-
(deps main.bc.js)
14-
(action
15-
(with-stdout-to
16-
%{target}
17-
(run node ./main.bc.js))))
18-
19-
(rule
20-
(target main.reference)
12+
(target main.expected)
2113
(deps main.exe)
2214
(action
2315
(with-stdout-to
2416
%{target}
2517
(run ./main.exe))))
26-
27-
(rule
28-
(alias runtest)
29-
(deps main.reference main.referencejs)
30-
(action
31-
(diff main.reference main.referencejs)))
Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,4 @@
1-
(executables
1+
(tests
22
(names recursive_module_init)
33
(libraries)
44
(modes js))
5-
6-
(rule
7-
(target recursive_module_init.referencejs)
8-
(deps recursive_module_init.bc.js)
9-
(action
10-
(with-stdout-to
11-
%{target}
12-
(run node ./recursive_module_init.bc.js))))
13-
14-
(rule
15-
(alias runtest)
16-
(deps recursive_module_init.reference recursive_module_init.referencejs)
17-
(action
18-
(diff recursive_module_init.reference recursive_module_init.referencejs)))
Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,3 @@
1-
(executables
2-
(names test_atomic)
3-
(libraries)
1+
(test
2+
(name test_atomic)
43
(modes js))
5-
6-
(rule
7-
(alias runtest)
8-
(deps test_atomic.bc.js)
9-
(action
10-
(run node test_atomic.bc.js)))

0 commit comments

Comments
 (0)