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
This commit is contained in:
ngie 2014-08-04 22:10:07 +00:00
parent 52fea1f7b2
commit 0a9b61e64a
6 changed files with 24 additions and 28 deletions

View File

@ -85,6 +85,8 @@
..
libcrypt
..
libmp
..
..
libexec
atf

View File

@ -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>

10
lib/libmp/tests/Makefile Normal file
View File

@ -0,0 +1,10 @@
# $FreeBSD$
TESTSDIR= ${TESTSBASE}/lib/libmp
TAP_TESTS_C+= legacy_test
DPADD+= ${LIBCRYPTO} ${LIBMP}
LDADD+= -lcrypto -lmp
.include <bsd.test.mk>

View File

@ -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)
{

View File

@ -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}

View File

@ -1,10 +0,0 @@
#!/bin/sh
# $FreeBSD$
cd `dirname $0`
executable=`basename $0 .t`
make $executable 2>&1 > /dev/null
exec ./$executable