]> git.puffer.fish Git - mirror/frr.git/commitdiff
tests: deal with configure overridden timestamp prec in unit test
authorChristian Hopps <chopps@labn.net>
Sat, 15 Mar 2025 04:09:29 +0000 (04:09 +0000)
committerChristian Hopps <chopps@labn.net>
Sat, 15 Mar 2025 04:11:48 +0000 (04:11 +0000)
Previously if you configured a different timestamp precision then
`make check` would fail as the non-default config is generated and
fails test_cli config file comparison.

Signed-off-by: Christian Hopps <chopps@labn.net>
configure.ac
tests/lib/cli/test_cli.refout.in

index 163772904dc26daf881b2764a67d6075b92a15d6..f9f32865630b022080dea27ad0d486c3975d8bbd 100644 (file)
@@ -1054,6 +1054,11 @@ AC_MSG_FAILURE([Please specify a number from 0-12 for log precision ARG])
 ;;
 esac
 with_log_timestamp_precision=${with_log_timestamp_precision:-0}
+if test "${with_log_timestamp_precision}" != 0; then
+AC_SUBST([LOG_TIMESTAMP_PRECISION_CLI], ["
+log timestamp precision ${with_log_timestamp_precision}"])
+AM_SUBST_NOTMAKE([LOG_TIMESTAMP_PRECISION_CLI])
+fi
 AC_DEFINE_UNQUOTED([LOG_TIMESTAMP_PRECISION], [${with_log_timestamp_precision}], [Startup zlog timestamp precision])
 
 AC_DEFINE_UNQUOTED([VTYSH_PAGER], ["$VTYSH_PAGER"], [What pager to use])
index 222abcdadec293682b29dbb6191c55a571038968..31b5a8c23773d6f03165cc83306cb35ca5e84072 100644 (file)
@@ -405,7 +405,7 @@ frr version @PACKAGE_VERSION@
 frr defaults @DFLT_NAME@\r
 !\r
 hostname test\r
-domainname test.domain\r
+domainname test.domain@LOG_TIMESTAMP_PRECISION_CLI@
 !\r
 !\r
 !\r
@@ -420,7 +420,7 @@ frr version @PACKAGE_VERSION@
 frr defaults @DFLT_NAME@\r
 !\r
 hostname foohost\r
-domainname test.domain\r
+domainname test.domain@LOG_TIMESTAMP_PRECISION_CLI@
 !\r
 !\r
 !\r