]> git.ipfire.org Git - thirdparty/nettle.git/commitdiff
New make target check-fat
authorNiels Möller <nisse@lysator.liu.se>
Fri, 31 Jul 2020 17:54:07 +0000 (19:54 +0200)
committerNiels Möller <nisse@lysator.liu.se>
Fri, 31 Jul 2020 17:54:07 +0000 (19:54 +0200)
ChangeLog
Makefile.in
configure.ac

index 0c2d365a31de599bed811b1d71f73e653f232caf..359f1f11ce0c64c201247eb4593a3cea37763033 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2020-07-28  Niels Möller  <nisse@lysator.liu.se>
+
+       * configure.ac (FAT_TEST_LIST): New substituted variable. Set for
+       fat builds, otherwise empty.
+       * Makefile.in (check-fat): New target, using $(FAT_TEST_LIST).
+
 2020-07-13  Niels Möller  <nisse@lysator.liu.se>
 
        * chacha-crypt.c (chacha_crypt) [HAVE_NATIVE_chacha_3core]: Use
index 042ebe5f07a4621d2e7648965f1d33ed170befde..c73a9e0d12154df308c3149af716906d8336f875 100644 (file)
@@ -17,6 +17,8 @@ OPT_HOGWEED_OBJS = @OPT_HOGWEED_OBJS@
 
 OPT_NETTLE_SOURCES = @OPT_NETTLE_SOURCES@
 
+FAT_TEST_LIST = @FAT_TEST_LIST@
+
 SUBDIRS = tools testsuite examples
 
 include config.make
@@ -55,6 +57,16 @@ clean distclean mostlyclean maintainer-clean tags:
 check-here:
        true
 
+# Tries different settings of NETTLE_FAT_OVERRIDE. Note that this
+# requires that corresponding processor features are available on the
+# test machine.
+check-fat:
+       [ -z "$(FAT_TEST_LIST)" ] || \
+         set -e; cd testsuite && for f in $(FAT_TEST_LIST) ; do \
+           echo NETTLE_FAT_OVERRIDE=$$f ; \
+           NETTLE_FAT_OVERRIDE=$$f $(MAKE) check ; \
+         done
+
 # FIXME: Remove. These targets aren't supported, but they are expected by the
 # automake generated Makefiles in the lsh build.
 dvi installcheck uninstallcheck:
index f6d5fdd81a020f9b3d16b8c7fe4295546c76227e..d8b7b07215003fbb766b2d6430e53281eded88a2 100644 (file)
@@ -383,6 +383,7 @@ if test "x$ABI" != xstandard ; then
 fi
 
 OPT_NETTLE_SOURCES=""
+FAT_TEST_LIST=""
 
 # Select assembler code
 asm_path=
@@ -397,6 +398,9 @@ if test "x$enable_assembler" = xyes ; then
        if test "x$enable_fat" = xyes ; then
          asm_path="x86_64/fat $asm_path"
          OPT_NETTLE_SOURCES="fat-x86_64.c $OPT_NETTLE_SOURCES"
+         # For now, not enabling aesni or sha_ni, since at least 
+         # the latter appears unavailable on te gitlab test machines.
+         FAT_TEST_LIST="vendor:intel vendor:amd"
        else
          if test "x$enable_x86_aesni" = xyes ; then
            asm_path="x86_64/aesni $asm_path"
@@ -421,6 +425,7 @@ if test "x$enable_assembler" = xyes ; then
       if test "x$enable_fat" = xyes ; then
        asm_path="arm/fat $asm_path"
        OPT_NETTLE_SOURCES="fat-arm.c $OPT_NETTLE_SOURCES"
+       FAT_TEST_LIST="arch:5 arch:6,neon"
       else
        case "$host_cpu" in
          armv6* | armv7*)
@@ -547,6 +552,7 @@ fi
 AC_SUBST([OPT_NETTLE_OBJS])
 AC_SUBST([OPT_HOGWEED_OBJS])
 AC_SUBST([OPT_NETTLE_SOURCES])
+AC_SUBST([FAT_TEST_LIST])
 AC_SUBST([ASM_RODATA])
 if test "x$enable_assembler" = xyes ; then
   IF_ASM=''