]> CyberLeo.Net >> Repos - FreeBSD/releng/10.0.git/blob - tools/test/dtrace/Makefile
- Copy stable/10 (r259064) to releng/10.0 as part of the
[FreeBSD/releng/10.0.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/usdt/argmap.d                          \
163         ${TESTSRCDIR}/tst/common/usdt/args.d                            \
164         ${TESTSRCDIR}/tst/common/usdt/forker.d                          \
165         ${TESTSRCDIR}/tst/common/usdt/tst.andpid.ksh                    \
166         ${TESTSRCDIR}/tst/common/usdt/tst.argmap.d                      \
167         ${TESTSRCDIR}/tst/common/usdt/tst.args.d                        \
168         ${TESTSRCDIR}/tst/common/usdt/tst.badguess.ksh                  \
169         ${TESTSRCDIR}/tst/common/usdt/tst.dlclose1.ksh                  \
170         ${TESTSRCDIR}/tst/common/usdt/tst.dlclose2.ksh                  \
171         ${TESTSRCDIR}/tst/common/usdt/tst.dlclose3.ksh                  \
172         ${TESTSRCDIR}/tst/common/usdt/tst.eliminate.ksh                 \
173         ${TESTSRCDIR}/tst/common/usdt/tst.enabled.ksh                   \
174         ${TESTSRCDIR}/tst/common/usdt/tst.entryreturn.ksh               \
175         ${TESTSRCDIR}/tst/common/usdt/tst.fork.ksh                      \
176         ${TESTSRCDIR}/tst/common/usdt/tst.forker.ksh                    \
177         ${TESTSRCDIR}/tst/common/usdt/tst.guess32.ksh                   \
178         ${TESTSRCDIR}/tst/common/usdt/tst.guess64.ksh                   \
179         ${TESTSRCDIR}/tst/common/usdt/tst.header.ksh                    \
180         ${TESTSRCDIR}/tst/common/usdt/tst.include.ksh                   \
181         ${TESTSRCDIR}/tst/common/usdt/tst.linkpriv.ksh                  \
182         ${TESTSRCDIR}/tst/common/usdt/tst.linkunpriv.ksh                \
183         ${TESTSRCDIR}/tst/common/usdt/tst.multiple.ksh                  \
184         ${TESTSRCDIR}/tst/common/usdt/tst.nodtrace.ksh                  \
185         ${TESTSRCDIR}/tst/common/usdt/tst.onlyenabled.ksh               \
186         ${TESTSRCDIR}/tst/common/usdt/tst.reeval.ksh                    \
187         ${TESTSRCDIR}/tst/common/usdt/tst.static.ksh                    \
188         ${TESTSRCDIR}/tst/common/usdt/tst.static2.ksh                   \
189         ${TESTSRCDIR}/tst/common/usdt/tst.user.ksh                      \
190         ${TESTSRCDIR}/tst/common/misc/tst.schrock.ksh 
191
192 # --------------------------------------------------------------------------------
193 # Tests that just don't complete (even to fail) at the moment...
194
195 NOTWORK+= \
196         ${TESTSRCDIR}/tst/common/dtraceUtil/tst.ZeroModuleProbes.d.ksh  \
197         ${TESTSRCDIR}/tst/common/printa/tst.many.d                      \
198         ${TESTSRCDIR}/tst/common/scalars/err.D_OP_INCOMPAT.dupgtype.d   \
199         ${TESTSRCDIR}/tst/common/scalars/err.D_OP_INCOMPAT.dupltype.d   \
200         ${TESTSRCDIR}/tst/common/scalars/err.D_OP_INCOMPAT.dupttype.d   \
201         ${TESTSRCDIR}/tst/common/vars/tst.gid.d                         \
202         ${TESTSRCDIR}/tst/common/vars/tst.uid.d                         \
203
204 # --------------------------------------------------------------------------------
205 # Tests that currently hang the system:
206
207 NOTWORK+= \
208         ${TESTSRCDIR}/tst/common/fbtprovider/tst.basic.d        \
209         ${TESTSRCDIR}/tst/common/fbtprovider/tst.return.d       \
210         ${TESTSRCDIR}/tst/common/grammar/tst.stmts.d            \
211         ${TESTSRCDIR}/tst/common/misc/tst.enablerace.ksh        \
212         ${TESTSRCDIR}/tst/common/predicates/tst.predcache.ksh   \
213         ${TESTSRCDIR}/tst/common/proc/tst.exitkilled.ksh        \
214
215 .if ${MACHINE_ARCH} == "i386"
216
217 NOTWORK+= ${TESTSRCDIR}/tst/common/dtraceUtil/tst.DataModel64.d.ksh
218
219 NOTWORK+= ${TESTSRCDIR}/tst/common/dtraceUtil/tst.DataModel64.d.ksh
220
221 # --------------------------------------------------------------------------------
222 # This test causes i386 to go kaboom in a big way. There is a problem in the
223 # fbt exception code which needs to be fixed.
224
225 NOTWORK+= \
226         ${TESTSRCDIR}/tst/common/fbtprovider/tst.tailcall.d
227
228 # Some tests that don't complete on i386.... :-/
229
230 NOTWORK+= ${TESTSRCDIR}/tst/common/funcs/tst.chill.ksh
231 NOTWORK+= ${TESTSRCDIR}/tst/common/proc/tst.create.ksh
232 NOTWORK+= ${TESTSRCDIR}/tst/common/proc/tst.exec.ksh
233 NOTWORK+= ${TESTSRCDIR}/tst/common/proc/tst.execfail.ENOENT.ksh
234 NOTWORK+= ${TESTSRCDIR}/tst/common/proc/tst.execfail.ksh
235 NOTWORK+= ${TESTSRCDIR}/tst/common/proc/tst.exitcore.ksh
236 NOTWORK+= ${TESTSRCDIR}/tst/common/proc/tst.exitexit.ksh
237 NOTWORK+= ${TESTSRCDIR}/tst/common/proc/tst.exitkilled.ksh
238 NOTWORK+= ${TESTSRCDIR}/tst/common/proc/tst.signal.ksh
239 NOTWORK+= ${TESTSRCDIR}/tst/common/proc/tst.sigwait.c
240 NOTWORK+= ${TESTSRCDIR}/tst/common/proc/tst.sigwait.d
241 NOTWORK+= ${TESTSRCDIR}/tst/common/proc/tst.startexit.ksh
242 NOTWORK+= ${TESTSRCDIR}/tst/common/struct/tst.StructDataTypes.d
243 NOTWORK+= ${TESTSRCDIR}/tst/common/union/tst.UnionDataTypes.d
244
245 .endif
246
247 # --------------------------------------------------------------------------------
248 # Interrupt priority isn't relevant on FreeBSD.
249
250 NOTWORK+= ${TESTSRCDIR}/tst/common/builtinvar/tst.ipl.d \
251         ${TESTSRCDIR}/tst/common/builtinvar/tst.ipl1.d
252
253 # --------------------------------------------------------------------------------
254 # These tests relies on the Solaris ping behaviour of exiting after a number of
255 # pings. On FreeBSD ping doesn't do that.
256
257 NOTWORK+= ${TESTSRCDIR}/tst/common/funcs/tst.system.d           \
258         ${TESTSRCDIR}/tst/common/ip/tst.ipv6remoteicmp.ksh      \
259         ${TESTSRCDIR}/tst/common/ip/tst.ipv6localicmp.ksh       \
260         ${TESTSRCDIR}/tst/common/ip/tst.ipv4localicmp.ksh       \
261         ${TESTSRCDIR}/tst/common/ip/tst.ipv4remoteicmp.ksh 
262
263 # --------------------------------------------------------------------------------
264 # This test checks for a leading tab on a line before #define. That is illegal
265 # on Solaris, but the gcc pre-processor on FreeBSD is happy with code like that.
266
267 NOTWORK+= ${TESTSRCDIR}/tst/common/preprocessor/err.D_PRAGCTL_INVAL.tabdefine.d
268
269 # --------------------------------------------------------------------------------
270 # This test is coded to use Solaris syscall names. FreeBSD has none with 'lwp"
271 # in them, so the test fails because of that.
272
273 NOTWORK+= ${TESTSRCDIR}/tst/common/probes/tst.probestar.d
274
275 NOTYET= ${IGNORE} ${NOTWORK}
276
277 # --------------------------------------------------------------------------------
278 # Only prepare the test lists if we need to:
279
280 .if !make(obj) && !make(clean) && !make(cleandir) && !make(listerrors)
281
282 # --------------------------------------------------------------------------------
283 # Get a list of tests, named according to the directory they are in:
284
285 _COMMONDIRS!=   cd ${TESTSRCDIR}/tst/common; find . -depth 1 -type d
286 COMMONDIRS=     ${_COMMONDIRS:S/.\///}
287
288 listtests       :
289         @echo ${COMMONDIRS}
290
291 # --------------------------------------------------------------------------------
292 # Create a test target for each directory:
293
294 ALL_TESTFILES=
295
296 # Process each common test directory:
297 .for _d in ${COMMONDIRS}
298
299 # Get a list of test files in the test directory:
300 ${_d}_ERR!=     find ${TESTSRCDIR}/tst/common/${_d} -name "err.*.d"
301 ${_d}_TSTD!=    find ${TESTSRCDIR}/tst/common/${_d} -name "tst.*.d"
302 ${_d}_TSTC!=    find ${TESTSRCDIR}/tst/common/${_d} -name "tst.*.c"
303 ${_d}_SHERR!=   find ${TESTSRCDIR}/tst/common/${_d} -name "err.*.ksh"
304 ${_d}_SHTST!=   find ${TESTSRCDIR}/tst/common/${_d} -name "tst.*.ksh"
305 ${_d}_TF=       ${${_d}_ERR} ${${_d}_TSTD} ${${_d}_SHERR} ${${_d}_SHTST}
306
307 # Go through the list of test files and prepare another list that contains
308 # none of the test files listed in the NOTYET list:
309 .for _f in ${${_d}_TF}
310 .if (${NOTYET:M${_f}} == "")
311 ${_d}_TFS+= ${_f}
312 .endif
313 .endfor
314
315 # Add the list of tests to the overall test list:
316 ALL_TESTFILES+= ${${_d}_TFS}
317
318 .for _f in ${${_d}_TSTC}
319 .if (${NOTYET:M${_f}} == "")
320 ${_d}_TFCS+= ${_f}
321 .endif
322 .endfor
323
324 ALL_TESTCFILES+= ${${_d}_TFCS}
325
326 ${_d}   : ${${_d}_TFCS:T:S/c$/exe/}
327         @${DTEST} ${${_d}_TFS}
328 .endfor
329
330 # --------------------------------------------------------------------------------
331
332
333 PRGS=   ${ALL_TESTCFILES:T:S/c$/exe/}
334
335 listprgs        :
336         @echo ${PRGS}
337
338 # --------------------------------------------------------------------------------
339
340
341 .for _f in ${ALL_TESTCFILES}
342 ${_f:T:S/c$/exe/} : ${_f}
343         gcc -o ${.TARGET} ${_f} -lrt
344 .endfor
345
346 listcfiles      :
347         @echo ${ALL_TESTCFILES}
348
349 # --------------------------------------------------------------------------------
350 # A target to build all tests:
351
352 all     : ${PRGS}
353         @sync; sync; sync; sync; sync
354         @${DTEST} ${ALL_TESTFILES}
355
356 # --------------------------------------------------------------------------------
357 # A target to build the tests flagged as not working yet:
358
359 ignore  :
360         @${DTEST} ${IGNORE}
361
362 .endif
363
364 listerrors      :
365         @find ${.OBJDIR} -name "*.err" -exec cat {} \; -print
366
367
368 # --------------------------------------------------------------------------------
369 # Test failures are written to failure.N directories in the object tree.
370 # Get a list of directories in the object tree for 'make clean'.
371
372 .if ${.OBJDIR} != ${.CURDIR} && !empty(${.OBJDIR})
373 CLEANDIRS!=     cd ${.OBJDIR} && ls -d *
374 .endif
375
376 # --------------------------------------------------------------------------------
377 # Insist on using an object directory. Things get messy otherwsie.
378
379 .if ${.OBJDIR} == ${.CURDIR} && !make(obj) && !make(clean) && !make(cleandir)
380 .error ERROR: You must run 'make obj' first!
381 .endif
382
383 # --------------------------------------------------------------------------------
384 # Load the DTrace module set if necessary.
385
386 .BEGIN  :
387         @if ! kldstat -q -m dtrace_test; then kldload dtrace_test; fi
388
389 .include <bsd.obj.mk>
390