summaryrefslogtreecommitdiff
path: root/deps/uv/test/test.gyp
blob: 604925861e525aad865737b54ebf45a24fcb7a2a (plain)
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
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
{
  'targets': [
    {
      'target_name': 'run-tests',
      'type': 'executable',
      'dependencies': [ '../uv.gyp:libuv' ],
      'sources': [
        'blackhole-server.c',
        'echo-server.c',
        'run-tests.c',
        'runner.c',
        'runner.h',
        'test-get-loadavg.c',
        'task.h',
        'test-active.c',
        'test-async.c',
        'test-async-null-cb.c',
        'test-callback-stack.c',
        'test-callback-order.c',
        'test-close-fd.c',
        'test-close-order.c',
        'test-connect-unspecified.c',
        'test-connection-fail.c',
        'test-cwd-and-chdir.c',
        'test-default-loop-close.c',
        'test-delayed-accept.c',
        'test-eintr-handling.c',
        'test-error.c',
        'test-embed.c',
        'test-emfile.c',
        'test-env-vars.c',
        'test-fail-always.c',
        'test-fork.c',
        'test-fs.c',
        'test-fs-copyfile.c',
        'test-fs-event.c',
        'test-fs-poll.c',
        'test-getters-setters.c',
        'test-get-currentexe.c',
        'test-get-memory.c',
        'test-get-passwd.c',
        'test-getaddrinfo.c',
        'test-gethostname.c',
        'test-getnameinfo.c',
        'test-getsockname.c',
        'test-handle-fileno.c',
        'test-homedir.c',
        'test-hrtime.c',
        'test-idle.c',
        'test-idna.c',
        'test-ip6-addr.c',
        'test-ipc-heavy-traffic-deadlock-bug.c',
        'test-ipc-send-recv.c',
        'test-ipc.c',
        'test-list.h',
        'test-loop-handles.c',
        'test-loop-alive.c',
        'test-loop-close.c',
        'test-loop-stop.c',
        'test-loop-time.c',
        'test-loop-configure.c',
        'test-walk-handles.c',
        'test-watcher-cross-stop.c',
        'test-multiple-listen.c',
        'test-osx-select.c',
        'test-pass-always.c',
        'test-ping-pong.c',
        'test-pipe-bind-error.c',
        'test-pipe-connect-error.c',
        'test-pipe-connect-multiple.c',
        'test-pipe-connect-prepare.c',
        'test-pipe-getsockname.c',
        'test-pipe-pending-instances.c',
        'test-pipe-sendmsg.c',
        'test-pipe-server-close.c',
        'test-pipe-close-stdout-read-stdin.c',
        'test-pipe-set-non-blocking.c',
        'test-pipe-set-fchmod.c',
        'test-platform-output.c',
        'test-poll.c',
        'test-poll-close.c',
        'test-poll-close-doesnt-corrupt-stack.c',
        'test-poll-closesocket.c',
        'test-poll-oob.c',
        'test-process-priority.c',
        'test-process-title.c',
        'test-process-title-threadsafe.c',
        'test-queue-foreach-delete.c',
        'test-ref.c',
        'test-run-nowait.c',
        'test-run-once.c',
        'test-semaphore.c',
        'test-shutdown-close.c',
        'test-shutdown-eof.c',
        'test-shutdown-twice.c',
        'test-signal.c',
        'test-signal-multiple-loops.c',
        'test-socket-buffer-size.c',
        'test-spawn.c',
        'test-strscpy.c',
        'test-stdio-over-pipes.c',
        'test-tcp-alloc-cb-fail.c',
        'test-tcp-bind-error.c',
        'test-tcp-bind6-error.c',
        'test-tcp-close.c',
        'test-tcp-close-accept.c',
        'test-tcp-close-while-connecting.c',
        'test-tcp-create-socket-early.c',
        'test-tcp-connect-error-after-write.c',
        'test-tcp-shutdown-after-write.c',
        'test-tcp-flags.c',
        'test-tcp-connect-error.c',
        'test-tcp-connect-timeout.c',
        'test-tcp-connect6-error.c',
        'test-tcp-open.c',
        'test-tcp-write-to-half-open-connection.c',
        'test-tcp-write-after-connect.c',
        'test-tcp-writealot.c',
        'test-tcp-write-fail.c',
        'test-tcp-try-write.c',
        'test-tcp-unexpected-read.c',
        'test-tcp-oob.c',
        'test-tcp-read-stop.c',
        'test-tcp-write-queue-order.c',
        'test-threadpool.c',
        'test-threadpool-cancel.c',
        'test-thread-equal.c',
        'test-tmpdir.c',
        'test-mutexes.c',
        'test-thread.c',
        'test-barrier.c',
        'test-condvar.c',
        'test-timer-again.c',
        'test-timer-from-check.c',
        'test-timer.c',
        'test-tty.c',
        'test-udp-alloc-cb-fail.c',
        'test-udp-bind.c',
        'test-udp-create-socket-early.c',
        'test-udp-dgram-too-big.c',
        'test-udp-ipv6.c',
        'test-udp-open.c',
        'test-udp-options.c',
        'test-udp-send-and-recv.c',
        'test-udp-send-hang-loop.c',
        'test-udp-send-immediate.c',
        'test-udp-send-unreachable.c',
        'test-udp-multicast-join.c',
        'test-udp-multicast-join6.c',
        'test-dlerror.c',
        'test-udp-multicast-ttl.c',
        'test-ip4-addr.c',
        'test-ip6-addr.c',
        'test-udp-multicast-interface.c',
        'test-udp-multicast-interface6.c',
        'test-udp-try-send.c',
        'test-uname.c',
      ],
      'conditions': [
        [ 'OS=="win"', {
          'sources': [
            'runner-win.c',
            'runner-win.h',
            '../src/win/snprintf.c',
          ],
          'libraries': [ '-lws2_32' ]
        }, { # POSIX
          'sources': [
            'runner-unix.c',
            'runner-unix.h',
          ],
          'conditions': [
            [ 'OS != "zos"', {
              'defines': [ '_GNU_SOURCE' ],
              'cflags': [ '-Wno-long-long' ],
              'xcode_settings': {
                'WARNING_CFLAGS': [ '-Wno-long-long' ]
              }
            }],
          ]},
        ],
        [ 'OS in "mac dragonflybsd freebsd linux netbsd openbsd".split()', {
          'link_settings': {
            'libraries': [ '-lutil' ],
          },
        }],
        [ 'OS=="solaris"', { # make test-fs.c compile, needs _POSIX_C_SOURCE
          'defines': [
            '__EXTENSIONS__',
            '_XOPEN_SOURCE=500',
          ],
        }],
        [ 'OS=="aix"', {     # make test-fs.c compile, needs _POSIX_C_SOURCE
          'defines': [
            '_ALL_SOURCE',
            '_XOPEN_SOURCE=500',
          ],
        }],
        [ 'OS == "zos"', {
          'cflags': [ '-qxplink' ],
          'ldflags': [ '-qxplink' ],
        }],
        ['uv_library=="shared_library"', {
          'defines': [ 'USING_UV_SHARED=1' ],
          'conditions': [
            [ 'OS == "zos"', {
              'cflags': [ '-Wc,DLL' ],
            }],
          ],
        }],
      ],
      'msvs-settings': {
        'VCLinkerTool': {
          'SubSystem': 1, # /subsystem:console
        },
      },
    },

    {
      'target_name': 'run-benchmarks',
      'type': 'executable',
      'dependencies': [ '../uv.gyp:libuv' ],
      'sources': [
        'benchmark-async.c',
        'benchmark-async-pummel.c',
        'benchmark-fs-stat.c',
        'benchmark-getaddrinfo.c',
        'benchmark-list.h',
        'benchmark-loop-count.c',
        'benchmark-million-async.c',
        'benchmark-million-timers.c',
        'benchmark-multi-accept.c',
        'benchmark-ping-pongs.c',
        'benchmark-pound.c',
        'benchmark-pump.c',
        'benchmark-sizes.c',
        'benchmark-spawn.c',
        'benchmark-thread.c',
        'benchmark-tcp-write-batch.c',
        'benchmark-udp-pummel.c',
        'dns-server.c',
        'echo-server.c',
        'blackhole-server.c',
        'run-benchmarks.c',
        'runner.c',
        'runner.h',
        'task.h',
      ],
      'conditions': [
        [ 'OS=="win"', {
          'sources': [
            'runner-win.c',
            'runner-win.h',
            '../src/win/snprintf.c',
          ],
          'libraries': [ '-lws2_32' ]
        }, { # POSIX
          'defines': [ '_GNU_SOURCE' ],
          'sources': [
            'runner-unix.c',
            'runner-unix.h',
          ]
        }],
        [ 'OS == "zos"', {
          'cflags': [ '-qxplink' ],
          'ldflags': [ '-qxplink' ],
        }],
        ['uv_library=="shared_library"', {
          'defines': [ 'USING_UV_SHARED=1' ],
          'conditions': [
            [ 'OS == "zos"', {
              'cflags': [ '-Wc,DLL' ],
            }],
          ],
        }],
      ],
      'msvs-settings': {
        'VCLinkerTool': {
          'SubSystem': 1, # /subsystem:console
        },
      },
    },
  ],
}