-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy pathdune
More file actions
107 lines (96 loc) · 1.91 KB
/
dune
File metadata and controls
107 lines (96 loc) · 1.91 KB
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
(executable
(name sse_server)
(modules sse_server)
(libraries tiny_httpd logs unix ptime ptime.clock.os))
(executable
(name sse_client)
(modules sse_client)
(libraries unix))
(executable
(name echo)
(flags :standard -warn-error -a+8)
(modules echo)
(libraries
tiny_httpd
logs
echo_vfs
tiny_httpd_camlzip
tiny_httpd.multipart-form-data))
(executable
(name echo_eio)
(flags :standard -warn-error -a+8)
(modules echo_eio)
(libraries
tiny_httpd
tiny_httpd_eio
eio
eio_main
logs
echo_vfs
trace.core
trace-tef
tiny_httpd_camlzip
tiny_httpd.multipart-form-data))
(executable
(name writer)
(flags :standard -warn-error -a+8)
(modules writer)
(libraries tiny_httpd logs))
(executable
(name echo_ws)
(flags :standard -warn-error -a+8)
(modules echo_ws)
(libraries tiny_httpd tiny_httpd.ws logs))
(rule
(targets test_output.txt)
(deps
(:script ./run_test.sh)
./sse_client.exe
./sse_server.exe)
(enabled_if
(= %{system} "linux"))
(package tiny_httpd)
(action
(with-stdout-to
%{targets}
(run %{script}))))
(rule
(alias runtest)
(package tiny_httpd)
(enabled_if
(= %{system} "linux"))
(deps test_output.txt)
(action
(diff test_output.txt.expected test_output.txt)))
; produce an embedded FS
(library
(name echo_vfs)
(modules vfs)
(wrapped false)
(libraries tiny_httpd))
(rule
(targets vfs.ml)
(deps
(source_tree files)
(:out test_output.txt.expected))
(enabled_if
(= %{system} "linux"))
(action
(run
%{bin:tiny-httpd-vfs-pack}
-o
%{targets}
--mirror=files/
--file=test_out.txt,%{out}
; --url=example_dot_com,http://example.com ; this breaks tests in opam sandbox 😢
)))
(rule
(targets vfs.ml)
(enabled_if
(<> %{system} "linux"))
(action
(with-stdout-to
%{targets}
(progn
(echo "let embedded_fs = Tiny_httpd_dir.Embedded_fs.create ~mtime:0. ()")
(echo "let vfs = Tiny_httpd_dir.Embedded_fs.to_vfs embedded_fs")))))