]> git.ipfire.org Git - thirdparty/gnutls.git/commitdiff
bootstrap.conf: exercise more tests from Gnulib
authorDaiki Ueno <ueno@gnu.org>
Mon, 26 Oct 2020 14:42:22 +0000 (15:42 +0100)
committerDaiki Ueno <ueno@gnu.org>
Tue, 27 Oct 2020 06:16:28 +0000 (07:16 +0100)
This fixes the build failure with -Werror:

  configure:53786: gcc -o conftest -O0 -Wall -Werror -g3   conftest.c  -lev >&5
  conftest.c:412: error: "GNULIB_STRERROR" redefined [-Werror]
    412 | #define GNULIB_STRERROR 1
        |
  conftest.c:305: note: this is the location of the previous definition
    305 | #define GNULIB_STRERROR IN_GNUTLS_GNULIB_TESTS
        |
  cc1: all warnings being treated as errors

as well as improves code coverage.

Suggested by Bruno Haible in:
<https://lists.gnu.org/archive/html/bug-gnulib/2020-10/msg00148.html>.

Signed-off-by: Daiki Ueno <ueno@gnu.org>
.gitlab-ci.yml
bootstrap.conf
configure.ac

index 82f52e5365492b84b5cd642ed17ffdae5d0affa5..f09ebbf07591cacef93449c8c1b1d242163e0a81 100644 (file)
@@ -686,7 +686,7 @@ Debian.cross.i686-linux-gnu:
   - export CC_FOR_BUILD="ccache gcc"
   - export CC="ccache $host-gcc"
   - ./bootstrap
-  - sed -i '/errno.==.EINVAL/d' gl/tests/test-strerror.c
+  - sed -i '/errno.==.EINVAL/d' src/gl/tests/test-strerror.c
   - mkdir -p build
   - cd build
   # Debian's softhsm package is not multiarch yet. Missing softhsm libraries
index 8f7da96fd12d94b4f7988ed614efd41355faec02..0f5bb9ae1bfba5ed71ecbbfe1c715292556ac9b4 100644 (file)
@@ -19,16 +19,18 @@ source_base=gl
 tests_base=gl/tests
 m4_base=m4
 gnulib_name=libgnu
-gnulib_tool_option_extras="--with-tests --avoid=alignof-tests --avoid=lock-tests --avoid=lseek-tests --lgpl=2"
+gnulib_tool_option_extras="--without-tests --avoid=alignof-tests --avoid=lock-tests --avoid=lseek-tests --lgpl=2"
 use_libtool=1
 checkout_only_file=
 local_gl_dir=gl/override/
 required_submodules="tests/suite/tls-fuzzer/python-ecdsa tests/suite/tls-fuzzer/tlsfuzzer tests/suite/tls-fuzzer/tlslite-ng devel/nettle devel/libtasn1"
 
-# Reproduce by: gnulib-tool --import --local-dir=gl/override --lib=libgnu --source-base=gl --m4-base=gl/m4 --doc-base=doc --tests-base=gl/tests --aux-dir=build-aux --with-tests --avoid=alignof-tests --avoid=lock-tests --avoid=lseek-tests --lgpl=2 --no-conditional-dependencies --libtool --macro-prefix=gl --no-vc-files alloca attribute byteswap c-ctype extensions fopen-gnu func gendocs getline gettext-h gettimeofday hash-pjw-bare havelib intprops ldd lib-msvc-compat lib-symbol-versions maintainer-makefile manywarnings memmem-simple minmax netdb netinet_in pmccabe2html read-file secure_getenv snprintf stdint strcase strndup strtok_r strverscmp sys_socket sys_stat threadlib time_r unistd vasprintf verify vsnprintf warnings
-
+# Those modules are common to lib/ and src/.
+common_modules="
+alloca attribute byteswap c-ctype c-strcase fopen-gnu func getline gettext-h gettimeofday hash hash-pjw-bare arpa_inet inet_ntop inet_pton intprops memmem-simple minmax netdb netinet_in read-file secure_getenv setsockopt snprintf stdint stpcpy strcase strdup-posix strndup strtok_r strverscmp sys_socket sys_stat sys_types threadlib time_r unistd valgrind-tests vasprintf verify vsnprintf
+"
 gnulib_modules="
-alloca attribute byteswap c-ctype c-strcase extensions fopen-gnu func gendocs getline gettext-h gettimeofday hash hash-pjw-bare havelib arpa_inet inet_ntop inet_pton intprops ldd lib-msvc-compat lib-symbol-versions maintainer-makefile manywarnings memmem-simple minmax netdb netinet_in pmccabe2html read-file secure_getenv setsockopt snprintf stdint stpcpy strcase strdup-posix strndup strtok_r strverscmp sys_socket sys_stat sys_types threadlib time_r unistd valgrind-tests vasprintf verify vsnprintf warnings
+$common_modules extensions gendocs havelib ldd lib-msvc-compat lib-symbol-versions maintainer-makefile manywarnings pmccabe2html warnings
 "
 
 unistring_modules="
@@ -36,7 +38,7 @@ unictype/category-all unictype/property-default-ignorable-code-point unictype/pr
 "
 
 src_modules="
-accept bind close connect getaddrinfo getpass gettext-h arpa_inet inet_ntop inet_pton inttypes listen linked-list minmax parse-datetime progname read-file recv recvfrom select send sendto servent setsockopt shutdown socket sockets socklen stpcpy xalloc xlist xsize
+$common_modules accept bind close connect getaddrinfo getpass inttypes listen linked-list parse-datetime progname read-file recv recvfrom select send sendto servent setsockopt shutdown socket sockets socklen xalloc xlist xsize
 "
 
 # Build prerequisites
@@ -95,7 +97,7 @@ bootstrap_post_import_hook ()
 
   ${GNULIB_SRCDIR}/gnulib-tool --import --local-dir=lib/unistring/override --lib=libunistring --source-base=lib/unistring --m4-base=lib/unistring/m4 --doc-base=doc --aux-dir=build-aux --lgpl=3orGPLv2 --no-conditional-dependencies --libtool --without-tests --macro-prefix=unistring ${unistring_modules}
 
-  ${GNULIB_SRCDIR}/gnulib-tool --import --local-dir=src/gl/override --lib=libgnu_gpl --source-base=src/gl --m4-base=src/gl/m4 --doc-base=doc --aux-dir=build-aux --no-conditional-dependencies --libtool --macro-prefix=ggl --without-tests --no-vc-files ${src_modules}
+  ${GNULIB_SRCDIR}/gnulib-tool --import --local-dir=src/gl/override --lib=libgnu_gpl --source-base=src/gl --m4-base=src/gl/m4 --doc-base=doc --tests-base=src/gl/tests --aux-dir=build-aux --no-conditional-dependencies --libtool --macro-prefix=ggl --with-tests --no-vc-files ${src_modules}
 
 #  git -C ${GNULIB_SRCDIR} reset --hard
 
index e485699f30e00e9186dd19e227a72df0d22f760b..42e3c0bc3f82694d06cdcc1038bb57be214d3193 100644 (file)
@@ -1209,7 +1209,6 @@ AC_CONFIG_FILES([
   libdane/includes/Makefile
   libdane/gnutls-dane.pc
   gl/Makefile
-  gl/tests/Makefile
   guile/Makefile
   guile/src/Makefile
   lib/Makefile
@@ -1231,6 +1230,7 @@ AC_CONFIG_FILES([
   src/Makefile
   src/args-std.def
   src/gl/Makefile
+  src/gl/tests/Makefile
   tests/Makefile
   tests/windows/Makefile
   tests/cert-tests/Makefile