summaryrefslogtreecommitdiffstats
path: root/usr.sbin/nmtree
diff options
context:
space:
mode:
authorngie <ngie@FreeBSD.org>2014-10-09 00:32:33 +0000
committerngie <ngie@FreeBSD.org>2014-10-09 00:32:33 +0000
commitc4fbacfa9e4777a7a18301b700ecfbc1f4bf1cca (patch)
treec7f5e69d776a9d0ead09b7227018bda0f54d299f /usr.sbin/nmtree
parent1a90cf59cd77aaafd4a9e48e5933cb317bbeb927 (diff)
downloadFreeBSD-src-c4fbacfa9e4777a7a18301b700ecfbc1f4bf1cca.zip
FreeBSD-src-c4fbacfa9e4777a7a18301b700ecfbc1f4bf1cca.tar.gz
Integrate usr.sbin/nmtree/tests from NetBSD into atf/kyua
In collaboration with: pho Sponsored by: EMC / Isilon Storage Division
Diffstat (limited to 'usr.sbin/nmtree')
-rw-r--r--usr.sbin/nmtree/Makefile6
-rw-r--r--usr.sbin/nmtree/tests/Makefile32
2 files changed, 37 insertions, 1 deletions
diff --git a/usr.sbin/nmtree/Makefile b/usr.sbin/nmtree/Makefile
index 8cba6f8..5789ad8 100644
--- a/usr.sbin/nmtree/Makefile
+++ b/usr.sbin/nmtree/Makefile
@@ -1,6 +1,6 @@
# $FreeBSD$
-.include <bsd.own.mk>
+.include <src.opts.mk>
.PATH: ${.CURDIR}/../../contrib/mtree
@@ -24,4 +24,8 @@ LDADD+= ${LIBNETBSD}
LINKS= ${BINDIR}/mtree ${BINDIR}/nmtree
MLINKS= mtree.8 nmtree.8
+.if ${MK_TESTS} != "no"
+SUBDIR+= tests
+.endif
+
.include <bsd.prog.mk>
diff --git a/usr.sbin/nmtree/tests/Makefile b/usr.sbin/nmtree/tests/Makefile
new file mode 100644
index 0000000..1df81d0
--- /dev/null
+++ b/usr.sbin/nmtree/tests/Makefile
@@ -0,0 +1,32 @@
+# $FreeBSD$
+
+TESTSRC= ${.CURDIR}/../../../contrib/netbsd-tests/usr.sbin/mtree
+.PATH: ${TESTSRC}
+
+TESTSDIR= ${TESTSBASE}/usr.sbin/nmtree
+
+ATF_TESTS_SH= nmtree_test
+ATF_TESTS_SH_SRC_nmtree_test= t_mtree.sh
+
+FILESDIR= ${TESTSDIR}
+
+# NOTE: the output from FreeBSD's nmtree displays sha256digest instead of
+# sha256; we need to mangle the specfiles to reflect this.
+.for f in mtree_d_create.out netbsd6_d_create.out
+CLEANFILES+= $f $f.tmp
+FILES+= $f
+$f: ${TESTSRC}/$f
+ sed -e 's/sha256/sha256digest/g' < ${.ALLSRC} > ${.TARGET}.tmp
+ mv ${.TARGET}.tmp ${.TARGET}
+.endfor
+
+FILES+= d_convert.in
+FILES+= d_convert_C.out
+FILES+= d_convert_C_S.out
+FILES+= d_convert_D.out
+FILES+= d_convert_D_S.out
+FILES+= d_merge.in
+FILES+= d_merge_C_M.out
+FILES+= d_merge_C_M_S.out
+
+.include <bsd.test.mk>
OpenPOWER on IntegriCloud