]> git.ipfire.org Git - thirdparty/ntp.git/commitdiff
Disable certain test programs on certain platforms. Harlan Stenn.
authorHarlan Stenn <stenn@ntp.org>
Tue, 29 Sep 2015 10:10:38 +0000 (06:10 -0400)
committerHarlan Stenn <stenn@ntp.org>
Tue, 29 Sep 2015 10:10:38 +0000 (06:10 -0400)
bk: 560a639eQ4U_yhZB-e36PnWSldqWDA

ChangeLog
configure.ac
sntp/m4/ntp_problemtests.m4 [new file with mode: 0644]
tests/ntpd/Makefile.am

index 266244bf2fd850831895852799484ab0e97c5865..6f4c4e268622fdaf117863f831ff58ee72f71283 100644 (file)
--- 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 <stenn@ntp.org>
 
index d0214456a3d477c84d69851d94a17053bc97b67c..42e18a49fe3720a8bffef3477ec9060a035c7ec8 100644 (file)
@@ -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 (file)
index 0000000..b1f52d3
--- /dev/null
@@ -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 ======================================================================
index dbb059fca989ad2b033120c8e20614025e5843e2..2cab14f4c722f7339b562b44c6f398f85e84bbee 100644 (file)
@@ -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)