aboutsummaryrefslogtreecommitdiff
path: root/cddl
diff options
context:
space:
mode:
authorMark Johnston <markj@FreeBSD.org>2019-05-22 03:10:23 +0000
committerMark Johnston <markj@FreeBSD.org>2019-05-22 03:10:23 +0000
commit2df0edc13c7c439dc3db9954b5d99ac6b3bf598e (patch)
treef43c5863858a0189fef91d0ab3b0b79f4c324106 /cddl
parentb4b2e7a7b970a65ed58d3988ed7d8a7b13279845 (diff)
downloadsrc-2df0edc13c7c439dc3db9954b5d99ac6b3bf598e.tar.gz
src-2df0edc13c7c439dc3db9954b5d99ac6b3bf598e.zip
Make it possible to generate makefiles for arch-dependent DTrace tests.
MFC after: 1 week Event: Waterloo Hackathon 2019
Notes
Notes: svn path=/head/; revision=348080
Diffstat (limited to 'cddl')
-rwxr-xr-xcddl/usr.sbin/dtrace/tests/tools/genmakefiles.sh18
1 files changed, 10 insertions, 8 deletions
diff --git a/cddl/usr.sbin/dtrace/tests/tools/genmakefiles.sh b/cddl/usr.sbin/dtrace/tests/tools/genmakefiles.sh
index 767b22f57783..9df2f0b27fb8 100755
--- a/cddl/usr.sbin/dtrace/tests/tools/genmakefiles.sh
+++ b/cddl/usr.sbin/dtrace/tests/tools/genmakefiles.sh
@@ -24,9 +24,10 @@ fmtflist()
genmakefile()
{
- local basedir=$1
+ local class=$1
+ local group=$2
- local tdir=${CONTRIB_TESTDIR}/${basedir}
+ local tdir=${CONTRIB_TESTDIR}/${class}/${group}
local tfiles=$(find $tdir -type f -a \
\( -name \*.d -o -name \*.ksh -o -name \*.out \) | sort | fmtflist)
local tcfiles=$(find $tdir -type f -a -name \*.c | sort | fmtflist)
@@ -34,7 +35,7 @@ genmakefile()
# One-off variable definitions.
local special
- case "$basedir" in
+ case "$group" in
proc)
special="
LIBADD.tst.sigwait.exe+= rt
@@ -80,7 +81,7 @@ $special
.include "../../dtrace.test.mk"
__EOF__
- mv -f $makefile ${ORIGINDIR}/../common/${basedir}/Makefile
+ mv -f $makefile ${ORIGINDIR}/../${class}/${group}/Makefile
}
set -e
@@ -93,9 +94,10 @@ export LC_ALL=C
readonly ORIGINDIR=$(realpath $(dirname $0))
readonly TOPDIR=$(realpath ${ORIGINDIR}/../../../../..)
-readonly CONTRIB_TESTDIR=${TOPDIR}/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common
+readonly CONTRIB_TESTDIR=${TOPDIR}/cddl/contrib/opensolaris/cmd/dtrace/test/tst
-# Generate a Makefile for each test group under common/.
-for dir in $(find ${CONTRIB_TESTDIR} -mindepth 1 -maxdepth 1 -type d); do
- genmakefile $(basename $dir)
+for class in common i386; do
+ for group in $(find ${CONTRIB_TESTDIR}/$class -mindepth 1 -maxdepth 1 -type d); do
+ genmakefile $class $(basename $group)
+ done
done