diff --git a/.travis.yml b/.travis.yml index 72f65231..eb7e060d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -38,7 +38,7 @@ env: - PYTHONUSERBASE=$USERDIR - PATH=$USERDIR/bin:$PATH - LD_LIBRARY_PATH=$USERDIR/lib:$LD_LIBRARY_PATH - - LEATHERMAN_VERSION=0.4.2 + - LEATHERMAN_VERSION=0.6.0 - CPP_PCP_CLIENT_VERSION=master matrix: - TRAVIS_TARGET=CPPCHECK diff --git a/README.md b/README.md index 0f38bb7c..3f83f46b 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,7 @@ Dependencies - Boost - OpenSSL - ruby (2.0 and newer) - - [leatherman][leatherman] (0.3.5 or newer) + - [leatherman][leatherman] (0.5.1 or newer) - [cpp-pcp-client][cpp-pcp-client] (master) Initial Setup diff --git a/appveyor.yml b/appveyor.yml index 1b240030..51f247fa 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,5 +1,5 @@ environment: - LEATHERMAN_VERSION: 0.4.2 + LEATHERMAN_VERSION: 0.6.0 install: - choco install -y mingw-w64 -Version 4.8.3 -source https://www.myget.org/F/puppetlabs diff --git a/lib/src/util/posix/daemonize.cc b/lib/src/util/posix/daemonize.cc index f531e475..28866c84 100644 --- a/lib/src/util/posix/daemonize.cc +++ b/lib/src/util/posix/daemonize.cc @@ -264,7 +264,7 @@ std::unique_ptr daemonize() { // Set PIDFile dtor to clean itself up and return pointer for RAII pidf_ptr->cleanupWhenDone(); - return std::move(pidf_ptr); + return pidf_ptr; } } // namespace Util diff --git a/lib/tests/main.cc b/lib/tests/main.cc index 40d8c6b8..4f3c046c 100644 --- a/lib/tests/main.cc +++ b/lib/tests/main.cc @@ -4,31 +4,40 @@ #include +#include + +#include + // To enable log messages: // #define ENABLE_LOGGING #ifdef ENABLE_LOGGING -#define LEATHERMAN_LOGGING_NAMESPACE "puppetlabs.pegasus.test" +#define LEATHERMAN_LOGGING_NAMESPACE "puppetlabs.cpp_pcp_client.test" #include #endif -int main(int argc, char* const argv[]) { +int main(int argc, char** argv) { #ifdef ENABLE_LOGGING + leatherman::logging::setup_logging(boost::nowide::cout); leatherman::logging::set_level(leatherman::logging::log_level::debug); #endif - // configure the Catch session and start it - Catch::Session test_session; - test_session.applyCommandLine(argc, argv); + // Create the Catch session, pass CL args, and start it + Catch::Session test_session {}; - // To list the reporters use: + // NOTE(ale): to list the reporters use: // test_session.configData().listReporters = true; - // Reporters: "xml", "junit", "console", "compact" - test_session.configData().reporterName = "console"; + // NOTE(ale): out of the box, Reporters are "xml", "junit", "console", + // and "compact" (single line); "console" is the default + // test_session.configData().reporterNames = + // std::vector { "xml" }; // ShowDurations::Always, ::Never, ::DefaultForReporter test_session.configData().showDurations = Catch::ShowDurations::Always; - return test_session.run(); + // NOTE(ale): enforcing ConfigData::useColour == UseColour::No + // on Windows is not necessary; the default ::Auto works fine + + return test_session.run(argc, argv); }