Add ptest support for gmp, running the full upstream unit test suite
(200 tests) covering mpz, mpn, mpf, mpq, rand, misc, and C++ bindings.
Tests are compiled with 'make check TESTS=' to build without executing,
then installed via libtool to the ptest directory preserving the upstream
subdirectory structure.
Tested on qemux86-64 with ptest-runner: 200 PASS, 0 FAIL (268s).
Signed-off-by: Pratik Farkase <pratik.farkase@est.tech>
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
gdbm \
gdk-pixbuf \
glib-networking \
+ gmp \
gzip \
icu \
json-c \
HOMEPAGE = "http://gmplib.org/"
SECTION = "devel"
-inherit autotools texinfo multilib_header
+inherit autotools texinfo multilib_header ptest
PACKAGECONFIG ??= ""
PACKAGECONFIG[readline] = "--with-readline=yes,--with-readline=no,readline"
--- /dev/null
+#!/bin/sh
+
+cd "$(dirname "$0")/tests" || exit 1
+
+for d in . mpz mpn mpf mpq rand misc cxx; do
+ [ -d "$d" ] || continue
+ for test in $(find "$d" -maxdepth 1 -type f -executable | sort); do
+ testname=$(echo "$test" | sed 's|^\./||')
+ ./"$test"
+ ret=$?
+ if [ $ret -eq 0 ]; then
+ echo "PASS: $testname"
+ elif [ $ret -eq 77 ]; then
+ echo "SKIP: $testname"
+ else
+ echo "FAIL: $testname"
+ fi
+ done
+done
file://0001-confiure.ac-Believe-the-cflags-from-environment.patch \
file://0001-Complete-function-prototype-in-acinclude.m4-for-C23-.patch \
file://0001-acinclude.m4-Add-parameter-names-in-prototype-for-g.patch \
+ file://run-ptest \
"
SRC_URI[sha256sum] = "ac28211a7cfb609bae2e2c8d6058d66c8fe96434f740cf6fe2e47b000d1c20cb"
MIPS_INSTRUCTION_SET = "mips"
BBCLASSEXTEND = "native nativesdk"
+
+do_compile_ptest() {
+ oe_runmake -C ${B}/tests check TESTS=
+}
+
+do_install_ptest() {
+ install -d ${D}${PTEST_PATH}/tests
+
+ for d in . mpz mpn mpf mpq rand misc cxx; do
+ install -d ${D}${PTEST_PATH}/tests/$d
+ find ${B}/tests/$d -maxdepth 1 -type f -executable \
+ ! -name "*.la" | while read -r t; do
+ ${B}/libtool --mode=install install -m 0755 "$t" ${D}${PTEST_PATH}/tests/$d/
+ done
+ done
+}