]> git.ipfire.org Git - thirdparty/ntp.git/commitdiff
Unity test framework fixes
authorHarlan Stenn <stenn@ntp.org>
Tue, 19 May 2015 09:33:10 +0000 (09:33 +0000)
committerHarlan Stenn <stenn@ntp.org>
Tue, 19 May 2015 09:33:10 +0000 (09:33 +0000)
bk: 555b03567V-dTk2ppUtBqhRSNv8lXw

ChangeLog
configure.ac
sntp/configure.ac
sntp/m4/ntp_unitytest.m4 [new file with mode: 0644]

index 362d998347904c12bb72eeccefc3a28f84dfc44d..1fc33182713b421a0bb71396f9e88838338601aa 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,6 @@
 ---
 
+* Unity test framework fixes.
 * Initial support for PACKAGE_VERSION tests.
 ---
 (4.2.8p3-RC1) 2015/05/12 Released by Harlan Stenn <stenn@ntp.org>
index 30b1cad48042fd009cf4ed69e248c336641829ff..9b687b960af0e63c6e15757f865ba46027c32284 100644 (file)
@@ -65,6 +65,7 @@ ntp_jupiter_ok=${ntp_jupiter_ok=no}
 
 NTP_PROG_CC
 AC_PROG_CPP
+# Do we need CXX for anything besides google test?
 AC_PROG_CXX
 AC_PROG_YACC
 AC_PROG_CC_C_O
@@ -4342,6 +4343,8 @@ esac
 AM_CONDITIONAL([SAVECONFIG_ENABLED], [test x$ntp_saveconfig_enabled = x1])
 AC_MSG_RESULT([$ntp_ok])
 
+NTP_UNITYTEST
+
 dnl  gtest is needed for our tests subdirs. It would be nice if we could
 dnl  require a C++ compiler only if we will use gtest, but AC_PROG_CXX
 dnl  can't be conditionalized.
index 1b0e1e87727b9b11c27c216394a9b1f21d251a38..0462fb1ccb06aa06e05b12525c85fbc815ecb89c 100644 (file)
@@ -137,6 +137,7 @@ AC_DEFINE([HAVE_TERMIOS], 1, [sntp does not care about TTY stuff])
 # Checks for library functions.
 AC_CHECK_FUNCS([socket])
 
+NTP_UNITYTEST
 # HMS: if we don't find c++ we should not look for gtest.
 AC_PROG_CXX
 NTP_GOOGLETEST
diff --git a/sntp/m4/ntp_unitytest.m4 b/sntp/m4/ntp_unitytest.m4
new file mode 100644 (file)
index 0000000..1f18535
--- /dev/null
@@ -0,0 +1,19 @@
+dnl ######################################################################
+dnl NTP_UNITYBUILD -  Unity build support
+dnl shared by top-level and sntp/configure.ac
+AC_DEFUN([NTP_UNITYBUILD], [
+# We may not need have_unity
+have_unity=false
+AC_PATH_PROG([ruby])
+case "$PATH_RUBY" in
+ /*)
+    have_unity=true
+    ;;
+ *) PATH_RUBY="false"
+    ;;
+esac
+# We may not need UNITYBUILD_AVAILABLE
+AM_CONDITIONAL([UNITYBUILD_AVAILABLE], [$have_unity])
+
+])
+dnl ======================================================================