Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100755 233 lines (224 sloc) 5.585 kB
345eb63 @bnoordhuis unix: add checksparse.sh script
bnoordhuis authored
1 #!/bin/sh
2
3 # Copyright (c) 2013, Ben Noordhuis <info@bnoordhuis.nl>
4 #
5 # Permission to use, copy, modify, and/or distribute this software for any
6 # purpose with or without fee is hereby granted, provided that the above
7 # copyright notice and this permission notice appear in all copies.
8 #
9 # THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10 # WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11 # MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
12 # ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13 # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14 # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
15 # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
16
17 SPARSE=${SPARSE:-sparse}
18
19 SPARSE_FLAGS=${SPARSE_FLAGS:-"
20 -D__POSIX__
21 -Wsparse-all
22 -Wno-do-while
23 -Wno-transparent-union
24 -Iinclude
25 -Isrc
26 "}
27
28 SOURCES="
ddd7e04 @bnoordhuis build: switch to autotools
bnoordhuis authored
29 include/tree.h
30 include/uv-unix.h
345eb63 @bnoordhuis unix: add checksparse.sh script
bnoordhuis authored
31 include/uv.h
32 src/fs-poll.c
33 src/inet.c
5b1422b @bnoordhuis unix: s/ngx-queue.h/queue.h/ in checksparse.sh
bnoordhuis authored
34 src/queue.h
345eb63 @bnoordhuis unix: add checksparse.sh script
bnoordhuis authored
35 src/unix/async.c
36 src/unix/core.c
37 src/unix/dl.c
38 src/unix/fs.c
39 src/unix/getaddrinfo.c
40 src/unix/internal.h
41 src/unix/loop-watcher.c
42 src/unix/loop.c
43 src/unix/pipe.c
44 src/unix/poll.c
45 src/unix/process.c
46 src/unix/signal.c
47 src/unix/stream.c
48 src/unix/tcp.c
49 src/unix/thread.c
50 src/unix/threadpool.c
51 src/unix/timer.c
52 src/unix/tty.c
53 src/unix/udp.c
54 src/uv-common.c
55 src/uv-common.h
56 "
57
58 TESTS="
59 test/benchmark-async-pummel.c
60 test/benchmark-async.c
61 test/benchmark-fs-stat.c
62 test/benchmark-getaddrinfo.c
63 test/benchmark-loop-count.c
64 test/benchmark-million-async.c
65 test/benchmark-million-timers.c
66 test/benchmark-multi-accept.c
67 test/benchmark-ping-pongs.c
68 test/benchmark-pound.c
69 test/benchmark-pump.c
70 test/benchmark-sizes.c
71 test/benchmark-spawn.c
72 test/benchmark-tcp-write-batch.c
73 test/benchmark-thread.c
74 test/benchmark-udp-pummel.c
75 test/blackhole-server.c
76 test/dns-server.c
77 test/echo-server.c
78 test/run-benchmarks.c
79 test/run-tests.c
80 test/runner-unix.c
81 test/runner-unix.h
82 test/runner.c
83 test/runner.h
84 test/task.h
85 test/test-active.c
86 test/test-async.c
87 test/test-barrier.c
88 test/test-callback-order.c
89 test/test-callback-stack.c
90 test/test-condvar.c
91 test/test-connection-fail.c
92 test/test-cwd-and-chdir.c
93 test/test-delayed-accept.c
94 test/test-dlerror.c
95 test/test-embed.c
96 test/test-error.c
97 test/test-fail-always.c
98 test/test-fs-event.c
99 test/test-fs-poll.c
100 test/test-fs.c
101 test/test-get-currentexe.c
102 test/test-get-loadavg.c
103 test/test-get-memory.c
104 test/test-getaddrinfo.c
105 test/test-getsockname.c
106 test/test-hrtime.c
107 test/test-idle.c
fd45f87 @bajtos linux,darwin,win: link-local IPv6 addresses
bajtos authored
108 test/test-ip6-addr.c
345eb63 @bnoordhuis unix: add checksparse.sh script
bnoordhuis authored
109 test/test-ipc-send-recv.c
110 test/test-ipc.c
111 test/test-loop-handles.c
112 test/test-multiple-listen.c
113 test/test-mutexes.c
114 test/test-pass-always.c
115 test/test-ping-pong.c
116 test/test-pipe-bind-error.c
117 test/test-pipe-connect-error.c
b05a3ee @indutny pipe: allow queueing pending handles
indutny authored
118 test/test-pipe-sendmsg.c
c66340d @piscisaureus test: add pipe-server-close test
piscisaureus authored
119 test/test-pipe-server-close.c
345eb63 @bnoordhuis unix: add checksparse.sh script
bnoordhuis authored
120 test/test-platform-output.c
121 test/test-poll-close.c
122 test/test-poll.c
123 test/test-process-title.c
124 test/test-ref.c
125 test/test-run-nowait.c
126 test/test-run-once.c
127 test/test-semaphore.c
128 test/test-shutdown-close.c
129 test/test-shutdown-eof.c
130 test/test-signal-multiple-loops.c
131 test/test-signal.c
132 test/test-spawn.c
133 test/test-stdio-over-pipes.c
134 test/test-tcp-bind-error.c
135 test/test-tcp-bind6-error.c
136 test/test-tcp-close-while-connecting.c
bbccafb @indutny unix: fix reopened fd bug
indutny authored
137 test/test-tcp-close-accept.c
345eb63 @bnoordhuis unix: add checksparse.sh script
bnoordhuis authored
138 test/test-tcp-close.c
139 test/test-tcp-connect-error-after-write.c
140 test/test-tcp-connect-error.c
141 test/test-tcp-connect-timeout.c
142 test/test-tcp-connect6-error.c
143 test/test-tcp-flags.c
144 test/test-tcp-open.c
145 test/test-tcp-read-stop.c
146 test/test-tcp-shutdown-after-write.c
147 test/test-tcp-unexpected-read.c
148 test/test-tcp-write-error.c
149 test/test-tcp-write-to-half-open-connection.c
150 test/test-tcp-writealot.c
151 test/test-thread.c
152 test/test-threadpool-cancel.c
153 test/test-threadpool.c
154 test/test-timer-again.c
155 test/test-timer.c
156 test/test-tty.c
157 test/test-udp-dgram-too-big.c
158 test/test-udp-ipv6.c
159 test/test-udp-multicast-join.c
160 test/test-udp-multicast-ttl.c
161 test/test-udp-open.c
162 test/test-udp-options.c
163 test/test-udp-send-and-recv.c
164 test/test-walk-handles.c
f996018 @indutny test: add regression test for 29fdb3471
indutny authored
165 test/test-watcher-cross-stop.c
345eb63 @bnoordhuis unix: add checksparse.sh script
bnoordhuis authored
166 "
167
168 case `uname -s` in
169 AIX)
170 SPARSE_FLAGS="$SPARSE_FLAGS -D_AIX=1"
171 SOURCES="$SOURCES
172 src/unix/aix.c"
173 ;;
174 Darwin)
175 SPARSE_FLAGS="$SPARSE_FLAGS -D__APPLE__=1"
176 SOURCES="$SOURCES
ddd7e04 @bnoordhuis build: switch to autotools
bnoordhuis authored
177 include/uv-bsd.h
345eb63 @bnoordhuis unix: add checksparse.sh script
bnoordhuis authored
178 src/unix/darwin.c
179 src/unix/kqueue.c
180 src/unix/fsevents.c"
181 ;;
182 DragonFly)
183 SPARSE_FLAGS="$SPARSE_FLAGS -D__DragonFly__=1"
184 SOURCES="$SOURCES
ddd7e04 @bnoordhuis build: switch to autotools
bnoordhuis authored
185 include/uv-bsd.h
345eb63 @bnoordhuis unix: add checksparse.sh script
bnoordhuis authored
186 src/unix/kqueue.c
187 src/unix/freebsd.c"
188 ;;
189 FreeBSD)
190 SPARSE_FLAGS="$SPARSE_FLAGS -D__FreeBSD__=1"
191 SOURCES="$SOURCES
ddd7e04 @bnoordhuis build: switch to autotools
bnoordhuis authored
192 include/uv-bsd.h
345eb63 @bnoordhuis unix: add checksparse.sh script
bnoordhuis authored
193 src/unix/kqueue.c
194 src/unix/freebsd.c"
195 ;;
196 Linux)
197 SPARSE_FLAGS="$SPARSE_FLAGS -D__linux__=1"
198 SOURCES="$SOURCES
ddd7e04 @bnoordhuis build: switch to autotools
bnoordhuis authored
199 include/uv-linux.h
b607a7f @bnoordhuis linux: move files out of src/unix/linux
bnoordhuis authored
200 src/unix/linux-inotify.c
201 src/unix/linux-core.c
202 src/unix/linux-syscalls.c
203 src/unix/linux-syscalls.h"
345eb63 @bnoordhuis unix: add checksparse.sh script
bnoordhuis authored
204 ;;
205 NetBSD)
206 SPARSE_FLAGS="$SPARSE_FLAGS -D__NetBSD__=1"
207 SOURCES="$SOURCES
ddd7e04 @bnoordhuis build: switch to autotools
bnoordhuis authored
208 include/uv-bsd.h
345eb63 @bnoordhuis unix: add checksparse.sh script
bnoordhuis authored
209 src/unix/kqueue.c
210 src/unix/netbsd.c"
211 ;;
212 OpenBSD)
213 SPARSE_FLAGS="$SPARSE_FLAGS -D__OpenBSD__=1"
214 SOURCES="$SOURCES
ddd7e04 @bnoordhuis build: switch to autotools
bnoordhuis authored
215 include/uv-bsd.h
345eb63 @bnoordhuis unix: add checksparse.sh script
bnoordhuis authored
216 src/unix/kqueue.c
217 src/unix/openbsd.c"
218 ;;
219 SunOS)
220 SPARSE_FLAGS="$SPARSE_FLAGS -D__sun=1"
221 SOURCES="$SOURCES
ddd7e04 @bnoordhuis build: switch to autotools
bnoordhuis authored
222 include/uv-sunos.h
345eb63 @bnoordhuis unix: add checksparse.sh script
bnoordhuis authored
223 src/unix/sunos.c"
224 ;;
225 esac
226
5096f1e @bsnote linux: add support for MIPS
bsnote authored
227 for ARCH in __i386__ __x86_64__ __arm__ __mips__; do
345eb63 @bnoordhuis unix: add checksparse.sh script
bnoordhuis authored
228 $SPARSE $SPARSE_FLAGS -D$ARCH=1 $SOURCES
229 done
230
231 # Tests are architecture independent.
232 $SPARSE $SPARSE_FLAGS -Itest $TESTS
Something went wrong with that request. Please try again.