/
dune
50 lines (43 loc) · 944 Bytes
/
dune
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
; Tests for the default_implementation (mirrors 0.2.2 usage)
(test
(name test)
(modules test)
(libraries binaryen)
(ocamlopt_flags
(:include ./config/ocamlopt_flags.sexp))
(action
(run %{test})))
; Tests for binaryen.native implementation
(rule
(target test_native.ml)
(action
(progn
(copy %{dep:test.ml} %{target})
(copy test.expected test_native.expected))))
(test
(name test_native)
(modules test_native)
(libraries binaryen binaryen.native)
(ocamlopt_flags
(:include ./config/ocamlopt_flags.sexp))
(action
(run %{test})))
; Tests for binaryen.js implementation
(rule
(target test_js.ml)
(action
(progn
(copy %{dep:test.ml} %{target})
(copy test.expected test_js.expected))))
(test
(name test_js)
(enabled_if
(<> %{system} mingw64))
(modules test_js)
(modes
(byte js))
(libraries binaryen binaryen.js)
(action
(run node %{dep:test_js.bc.js}))
(js_of_ocaml
(flags --no-sourcemap)))