From 95e90e99d4fd6bd63133297d473319cd79116e64 Mon Sep 17 00:00:00 2001 From: "Alexander A. Klimov" Date: Fri, 19 Jul 2019 16:07:29 +0200 Subject: [PATCH] Tests: _Exit() in main() refs #7334 --- test/test-runner.cpp | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/test/test-runner.cpp b/test/test-runner.cpp index 1a7c6dd57..fac41ea70 100644 --- a/test/test-runner.cpp +++ b/test/test-runner.cpp @@ -1,5 +1,21 @@ /* Icinga 2 | (c) 2012 Icinga GmbH | GPLv2+ */ -#define BOOST_TEST_MAIN +#define BOOST_TEST_MODULE icinga2 +#define BOOST_TEST_NO_MAIN +#define BOOST_TEST_ALTERNATIVE_INIT_API #include +#include +#include + +int BOOST_TEST_CALL_DECL +main(int argc, char **argv) +{ + std::_Exit(boost::unit_test::unit_test_main(init_unit_test, argc, argv)); + return EXIT_FAILURE; +} + +#ifdef _WIN32 +#include +#include +#endif /* _WIN32 */