From: Harlan Stenn Date: Tue, 29 Sep 2015 10:10:38 +0000 (-0400) Subject: Disable certain test programs on certain platforms. Harlan Stenn. X-Git-Tag: NTP_4_3_73~2^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bd4203225244dc0dada077e63933afb2cf5c676b;p=thirdparty%2Fntp.git Disable certain test programs on certain platforms. Harlan Stenn. bk: 560a639eQ4U_yhZB-e36PnWSldqWDA --- diff --git a/ChangeLog b/ChangeLog index 266244bf2..6f4c4e268 100644 --- a/ChangeLog +++ b/ChangeLog @@ -122,6 +122,7 @@ fixed formatting. Tomasz Flendrich * Fix bugs in tests/ntpd/ntp_prio_q.c. Harlan Stenn. * gcc on older HPUX may need +allowdups. Harlan Stenn. * Adding missing MCAST protection. Harlan Stenn. +* Disable certain test programs on certain platforms. Harlan Stenn. --- (4.2.8p3) 2015/06/29 Released by Harlan Stenn diff --git a/configure.ac b/configure.ac index d0214456a..42e18a49f 100644 --- a/configure.ac +++ b/configure.ac @@ -4329,6 +4329,8 @@ dnl require a C++ compiler only if we will use gtest, but AC_PROG_CXX dnl can't be conditionalized. NTP_GOOGLETEST +NTP_PROBLEM_TESTS + ### AC_DEFINE_DIR([NTP_KEYSDIR], [sysconfdir], diff --git a/sntp/m4/ntp_problemtests.m4 b/sntp/m4/ntp_problemtests.m4 new file mode 100644 index 000000000..b1f52d35f --- /dev/null +++ b/sntp/m4/ntp_problemtests.m4 @@ -0,0 +1,42 @@ +dnl ###################################################################### +dnl NTP_PROBLEM_TESTS +dnl +dnl Some platforms have problems building or running certain tests. +dnl While we're in the initial phase of the deployment of the test +dnl framework, sometimes we may need to disable these tests. +dnl +dnl This is where we do that. +dnl +AC_DEFUN([NTP_PROBLEM_TESTS], [ +case "$build" in + $host) cross=0 ;; + *) cross=1 ;; +esac +AC_MSG_CHECKING([if we can run test-ntp_restrict]) +ntp_test_ntp_restrict="no" +case "$cross:$host" in + 0:*-*-solaris*) ;; + *) ntp_test_ntp_restrict="yes" ;; +esac +AC_MSG_RESULT([$ntp_test_ntp_restrict]) +AM_CONDITIONAL([BUILD_TEST_NTP_RESTRICT], [test x$ntp_test_ntp_restrict = xyes]) + +AC_MSG_CHECKING([if we can run test-ntp_scanner]) +ntp_test_ntp_scanner="no" +case "$cross:$host" in + 0:*-*-solaris*) ;; + *) ntp_test_ntp_scanner="yes" ;; +esac +AC_MSG_RESULT([$ntp_test_ntp_scanner]) +AM_CONDITIONAL([BUILD_TEST_NTP_SCANNER], [test x$ntp_test_ntp_scanner = xyes]) + +AC_MSG_CHECKING([if we can run test-ntp_signd]) +ntp_test_ntp_signd="no" +case "$cross:$host" in + 0:*-*-solaris*) ;; + *) ntp_test_ntp_signd="yes" ;; +esac +AC_MSG_RESULT([$ntp_test_ntp_signd]) +AM_CONDITIONAL([BUILD_TEST_NTP_SIGND], [test x$ntp_test_ntp_signd = xyes]) +]) +dnl ====================================================================== diff --git a/tests/ntpd/Makefile.am b/tests/ntpd/Makefile.am index dbb059fca..2cab14f4c 100644 --- a/tests/ntpd/Makefile.am +++ b/tests/ntpd/Makefile.am @@ -11,13 +11,24 @@ run_unity = cd $(srcdir) && ruby ../../sntp/unity/auto/generate_test_runner.rb check_PROGRAMS = \ test-leapsec \ test-ntp_prio_q \ - test-ntp_restrict \ - test-ntp_scanner \ - test-ntp_signd \ + $(NULL) +if BUILD_TEST_NTP_RESTRICT +check_PROGRAMS += test-ntp_restrict +endif +if BUILD_TEST_NTP_SCANNER +check_PROGRAMS += test-ntp_scanner +endif +if BUILD_TEST_NTP_SIGND +check_PROGRAMS += test-ntp_signd +endif +check_PROGRAMS += \ test-rc_cmdlength \ $(NULL) EXTRA_PROGRAMS = \ + test-ntp_restrict \ + test-ntp_scanner \ + test-ntp_signd \ $(NULL)