Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes for Leatherman 0.6.0 on stable #397

Merged
merged 8 commits into from
Apr 20, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion lib/src/util/posix/daemonize.cc
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ std::unique_ptr<PIDFile> 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
Expand Down
27 changes: 18 additions & 9 deletions lib/tests/main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -4,31 +4,40 @@

#include <catch.hpp>

#include <boost/nowide/iostream.hpp>

#include <vector>

// 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 <leatherman/logging/logging.hpp>
#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<std::string> { "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);
}