You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@logging.apache.org by rm...@apache.org on 2020/08/29 18:29:26 UTC

[logging-log4cxx] branch master updated: Search for programs needed for tests (#37)

This is an automated email from the ASF dual-hosted git repository.

rmiddleton pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/logging-log4cxx.git


The following commit(s) were added to refs/heads/master by this push:
     new 3144627  Search for programs needed for tests (#37)
3144627 is described below

commit 31446277b02220df577f1e945add2bb1f4c18a84
Author: Robert Middleton <rm...@users.noreply.github.com>
AuthorDate: Sat Aug 29 14:29:16 2020 -0400

    Search for programs needed for tests (#37)
    
    * Search for programs needed for tests
    
    * Renamed variables to not imply windows
---
 CMakeLists.txt              | 7 +++++++
 src/test/cpp/CMakeLists.txt | 7 +++++++
 2 files changed, 14 insertions(+)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index d30a71b..4763cfa 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -123,3 +123,10 @@ message(STATUS "  logchar type .................... : ${LOG4CXX_CHAR}")
 message(STATUS "  Using libESMTP .................. : ${HAS_LIBESMTP}")
 message(STATUS "  ODBC library .................... : ${HAS_ODBC}")
 message(STATUS "  syslog .......................... : ${HAS_SYSLOG}")
+
+if(BUILD_TESTING)
+message(STATUS "Applications required for tests:")
+message(STATUS "  zip ............................. : ${ZIP_APP}")
+message(STATUS "  sed ............................. : ${SED_APP}")
+message(STATUS "  gzip ............................ : ${GZIP_APP}")
+endif(BUILD_TESTING)
diff --git a/src/test/cpp/CMakeLists.txt b/src/test/cpp/CMakeLists.txt
index bdb66fe..b63c20d 100644
--- a/src/test/cpp/CMakeLists.txt
+++ b/src/test/cpp/CMakeLists.txt
@@ -5,6 +5,13 @@ target_include_directories(testingFramework PRIVATE ${CMAKE_CURRENT_LIST_DIR} $<
 add_subdirectory(util)
 target_sources(testingUtilities PRIVATE xml/xlevel.cpp)
 
+# sed, zip, and gzip are needed for the tests to work properly
+# Note: option 'required' not available until cmake 3.18, however adding
+# it does not cause an issue
+find_program(SED_APP sed REQUIRED)
+find_program(ZIP_APP zip REQUIRED)
+find_program(GZIP_APP gzip REQUIRED)
+
 # Tests defined in this directory
 set(ALL_LOG4CXX_TESTS
     asyncappendertestcase