tests: deal with configure overridden timestamp prec in unit test

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>
This commit is contained in:
Christian Hopps 2025-03-15 04:09:29 +00:00
parent 7945af0200
commit 986501029e
2 changed files with 7 additions and 2 deletions

View file

@ -1054,6 +1054,11 @@ AC_MSG_FAILURE([Please specify a number from 0-12 for log precision ARG])
;; ;;
esac esac
with_log_timestamp_precision=${with_log_timestamp_precision:-0} 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([LOG_TIMESTAMP_PRECISION], [${with_log_timestamp_precision}], [Startup zlog timestamp precision])
AC_DEFINE_UNQUOTED([VTYSH_PAGER], ["$VTYSH_PAGER"], [What pager to use]) AC_DEFINE_UNQUOTED([VTYSH_PAGER], ["$VTYSH_PAGER"], [What pager to use])

View file

@ -405,7 +405,7 @@ frr version @PACKAGE_VERSION@
frr defaults @DFLT_NAME@ frr defaults @DFLT_NAME@
! !
hostname test hostname test
domainname test.domain domainname test.domain@LOG_TIMESTAMP_PRECISION_CLI@
! !
! !
! !
@ -420,7 +420,7 @@ frr version @PACKAGE_VERSION@
frr defaults @DFLT_NAME@ frr defaults @DFLT_NAME@
! !
hostname foohost hostname foohost
domainname test.domain domainname test.domain@LOG_TIMESTAMP_PRECISION_CLI@
! !
! !
! !