]> CyberLeo.Net >> Repos - FreeBSD/releng/9.2.git/blob - tools/test/dtrace/Makefile
- Copy stable/9 to releng/9.2 as part of the 9.2-RELEASE cycle.
[FreeBSD/releng/9.2.git] / tools / test / dtrace / Makefile
1 # $FreeBSD$
2
3 TESTSRCDIR=     ${.CURDIR}/../../../cddl/contrib/opensolaris/cmd/dtrace/test
4 CFLAGS+=        -w
5 DTEST=          ${TESTSRCDIR}/cmd/scripts/dtest.pl -n
6
7 IGNORE=         \
8         ${TESTSRCDIR}/tst/common/aggs/tst.subr.d                        \
9         ${TESTSRCDIR}/tst/common/buffering/tst.cputime.ksh              \
10         ${TESTSRCDIR}/tst/common/buffering/tst.ring3.d                  \
11         ${TESTSRCDIR}/tst/common/cpc/err.D_PDESC_ZERO.lowfrequency.d    \
12         ${TESTSRCDIR}/tst/common/cpc/err.D_PDESC_ZERO.malformedoverflow.d\
13         ${TESTSRCDIR}/tst/common/cpc/err.D_PDESC_ZERO.nonexistentevent.d\
14         ${TESTSRCDIR}/tst/common/cpc/err.cpcvscpustatpart1.ksh          \
15         ${TESTSRCDIR}/tst/common/cpc/err.cpcvscpustatpart2.ksh          \
16         ${TESTSRCDIR}/tst/common/cpc/err.cputrackfailtostart.ksh        \
17         ${TESTSRCDIR}/tst/common/cpc/err.cputrackterminates.ksh         \
18         ${TESTSRCDIR}/tst/common/cpc/err.toomanyenablings.d             \
19         ${TESTSRCDIR}/tst/common/cpc/tst.allcpus.ksh                    \
20         ${TESTSRCDIR}/tst/common/cpc/tst.genericevent.d                 \
21         ${TESTSRCDIR}/tst/common/cpc/tst.platformevent.ksh              \
22         ${TESTSRCDIR}/tst/common/dtraceUtil/man.ListProbesWithFunctions \
23         ${TESTSRCDIR}/tst/common/dtraceUtil/man.ListProbesWithModules   \
24         ${TESTSRCDIR}/tst/common/dtraceUtil/man.ListProbesWithNames     \
25         ${TESTSRCDIR}/tst/common/dtraceUtil/man.ListProbesWithProviders \
26         ${TESTSRCDIR}/tst/common/dtraceUtil/man.TraceFunctions          \
27         ${TESTSRCDIR}/tst/common/dtraceUtil/man.TraceModule             \
28         ${TESTSRCDIR}/tst/common/dtraceUtil/man.TraceNames              \
29         ${TESTSRCDIR}/tst/common/dtraceUtil/man.TraceProvider           \
30         ${TESTSRCDIR}/tst/common/dtraceUtil/tst.InvalidModule3.d.ksh    \
31         ${TESTSRCDIR}/tst/common/dtraceUtil/tst.InvalidProvider3.d.ksh  \
32         ${TESTSRCDIR}/tst/common/dtraceUtil/tst.InvalidTraceFunc7.d.ksh \
33         ${TESTSRCDIR}/tst/common/dtraceUtil/tst.InvalidTraceModule6.d.ksh\
34         ${TESTSRCDIR}/tst/common/dtraceUtil/tst.InvalidTraceProvider4.d.ksh\
35         ${TESTSRCDIR}/tst/common/funcs/tst.bcopy.d                      \
36         ${TESTSRCDIR}/tst/common/funcs/tst.copyin.d                     \
37         ${TESTSRCDIR}/tst/common/funcs/tst.copyinto.d                   \
38         ${TESTSRCDIR}/tst/common/funcs/tst.ddi_pathname.d               \
39         ${TESTSRCDIR}/tst/common/funcs/tst.index.d                      \
40         ${TESTSRCDIR}/tst/common/inline/err.D_OP_INCOMPAT.badxlate.d    \
41         ${TESTSRCDIR}/tst/common/inline/tst.InlineTypedef.d             \
42         ${TESTSRCDIR}/tst/common/io/tst.fds.c                           \
43         ${TESTSRCDIR}/tst/common/java_api/tst.FunctionLookup.c          \
44         ${TESTSRCDIR}/tst/common/java_api/tst.ProbeData.c               \
45         ${TESTSRCDIR}/common/misc/tst.include.ksh                       \
46         ${TESTSRCDIR}/tst/common/misc/tst.roch.d                        \
47         ${TESTSRCDIR}/tst/common/nfs/tst.call.c                         \
48         ${TESTSRCDIR}/tst/common/nfs/tst.call.d                         \
49         ${TESTSRCDIR}/tst/common/nfs/tst.call3.c                        \
50         ${TESTSRCDIR}/tst/common/nfs/tst.call3.d                        \
51         ${TESTSRCDIR}/tst/common/offsetof/err.D_OFFSETOF_BITFIELD.bitfield.d\
52         ${TESTSRCDIR}/tst/common/pointers/err.D_OP_LVAL.AddressChange.d \
53         ${TESTSRCDIR}/tst/common/pointers/tst.GlobalVar.d               \
54         ${TESTSRCDIR}/tst/common/pointers/tst.basic1.d                  \
55         ${TESTSRCDIR}/tst/common/pointers/tst.basic2.d                  \
56         ${TESTSRCDIR}/tst/common/predicates/tst.argsnotcached.d         \
57         ${TESTSRCDIR}/tst/common/privs/tst.func_access.ksh              \
58         ${TESTSRCDIR}/tst/common/privs/tst.op_access.ksh                \
59         ${TESTSRCDIR}/tst/common/proc/tst.discard.ksh                   \
60         ${TESTSRCDIR}/tst/common/proc/tst.signal.ksh                    \
61         ${TESTSRCDIR}/tst/common/proc/tst.startexit.ksh                 \
62         ${TESTSRCDIR}/tst/common/profile-n/tst.ufuncsort.c              \
63         ${TESTSRCDIR}/tst/common/scalars/tst.misc.d                     \
64         ${TESTSRCDIR}/tst/common/scalars/tst.selfarray2.d               \
65         ${TESTSRCDIR}/tst/common/sysevent/tst.post.c                    \
66         ${TESTSRCDIR}/tst/common/sysevent/tst.post.d                    \
67         ${TESTSRCDIR}/tst/common/sysevent/tst.post_chan.c               \
68         ${TESTSRCDIR}/tst/common/sysevent/tst.post_chan.d               \
69         ${TESTSRCDIR}/tst/common/trace/tst.misc.d                       \
70         ${TESTSRCDIR}/tst/common/tracemem/err.D_TRACEMEM_ADDR.badaddr.d \
71         ${TESTSRCDIR}/tst/common/tracemem/tst.rootvp.d                  \
72         ${TESTSRCDIR}/tst/common/translators/tst.ProcModelTrans.d       \
73         ${TESTSRCDIR}/tst/common/types/err.D_XLATE_REDECL.ResultDynType.d\
74         ${TESTSRCDIR}/tst/common/types/tst.ptrops.d                     \
75         ${TESTSRCDIR}/tst/common/types/tst.struct.d                     \
76         ${TESTSRCDIR}/tst/common/types/tst.typedef.d                    \
77         ${TESTSRCDIR}/tst/common/vars/tst.ucaller.ksh                   \
78         ${TESTSRCDIR}/tst/common/vars/tst.walltimestamp.d               \
79         ${TESTSRCDIR}/tst/common/usdt/tst.argmap.c                      \
80         ${TESTSRCDIR}/tst/common/usdt/tst.args.c                        \
81         ${TESTSRCDIR}/tst/common/usdt/tst.forker.c                      \
82         ${TESTSRCDIR}/tst/common/ip/tst.ipv4localtcp.ksh                \
83         ${TESTSRCDIR}/tst/common/ip/tst.ipv4localudp.ksh                \
84         ${TESTSRCDIR}/tst/common/ip/tst.ipv4remotetcp.ksh               \
85         ${TESTSRCDIR}/tst/common/ip/tst.ipv4remoteudp.ksh               \
86         ${TESTSRCDIR}/tst/common/ip/tst.localtcpstate.ksh               \
87         ${TESTSRCDIR}/tst/common/ip/tst.remotetcpstate.ksh              \
88         ${TESTSRCDIR}/tst/common/scripting/tst.projid.ksh               \
89         ${TESTSRCDIR}/tst/common/scripting/tst.taskid.ksh
90
91
92
93 NOTWORK+= \
94         ${TESTSRCDIR}/tst/common/io/tst.fds.d                           \
95         ${TESTSRCDIR}/tst/common/java_api/tst.Abort.ksh                 \
96         ${TESTSRCDIR}/tst/common/java_api/tst.Bean.ksh                  \
97         ${TESTSRCDIR}/tst/common/java_api/tst.Close.ksh                 \
98         ${TESTSRCDIR}/tst/common/java_api/tst.Drop.ksh                  \
99         ${TESTSRCDIR}/tst/common/java_api/tst.Enable.ksh                \
100         ${TESTSRCDIR}/tst/common/java_api/tst.FunctionLookup.ksh        \
101         ${TESTSRCDIR}/tst/common/java_api/tst.GetAggregate.ksh          \
102         ${TESTSRCDIR}/tst/common/java_api/tst.MaxConsumers.ksh          \
103         ${TESTSRCDIR}/tst/common/java_api/tst.MultiAggPrinta.ksh        \
104         ${TESTSRCDIR}/tst/common/java_api/tst.ProbeData.ksh             \
105         ${TESTSRCDIR}/tst/common/java_api/tst.ProbeDescription.ksh      \
106         ${TESTSRCDIR}/tst/common/java_api/tst.StateMachine.ksh          \
107         ${TESTSRCDIR}/tst/common/java_api/tst.StopLock.ksh              \
108         ${TESTSRCDIR}/tst/common/java_api/tst.printa.d                  \
109         ${TESTSRCDIR}/tst/common/lexer/err.D_CHR_NL.char.d              \
110         ${TESTSRCDIR}/tst/common/lexer/err.D_STR_NL.string.d            \
111         ${TESTSRCDIR}/tst/common/mdb/tst.dtracedcmd.ksh                 \
112         ${TESTSRCDIR}/tst/common/mib/tst.icmp.ksh                       \
113         ${TESTSRCDIR}/tst/common/mib/tst.tcp.ksh                        \
114         ${TESTSRCDIR}/tst/common/mib/tst.udp.ksh                        \
115         ${TESTSRCDIR}/tst/common/profile-n/tst.func.ksh                 \
116         ${TESTSRCDIR}/tst/common/profile-n/tst.mod.ksh                  \
117         ${TESTSRCDIR}/tst/common/profile-n/tst.sym.ksh                  \
118         ${TESTSRCDIR}/tst/common/profile-n/tst.ufunc.ksh                \
119         ${TESTSRCDIR}/tst/common/profile-n/tst.ufuncsort.ksh            \
120         ${TESTSRCDIR}/tst/common/profile-n/tst.umod.ksh                 \
121         ${TESTSRCDIR}/tst/common/profile-n/tst.usym.ksh                 \
122         ${TESTSRCDIR}/tst/common/safety/tst.basename.d                  \
123         ${TESTSRCDIR}/tst/common/safety/tst.caller.d                    \
124         ${TESTSRCDIR}/tst/common/safety/tst.cleanpath.d                 \
125         ${TESTSRCDIR}/tst/common/safety/tst.copyin.d                    \
126         ${TESTSRCDIR}/tst/common/safety/tst.copyin2.d                   \
127         ${TESTSRCDIR}/tst/common/safety/tst.ddi_pathname.d              \
128         ${TESTSRCDIR}/tst/common/safety/tst.dirname.d                   \
129         ${TESTSRCDIR}/tst/common/safety/tst.errno.d                     \
130         ${TESTSRCDIR}/tst/common/safety/tst.execname.d                  \
131         ${TESTSRCDIR}/tst/common/safety/tst.gid.d                       \
132         ${TESTSRCDIR}/tst/common/safety/tst.hton.d                      \
133         ${TESTSRCDIR}/tst/common/safety/tst.index.d                     \
134         ${TESTSRCDIR}/tst/common/safety/tst.msgdsize.d                  \
135         ${TESTSRCDIR}/tst/common/safety/tst.msgsize.d                   \
136         ${TESTSRCDIR}/tst/common/safety/tst.null.d                      \
137         ${TESTSRCDIR}/tst/common/safety/tst.pid.d                       \
138         ${TESTSRCDIR}/tst/common/safety/tst.ppid.d                      \
139         ${TESTSRCDIR}/tst/common/safety/tst.progenyof.d                 \
140         ${TESTSRCDIR}/tst/common/safety/tst.random.d                    \
141         ${TESTSRCDIR}/tst/common/safety/tst.rw.d                        \
142         ${TESTSRCDIR}/tst/common/safety/tst.shortstr.d                  \
143         ${TESTSRCDIR}/tst/common/safety/tst.stack.d                     \
144         ${TESTSRCDIR}/tst/common/safety/tst.stackdepth.d                \
145         ${TESTSRCDIR}/tst/common/safety/tst.stddev.d                    \
146         ${TESTSRCDIR}/tst/common/safety/tst.strchr.d                    \
147         ${TESTSRCDIR}/tst/common/safety/tst.strjoin.d                   \
148         ${TESTSRCDIR}/tst/common/safety/tst.strstr.d                    \
149         ${TESTSRCDIR}/tst/common/safety/tst.strtok.d                    \
150         ${TESTSRCDIR}/tst/common/safety/tst.substr.d                    \
151         ${TESTSRCDIR}/tst/common/safety/tst.ucaller.d                   \
152         ${TESTSRCDIR}/tst/common/safety/tst.uid.d                       \
153         ${TESTSRCDIR}/tst/common/safety/tst.unalign.d                   \
154         ${TESTSRCDIR}/tst/common/safety/tst.ustack.d                    \
155         ${TESTSRCDIR}/tst/common/safety/tst.ustackdepth.d               \
156         ${TESTSRCDIR}/tst/common/safety/tst.vahole.d                    \
157         ${TESTSRCDIR}/tst/common/safety/tst.violentdeath.ksh            \
158         ${TESTSRCDIR}/tst/common/safety/tst.zonename.d                  \
159         ${TESTSRCDIR}/tst/common/sched/tst.enqueue.d                    \
160         ${TESTSRCDIR}/tst/common/sched/tst.oncpu.d                      \
161         ${TESTSRCDIR}/tst/common/sched/tst.stackdepth.d                 \
162         ${TESTSRCDIR}/tst/common/sdt/tst.sdtargs.d                      \
163         ${TESTSRCDIR}/tst/common/usdt/argmap.d                          \
164         ${TESTSRCDIR}/tst/common/usdt/args.d                            \
165         ${TESTSRCDIR}/tst/common/usdt/forker.d                          \
166         ${TESTSRCDIR}/tst/common/usdt/tst.andpid.ksh                    \
167         ${TESTSRCDIR}/tst/common/usdt/tst.argmap.d                      \
168         ${TESTSRCDIR}/tst/common/usdt/tst.args.d                        \
169         ${TESTSRCDIR}/tst/common/usdt/tst.badguess.ksh                  \
170         ${TESTSRCDIR}/tst/common/usdt/tst.dlclose1.ksh                  \
171         ${TESTSRCDIR}/tst/common/usdt/tst.dlclose2.ksh                  \
172         ${TESTSRCDIR}/tst/common/usdt/tst.dlclose3.ksh                  \
173         ${TESTSRCDIR}/tst/common/usdt/tst.eliminate.ksh                 \
174         ${TESTSRCDIR}/tst/common/usdt/tst.enabled.ksh                   \
175         ${TESTSRCDIR}/tst/common/usdt/tst.entryreturn.ksh               \
176         ${TESTSRCDIR}/tst/common/usdt/tst.fork.ksh                      \
177         ${TESTSRCDIR}/tst/common/usdt/tst.forker.ksh                    \
178         ${TESTSRCDIR}/tst/common/usdt/tst.guess32.ksh                   \
179         ${TESTSRCDIR}/tst/common/usdt/tst.guess64.ksh                   \
180         ${TESTSRCDIR}/tst/common/usdt/tst.header.ksh                    \
181         ${TESTSRCDIR}/tst/common/usdt/tst.include.ksh                   \
182         ${TESTSRCDIR}/tst/common/usdt/tst.linkpriv.ksh                  \
183         ${TESTSRCDIR}/tst/common/usdt/tst.linkunpriv.ksh                \
184         ${TESTSRCDIR}/tst/common/usdt/tst.multiple.ksh                  \
185         ${TESTSRCDIR}/tst/common/usdt/tst.nodtrace.ksh                  \
186         ${TESTSRCDIR}/tst/common/usdt/tst.onlyenabled.ksh               \
187         ${TESTSRCDIR}/tst/common/usdt/tst.reeval.ksh                    \
188         ${TESTSRCDIR}/tst/common/usdt/tst.static.ksh                    \
189         ${TESTSRCDIR}/tst/common/usdt/tst.static2.ksh                   \
190         ${TESTSRCDIR}/tst/common/usdt/tst.user.ksh                      \
191         ${TESTSRCDIR}/tst/common/misc/tst.schrock.ksh 
192
193 # --------------------------------------------------------------------------------
194 # Tests that just don't complete (even to fail) at the moment...
195
196 NOTWORK+= \
197         ${TESTSRCDIR}/tst/common/dtraceUtil/tst.ZeroModuleProbes.d.ksh  \
198         ${TESTSRCDIR}/tst/common/printa/tst.many.d                      \
199         ${TESTSRCDIR}/tst/common/scalars/err.D_OP_INCOMPAT.dupgtype.d   \
200         ${TESTSRCDIR}/tst/common/scalars/err.D_OP_INCOMPAT.dupltype.d   \
201         ${TESTSRCDIR}/tst/common/scalars/err.D_OP_INCOMPAT.dupttype.d   \
202         ${TESTSRCDIR}/tst/common/vars/tst.gid.d                         \
203         ${TESTSRCDIR}/tst/common/vars/tst.uid.d                         \
204
205 # --------------------------------------------------------------------------------
206 # Tests that currently hang the system:
207
208 NOTWORK+= \
209         ${TESTSRCDIR}/tst/common/fbtprovider/tst.basic.d        \
210         ${TESTSRCDIR}/tst/common/fbtprovider/tst.return.d       \
211         ${TESTSRCDIR}/tst/common/grammar/tst.stmts.d            \
212         ${TESTSRCDIR}/tst/common/misc/tst.enablerace.ksh        \
213         ${TESTSRCDIR}/tst/common/predicates/tst.predcache.ksh   \
214         ${TESTSRCDIR}/tst/common/proc/tst.exitkilled.ksh        \
215
216 .if ${MACHINE_ARCH} == "i386"
217
218 NOTWORK+= ${TESTSRCDIR}/tst/common/dtraceUtil/tst.DataModel64.d.ksh
219
220 NOTWORK+= ${TESTSRCDIR}/tst/common/dtraceUtil/tst.DataModel64.d.ksh
221
222 # --------------------------------------------------------------------------------
223 # This test causes i386 to go kaboom in a big way. There is a problem in the
224 # fbt exception code which needs to be fixed.
225
226 NOTWORK+= \
227         ${TESTSRCDIR}/tst/common/fbtprovider/tst.tailcall.d
228
229 # Some tests that don't complete on i386.... :-/
230
231 NOTWORK+= ${TESTSRCDIR}/tst/common/funcs/tst.chill.ksh
232 NOTWORK+= ${TESTSRCDIR}/tst/common/proc/tst.create.ksh
233 NOTWORK+= ${TESTSRCDIR}/tst/common/proc/tst.exec.ksh
234 NOTWORK+= ${TESTSRCDIR}/tst/common/proc/tst.execfail.ENOENT.ksh
235 NOTWORK+= ${TESTSRCDIR}/tst/common/proc/tst.execfail.ksh
236 NOTWORK+= ${TESTSRCDIR}/tst/common/proc/tst.exitcore.ksh
237 NOTWORK+= ${TESTSRCDIR}/tst/common/proc/tst.exitexit.ksh
238 NOTWORK+= ${TESTSRCDIR}/tst/common/proc/tst.exitkilled.ksh
239 NOTWORK+= ${TESTSRCDIR}/tst/common/proc/tst.signal.ksh
240 NOTWORK+= ${TESTSRCDIR}/tst/common/proc/tst.sigwait.c
241 NOTWORK+= ${TESTSRCDIR}/tst/common/proc/tst.sigwait.d
242 NOTWORK+= ${TESTSRCDIR}/tst/common/proc/tst.startexit.ksh
243 NOTWORK+= ${TESTSRCDIR}/tst/common/struct/tst.StructDataTypes.d
244 NOTWORK+= ${TESTSRCDIR}/tst/common/union/tst.UnionDataTypes.d
245
246 .endif
247
248 # --------------------------------------------------------------------------------
249 # Interrupt priority isn't relevant on FreeBSD.
250
251 NOTWORK+= ${TESTSRCDIR}/tst/common/builtinvar/tst.ipl.d \
252         ${TESTSRCDIR}/tst/common/builtinvar/tst.ipl1.d
253
254 # --------------------------------------------------------------------------------
255 # These tests relies on the Solaris ping behaviour of exiting after a number of
256 # pings. On FreeBSD ping doesn't do that.
257
258 NOTWORK+= ${TESTSRCDIR}/tst/common/funcs/tst.system.d           \
259         ${TESTSRCDIR}/tst/common/ip/tst.ipv6remoteicmp.ksh      \
260         ${TESTSRCDIR}/tst/common/ip/tst.ipv6localicmp.ksh       \
261         ${TESTSRCDIR}/tst/common/ip/tst.ipv4localicmp.ksh       \
262         ${TESTSRCDIR}/tst/common/ip/tst.ipv4remoteicmp.ksh 
263
264 # --------------------------------------------------------------------------------
265 # This test checks for a leading tab on a line before #define. That is illegal
266 # on Solaris, but the gcc pre-processor on FreeBSD is happy with code like that.
267
268 NOTWORK+= ${TESTSRCDIR}/tst/common/preprocessor/err.D_PRAGCTL_INVAL.tabdefine.d
269
270 # --------------------------------------------------------------------------------
271 # This test is coded to use Solaris syscall names. FreeBSD has none with 'lwp"
272 # in them, so the test fails because of that.
273
274 NOTWORK+= ${TESTSRCDIR}/tst/common/probes/tst.probestar.d
275
276 NOTYET= ${IGNORE} ${NOTWORK}
277
278 # --------------------------------------------------------------------------------
279 # Only prepare the test lists if we need to:
280
281 .if !make(obj) && !make(clean) && !make(cleandir) && !make(listerrors)
282
283 # --------------------------------------------------------------------------------
284 # Get a list of tests, named according to the directory they are in:
285
286 _COMMONDIRS!=   cd ${TESTSRCDIR}/tst/common; find . -depth 1 -type d
287 COMMONDIRS=     ${_COMMONDIRS:S/.\///}
288
289 listtests       :
290         @echo ${COMMONDIRS}
291
292 # --------------------------------------------------------------------------------
293 # Create a test target for each directory:
294
295 ALL_TESTFILES=
296
297 # Process each common test directory:
298 .for _d in ${COMMONDIRS}
299
300 # Get a list of test files in the test directory:
301 ${_d}_ERR!=     find ${TESTSRCDIR}/tst/common/${_d} -name "err.*.d"
302 ${_d}_TSTD!=    find ${TESTSRCDIR}/tst/common/${_d} -name "tst.*.d"
303 ${_d}_TSTC!=    find ${TESTSRCDIR}/tst/common/${_d} -name "tst.*.c"
304 ${_d}_SHERR!=   find ${TESTSRCDIR}/tst/common/${_d} -name "err.*.ksh"
305 ${_d}_SHTST!=   find ${TESTSRCDIR}/tst/common/${_d} -name "tst.*.ksh"
306 ${_d}_TF=       ${${_d}_ERR} ${${_d}_TSTD} ${${_d}_SHERR} ${${_d}_SHTST}
307
308 # Go through the list of test files and prepare another list that contains
309 # none of the test files listed in the NOTYET list:
310 .for _f in ${${_d}_TF}
311 .if (${NOTYET:M${_f}} == "")
312 ${_d}_TFS+= ${_f}
313 .endif
314 .endfor
315
316 # Add the list of tests to the overall test list:
317 ALL_TESTFILES+= ${${_d}_TFS}
318
319 .for _f in ${${_d}_TSTC}
320 .if (${NOTYET:M${_f}} == "")
321 ${_d}_TFCS+= ${_f}
322 .endif
323 .endfor
324
325 ALL_TESTCFILES+= ${${_d}_TFCS}
326
327 ${_d}   : ${${_d}_TFCS:T:S/c$/exe/}
328         @${DTEST} ${${_d}_TFS}
329 .endfor
330
331 # --------------------------------------------------------------------------------
332
333
334 PRGS=   ${ALL_TESTCFILES:T:S/c$/exe/}
335
336 listprgs        :
337         @echo ${PRGS}
338
339 # --------------------------------------------------------------------------------
340
341
342 .for _f in ${ALL_TESTCFILES}
343 ${_f:T:S/c$/exe/} : ${_f}
344         gcc -o ${.TARGET} ${_f} -lrt
345 .endfor
346
347 listcfiles      :
348         @echo ${ALL_TESTCFILES}
349
350 # --------------------------------------------------------------------------------
351 # A target to build all tests:
352
353 all     : ${PRGS}
354         @sync; sync; sync; sync; sync
355         @${DTEST} ${ALL_TESTFILES}
356
357 # --------------------------------------------------------------------------------
358 # A target to build the tests flagged as not working yet:
359
360 ignore  :
361         @${DTEST} ${IGNORE}
362
363 .endif
364
365 listerrors      :
366         @find ${.OBJDIR} -name "*.err" -exec cat {} \; -print
367
368
369 # --------------------------------------------------------------------------------
370 # Test failures are written to failure.N directories in the object tree.
371 # Get a list of directories in the object tree for 'make clean'.
372
373 .if ${.OBJDIR} != ${.CURDIR} && !empty(${.OBJDIR})
374 CLEANDIRS!=     cd ${.OBJDIR} && ls -d *
375 .endif
376
377 # --------------------------------------------------------------------------------
378 # Insist on using an object directory. Things get messy otherwsie.
379
380 .if ${.OBJDIR} == ${.CURDIR} && !make(obj) && !make(clean) && !make(cleandir)
381 .error ERROR: You must run 'make obj' first!
382 .endif
383
384 # --------------------------------------------------------------------------------
385 # Load the DTrace module set if necessary.
386
387 .BEGIN  :
388         @if ! kldstat -q -m dtrace_test; then kldload dtrace_test; fi
389
390 .include <bsd.obj.mk>
391