Module: check_mk
Branch: master
Commit: 83fc13c9c3edd2fb02afc90d7418cd46da5a6ed1
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=83fc13c9c3edd2…
Author: Jukka Aro <ja(a)mathias-kettner.de>
Date: Mon Feb 5 11:53:06 2018 +0100
Windows: fix make target 'check' and wmitest build
---
agents/windows/Makefile.am | 2 +-
agents/windows/build-agent | 7 +++++++
agents/windows/wmitest.cc | 6 ++++--
3 files changed, 12 insertions(+), 3 deletions(-)
diff --git a/agents/windows/Makefile.am b/agents/windows/Makefile.am
index 4446ef2..47e1584 100644
--- a/agents/windows/Makefile.am
+++ b/agents/windows/Makefile.am
@@ -112,7 +112,7 @@ WindowsAgentTest_SOURCES = \
test/sections/SectionLogwatchTest.cc \
test/sections/SectionMRPETest.cc
-wmitest_SOURCES = wmitest.cc stringutil.cc WinApi.cc wmiHelper.cc
+wmitest_SOURCES = Logger.cc WinApi.cc stringutil.cc wmiHelper.cc wmitest.cc
CLEANFILES = \
*.ico *.res *.rc config.* stamp-* Makefile \
diff --git a/agents/windows/build-agent b/agents/windows/build-agent
index b64c4d9..0a04c7c 100755
--- a/agents/windows/build-agent
+++ b/agents/windows/build-agent
@@ -30,9 +30,16 @@ if [[ " $targets " =~ " integrationtest "
&& "$targets" != integrationtest ]] ;
exit 1
fi
+if [[ " $targets " =~ " check " && "$targets" !=
check ]] ; then
+ echo "check cannot be combined with other targets"
+ exit 1
+fi
+
if [[ "$targets" == unittest || "$targets" == integrationtest ]] ;
then
# Only unittest or integrationtest
build_archs=()
+elif [[ "$targets" == check ]] ; then
+ build_archs=(64)
elif [[ " $targets " =~ " unittest " ]] ; then
# unittest together with other target(s)
targets=${targets/unittest/}
diff --git a/agents/windows/wmitest.cc b/agents/windows/wmitest.cc
index 7e1c84e..be81b68 100644
--- a/agents/windows/wmitest.cc
+++ b/agents/windows/wmitest.cc
@@ -1,5 +1,6 @@
#include <algorithm>
#include <string>
+#include "Logger.h"
#include "WinApi.h"
#include "stringutil.h"
#include "wmiHelper.h"
@@ -18,7 +19,7 @@ void print_usage(const char *exe_name) {
}
void print_namespace(const std::wstring &path, int depth = 0) {
- wmi::Helper helper(winapi, path.c_str());
+ wmi::Helper helper(Logger::getLogger("wmitest"), winapi, path.c_str());
std::string offset = std::string(depth * 2, ' ');
{
@@ -48,7 +49,8 @@ void print_namespace(const std::wstring &path, int depth = 0) {
}
void print_table(const std::string &ns, const std::string &pattern) {
- wmi::Helper helper(winapi, to_utf16(ns.c_str(), winapi).c_str());
+ wmi::Helper helper(Logger::getLogger("wmitest"), winapi,
+ to_utf16(ns.c_str(), winapi).c_str());
wmi::Result result = helper.query(L"SELECT * FROM meta_class");
bool more = result.valid();