aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEnji Cooper <ngie@FreeBSD.org>2014-08-04 22:10:07 +0000
committerEnji Cooper <ngie@FreeBSD.org>2014-08-04 22:10:07 +0000
commitdfed135e5cea0ade1886b98f3df4e68fca9e1fb0 (patch)
tree77b1051b012faf11d64dcaa92d49afb4a43c662c
parent5f9500c358cd140f1615307cd31360dd6cbff8e3 (diff)
downloadsrc-dfed135e5cea0ade1886b98f3df4e68fca9e1fb0.tar.gz
src-dfed135e5cea0ade1886b98f3df4e68fca9e1fb0.zip
Integrate lib/libmp into the build/kyua
- Remove the .t wrapper - Fix -Wreturn-type warnings with clang This change has been tested on amd64/i386 Phabric: D530 Reviewed by: jmmv Approved by: jmmv (co-mentor) MFC after: 2 weeks Sponsored by: EMC / Isilon Storage Division
Notes
Notes: svn path=/head/; revision=269534
-rw-r--r--etc/mtree/BSD.tests.dist2
-rw-r--r--lib/libmp/Makefile6
-rw-r--r--lib/libmp/tests/Makefile10
-rw-r--r--lib/libmp/tests/legacy_test.c (renamed from tools/regression/lib/libmp/test-libmp.c)12
-rw-r--r--tools/regression/lib/libmp/Makefile12
-rw-r--r--tools/regression/lib/libmp/test-libmp.t10
6 files changed, 24 insertions, 28 deletions
diff --git a/etc/mtree/BSD.tests.dist b/etc/mtree/BSD.tests.dist
index 4d6f18a287e5..1f61599eddd4 100644
--- a/etc/mtree/BSD.tests.dist
+++ b/etc/mtree/BSD.tests.dist
@@ -85,6 +85,8 @@
..
libcrypt
..
+ libmp
+ ..
..
libexec
atf
diff --git a/lib/libmp/Makefile b/lib/libmp/Makefile
index a9001a10c375..5d0e7a702c55 100644
--- a/lib/libmp/Makefile
+++ b/lib/libmp/Makefile
@@ -1,5 +1,7 @@
# $FreeBSD$
+.include <src.opts.mk>
+
LIB= mp
SHLIB_MAJOR= 7
DPADD= ${LIBCRYPTO}
@@ -13,4 +15,8 @@ CFLAGS+= -I${.CURDIR}/../../crypto
VERSION_DEF= ${.CURDIR}/../libc/Versions.def
SYMBOL_MAPS= ${.CURDIR}/Symbol.map
+.if ${MK_TESTS} != "no"
+SUBDIR+= tests
+.endif
+
.include <bsd.lib.mk>
diff --git a/lib/libmp/tests/Makefile b/lib/libmp/tests/Makefile
new file mode 100644
index 000000000000..0f591eb3ea42
--- /dev/null
+++ b/lib/libmp/tests/Makefile
@@ -0,0 +1,10 @@
+# $FreeBSD$
+
+TESTSDIR= ${TESTSBASE}/lib/libmp
+
+TAP_TESTS_C+= legacy_test
+
+DPADD+= ${LIBCRYPTO} ${LIBMP}
+LDADD+= -lcrypto -lmp
+
+.include <bsd.test.mk>
diff --git a/tools/regression/lib/libmp/test-libmp.c b/lib/libmp/tests/legacy_test.c
index d9d2c9f6b3e0..6f3f7b60e8d0 100644
--- a/tools/regression/lib/libmp/test-libmp.c
+++ b/lib/libmp/tests/legacy_test.c
@@ -46,7 +46,7 @@ testmcmp(const MINT *mp1, const MINT *mp2, const char *tname)
printf("not ok - %d %s\n", ++tnr, tname);
}
-static int
+static void
testsimpel(void)
{
const char str42[] = "2a";
@@ -74,7 +74,7 @@ testsimpel(void)
mp_mfree(t2);
}
-static int
+static void
testgcd(void)
{
@@ -82,7 +82,7 @@ testgcd(void)
testmcmp(t0, c5, "gcd0");
}
-static int
+static void
testmsqrt(void)
{
@@ -94,7 +94,7 @@ testmsqrt(void)
testmcmp(t1, c6, "msqrt3");
}
-static int
+static void
testdiv(void)
{
short ro;
@@ -121,7 +121,7 @@ testdiv(void)
mp_mfree(t2);
}
-static int
+static void
testmult(void)
{
@@ -131,7 +131,7 @@ testmult(void)
testmcmp(t0, c42, "mmult1");
}
-static int
+static void
testpow(void)
{
diff --git a/tools/regression/lib/libmp/Makefile b/tools/regression/lib/libmp/Makefile
deleted file mode 100644
index a6f60b63bdbd..000000000000
--- a/tools/regression/lib/libmp/Makefile
+++ /dev/null
@@ -1,12 +0,0 @@
-# $FreeBSD$
-
-TESTS= test-libmp
-CFLAGS+= -g -Wall -lcrypto -lmp
-
-.PHONY: tests
-tests: ${TESTS}
- for p in ${TESTS}; do ${.OBJDIR}/$$p; done
-
-.PHONY: clean
-clean:
- -rm -f ${TESTS}
diff --git a/tools/regression/lib/libmp/test-libmp.t b/tools/regression/lib/libmp/test-libmp.t
deleted file mode 100644
index 8bdfd03be81b..000000000000
--- a/tools/regression/lib/libmp/test-libmp.t
+++ /dev/null
@@ -1,10 +0,0 @@
-#!/bin/sh
-# $FreeBSD$
-
-cd `dirname $0`
-
-executable=`basename $0 .t`
-
-make $executable 2>&1 > /dev/null
-
-exec ./$executable