PERFORCE change 134063 for review
John Birrell
jb at FreeBSD.org
Thu Jan 24 21:51:03 PST 2008
http://perforce.freebsd.org/chv.cgi?CH=134063
Change 134063 by jb at jb_freebsd1 on 2008/01/25 05:50:38
Now we need to build the companion C programs that are used as
targets for some of the tests. Try to do this generically. Later
we'll need to add extra libraries, but we might be able to get
away with a generic set.
Affected files ...
.. //depot/projects/dtrace/src/tools/test/dtrace/Makefile#19 edit
Differences ...
==== //depot/projects/dtrace/src/tools/test/dtrace/Makefile#19 (text+ko) ====
@@ -4,9 +4,6 @@
DTEST= ${TESTSRCDIR}/cmd/scripts/dtest.pl
IGNORE= \
- ${TESTSRCDIR}/tst/common/dtraceUtil/tst.DataModel32.d.ksh \
- ${TESTSRCDIR}/tst/common/dtraceUtil/tst.DestructWithFunction.d.ksh \
- ${TESTSRCDIR}/tst/common/dtraceUtil/tst.ZeroFunctionProbes.d.ksh \
${TESTSRCDIR}/tst/common/aggs/tst.subr.d \
${TESTSRCDIR}/tst/common/arrays/tst.uregsarray.d \
${TESTSRCDIR}/tst/common/assocs/err.D_OP_INCOMPAT.dupgtype.d \
@@ -18,8 +15,11 @@
${TESTSRCDIR}/tst/common/builtinvar/tst.psinfo1.d \
${TESTSRCDIR}/tst/common/drops/drp.DTRACEDROP_STKSTROVERFLOW.d \
${TESTSRCDIR}/tst/common/dtraceUtil/err.D_PDESC_ZERO.InvalidDescription1.d \
+ ${TESTSRCDIR}/tst/common/dtraceUtil/tst.DataModel32.d.ksh \
+ ${TESTSRCDIR}/tst/common/dtraceUtil/tst.DestructWithFunction.d.ksh \
${TESTSRCDIR}/tst/common/dtraceUtil/tst.DestructWithModule.d.ksh \
${TESTSRCDIR}/tst/common/dtraceUtil/tst.PreprocessorStatement.d.ksh \
+ ${TESTSRCDIR}/tst/common/dtraceUtil/tst.ZeroFunctionProbes.d.ksh \
${TESTSRCDIR}/tst/common/funcs/err.D_PROTO_ARG.mobadarg.d \
${TESTSRCDIR}/tst/common/funcs/err.D_PROTO_LEN.motoofew.d \
${TESTSRCDIR}/tst/common/funcs/err.D_PROTO_LEN.motoomany.d \
@@ -42,6 +42,9 @@
${TESTSRCDIR}/tst/common/inline/tst.InlineDataAssign.d \
${TESTSRCDIR}/tst/common/inline/tst.InlineExpression.d \
${TESTSRCDIR}/tst/common/inline/tst.InlineTypedef.d \
+ ${TESTSRCDIR}/tst/common/io/tst.fds.c \
+ ${TESTSRCDIR}/tst/common/java_api/tst.FunctionLookup.c \
+ ${TESTSRCDIR}/tst/common/java_api/tst.ProbeData.c \
${TESTSRCDIR}/tst/common/misc/tst.dynopt.d \
${TESTSRCDIR}/tst/common/misc/tst.include.ksh \
${TESTSRCDIR}/tst/common/misc/tst.roch.d \
@@ -58,19 +61,28 @@
${TESTSRCDIR}/tst/common/pid/err.D_PROC_NAME.globdash.d \
${TESTSRCDIR}/tst/common/pid/err.D_PROC_OFF.toobig.d \
${TESTSRCDIR}/tst/common/pid/tst.addprobes.ksh \
+ ${TESTSRCDIR}/tst/common/pid/tst.args1.c \
${TESTSRCDIR}/tst/common/pid/tst.args1.d \
${TESTSRCDIR}/tst/common/pid/tst.coverage.d \
${TESTSRCDIR}/tst/common/pid/tst.emptystack.d \
+ ${TESTSRCDIR}/tst/common/pid/tst.float.c \
${TESTSRCDIR}/tst/common/pid/tst.float.d \
+ ${TESTSRCDIR}/tst/common/pid/tst.fork.c \
${TESTSRCDIR}/tst/common/pid/tst.fork.d \
+ ${TESTSRCDIR}/tst/common/pid/tst.gcc.c \
${TESTSRCDIR}/tst/common/pid/tst.gcc.d \
${TESTSRCDIR}/tst/common/pid/tst.main.ksh \
${TESTSRCDIR}/tst/common/pid/tst.manypids.ksh \
${TESTSRCDIR}/tst/common/pid/tst.probemod.ksh \
+ ${TESTSRCDIR}/tst/common/pid/tst.ret1.c \
${TESTSRCDIR}/tst/common/pid/tst.ret1.d \
+ ${TESTSRCDIR}/tst/common/pid/tst.ret2.c \
${TESTSRCDIR}/tst/common/pid/tst.ret2.d \
+ ${TESTSRCDIR}/tst/common/pid/tst.vfork.c \
${TESTSRCDIR}/tst/common/pid/tst.vfork.d \
+ ${TESTSRCDIR}/tst/common/pid/tst.weak1.c \
${TESTSRCDIR}/tst/common/pid/tst.weak1.d \
+ ${TESTSRCDIR}/tst/common/pid/tst.weak2.c \
${TESTSRCDIR}/tst/common/pid/tst.weak2.d \
${TESTSRCDIR}/tst/common/plockstat/tst.available.d \
${TESTSRCDIR}/tst/common/plockstat/tst.libmap.d \
@@ -89,11 +101,10 @@
${TESTSRCDIR}/tst/common/privs/tst.op_access.ksh \
${TESTSRCDIR}/tst/common/proc/tst.discard.ksh \
${TESTSRCDIR}/tst/common/proc/tst.signal.ksh \
+ ${TESTSRCDIR}/tst/common/proc/tst.sigwait.c \
${TESTSRCDIR}/tst/common/proc/tst.sigwait.d \
${TESTSRCDIR}/tst/common/proc/tst.startexit.ksh \
- ${TESTSRCDIR}/tst/common/raise/tst.raise1.d \
- ${TESTSRCDIR}/tst/common/raise/tst.raise2.d \
- ${TESTSRCDIR}/tst/common/raise/tst.raise3.d \
+ ${TESTSRCDIR}/tst/common/profile-n/tst.ufuncsort.c \
${TESTSRCDIR}/tst/common/scalars/tst.misc.d \
${TESTSRCDIR}/tst/common/scalars/tst.selfarray2.d \
${TESTSRCDIR}/tst/common/scripting/err.D_MACRO_UNDEF.invalidargs.d \
@@ -122,11 +133,12 @@
${TESTSRCDIR}/tst/common/stack/err.D_USTACK_STRSIZE.bad.d \
${TESTSRCDIR}/tst/common/stack/tst.default.d \
${TESTSRCDIR}/tst/common/stackdepth/tst.default.d \
- ${TESTSRCDIR}/tst/common/stop/tst.stop1.d \
- ${TESTSRCDIR}/tst/common/stop/tst.stop2.d \
+ ${TESTSRCDIR}/tst/common/syscall/tst.args.c \
${TESTSRCDIR}/tst/common/syscall/tst.args.d \
${TESTSRCDIR}/tst/common/syscall/tst.openret.ksh \
+ ${TESTSRCDIR}/tst/common/sysevent/tst.post.c \
${TESTSRCDIR}/tst/common/sysevent/tst.post.d \
+ ${TESTSRCDIR}/tst/common/sysevent/tst.post_chan.c \
${TESTSRCDIR}/tst/common/sysevent/tst.post_chan.d \
${TESTSRCDIR}/tst/common/trace/tst.misc.d \
${TESTSRCDIR}/tst/common/tracemem/err.D_TRACEMEM_ADDR.badaddr.d \
@@ -136,9 +148,17 @@
${TESTSRCDIR}/tst/common/types/tst.ptrops.d \
${TESTSRCDIR}/tst/common/types/tst.struct.d \
${TESTSRCDIR}/tst/common/types/tst.typedef.d \
+ ${TESTSRCDIR}/tst/common/usdt/tst.argmap.c \
+ ${TESTSRCDIR}/tst/common/usdt/tst.args.c \
+ ${TESTSRCDIR}/tst/common/usdt/tst.forker.c \
+ ${TESTSRCDIR}/tst/common/ustack/tst.bigstack.c \
+ ${TESTSRCDIR}/tst/common/ustack/tst.spin.c \
${TESTSRCDIR}/tst/common/vars/tst.ppid.d \
${TESTSRCDIR}/tst/common/vars/tst.ucaller.ksh \
${TESTSRCDIR}/tst/common/vars/tst.walltimestamp.d \
+ X${TESTSRCDIR}/tst/common/raise/tst.raise1.d \
+ X${TESTSRCDIR}/tst/common/raise/tst.raise2.d \
+ X${TESTSRCDIR}/tst/common/raise/tst.raise3.d \
NOTWORK+= \
${TESTSRCDIR}/tst/common/io/tst.fds.d \
@@ -313,10 +333,11 @@
# Get a list of test files in the test directory:
${_d}_ERR!= find ${TESTSRCDIR}/tst/common/${_d} -name "err.*.d"
-${_d}_TST!= find ${TESTSRCDIR}/tst/common/${_d} -name "tst.*.d"
+${_d}_TSTD!= find ${TESTSRCDIR}/tst/common/${_d} -name "tst.*.d"
+${_d}_TSTC!= find ${TESTSRCDIR}/tst/common/${_d} -name "tst.*.c"
${_d}_SHERR!= find ${TESTSRCDIR}/tst/common/${_d} -name "err.*.ksh"
${_d}_SHTST!= find ${TESTSRCDIR}/tst/common/${_d} -name "tst.*.ksh"
-${_d}_TF= ${${_d}_ERR} ${${_d}_TST} ${${_d}_SHERR} ${${_d}_SHTST}
+${_d}_TF= ${${_d}_ERR} ${${_d}_TSTD} ${${_d}_SHERR} ${${_d}_SHTST}
# Go through the list of test files and prepare another list that contains
# none of the test files listed in the NOTYET list:
@@ -329,14 +350,42 @@
# Add the list of tests to the overall test list:
ALL_TESTFILES+= ${${_d}_TFS}
-${_d} :
+.for _f in ${${_d}_TSTC}
+.if (${NOTYET:M${_f}} == "")
+${_d}_TFCS+= ${_f}
+.endif
+.endfor
+
+ALL_TESTCFILES+= ${${_d}_TFCS}
+
+${_d} : ${${_d}_TFCS:T:S/c$/exe/}
@${DTEST} ${${_d}_TFS}
.endfor
# --------------------------------------------------------------------------------
+#
+
+PRGS= ${ALL_TESTCFILES:T:S/c$/exe/}
+
+listprgs :
+ @echo ${PRGS}
+
+# --------------------------------------------------------------------------------
+#
+
+.for _f in ${ALL_TESTCFILES}
+${_f:T:S/c$/exe/} : ${_f}
+ gcc -o ${.TARGET} ${_f}
+.endfor
+
+listcfiles :
+ @echo ${ALL_TESTCFILES}
+
+# --------------------------------------------------------------------------------
# A target to build all tests:
-all :
+all : ${PRGS}
+ @sync; sync; sync; sync; sync
@${DTEST} ${ALL_TESTFILES}
# --------------------------------------------------------------------------------
@@ -350,6 +399,7 @@
listerrors :
@find ${.OBJDIR} -name "*.err" -exec cat {} \; -print
+
# --------------------------------------------------------------------------------
# Test failures are written to failure.N directories in the object tree.
# Get a list of directories in the object tree for 'make clean'.
@@ -370,7 +420,6 @@
.BEGIN :
@if ! kldstat -q -m dtrace_test; then kldload dtrace_test; fi
- @sync; sync; sync; sync; sync
.include <bsd.obj.mk>
More information about the p4-projects
mailing list