summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTor Lillqvist <tml@collabora.com>2016-12-08 17:46:43 +0200
committerTor Lillqvist <tml@collabora.com>2016-12-08 17:48:39 +0200
commitf12b13103e300ca77af038a847df293108681d53 (patch)
treed84a417fe2ce69af5eb84dabf24422307b425b00
parent228ae90e9f2726195e48dbb0eba2320b6ead396d (diff)
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
-rw-r--r--configure.ac2
-rw-r--r--m4/libo_fuzz_configury.m413
2 files changed, 13 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac
index 4295ee16ce12..2d34934e6ec8 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 c243fed8f3d1..013908e28db3 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: