[Libreoffice-commits] core.git: configure.ac m4/libo_fuzz_configury.m4

Tor Lillqvist tml at collabora.com
Thu Dec 8 15:49:29 UTC 2016


 configure.ac              |    2 ++
 m4/libo_fuzz_configury.m4 |   13 +++++++++++--
 2 files changed, 13 insertions(+), 2 deletions(-)

New commits:
commit f12b13103e300ca77af038a847df293108681d53
Author: Tor Lillqvist <tml at collabora.com>
Date:   Thu Dec 8 17:46:43 2016 +0200

    Display a summary of fuzzing in command-line form at the end of configure
    
    Makes it easier to reproduce a fuzzed configuration manually.
    
    Change-Id: Ief4df847f1f17c64607e6e5eaf402737bd50704b

diff --git a/configure.ac b/configure.ac
index 4295ee1..2d34934 100644
--- a/configure.ac
+++ b/configure.ac
@@ -12858,6 +12858,8 @@ fi
 
 AC_SUBST(LO_PATH)
 
+libo_FUZZ_SUMMARY
+
 # Generate a configuration md5 we can use for deps
 if test -f config_host.mk; then
     config_md5=`$MD5SUM config_host.mk | sed "s/ .*//"`
diff --git a/m4/libo_fuzz_configury.m4 b/m4/libo_fuzz_configury.m4
index c243fed..013908e 100644
--- a/m4/libo_fuzz_configury.m4
+++ b/m4/libo_fuzz_configury.m4
@@ -16,8 +16,9 @@ AC_DEFUN([libo_FUZZ_ARG_WITH], [
             else
                 m4_translit([with-$1], [-+.], [___])=no
             fi
-            AC_MSG_NOTICE([Randomly set m4_translit([with-$1], [-+.], [___]) to $m4_translit([with-$1], [-+.], [___])])
+            AC_MSG_NOTICE([Randomly set --with-$1=$m4_translit([with-$1], [-+.], [___])])
             libo_fuzzed_[]m4_translit([with-$1], [-+.], [___])=yes
+            libo_fuzz_list="$libo_fuzz_list --with-$1="'$m4_translit([with-$1], [-+.], [___])'
         fi
         [$4]
         )
@@ -33,10 +34,18 @@ AC_DEFUN([libo_FUZZ_ARG_ENABLE], [
             else
                 m4_translit([enable-$1], [-+.], [___])=no
             fi
-            AC_MSG_NOTICE([Randomly set m4_translit([enable-$1], [-+.], [___]) to $m4_translit([enable-$1], [-+.], [___])])
+            AC_MSG_NOTICE([Randomly set --enable-$1=$m4_translit([enable-$1], [-+.], [___])])
             libo_fuzzed_[]m4_translit([enable-$1], [-+.], [___])=yes
+            libo_fuzz_list="$libo_fuzz_list --enable-$1="'$m4_translit([enable-$1], [-+.], [___])'
         fi
         [$4])
 ])
 
+AC_DEFUN([libo_FUZZ_SUMMARY], [
+    if test -n "$libo_fuzz_list"; then
+        tmps=`eval echo $libo_fuzz_list`
+        AC_MSG_NOTICE([Summary of fuzzing: $tmps])
+    fi
+])
+
 dnl vim:set shiftwidth=4 softtabstop=4 expandtab:


More information about the Libreoffice-commits mailing list