From 205c71575c272a685011c641a33d26cf66cf60a0 Mon Sep 17 00:00:00 2001 From: gcontini <1121667+gcontini@users.noreply.github.com> Date: 周一, 10 2月 2020 05:01:07 +0800 Subject: [PATCH] fix unit test with old versions of boost --- src/library/os/linux/execution_environment.cpp | 2 +- test/library/os/network_test.cpp | 2 +- src/library/os/os.h | 1 - src/library/pc_identifier/ethernet.cpp | 4 ++-- 4 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/library/os/linux/execution_environment.cpp b/src/library/os/linux/execution_environment.cpp index 9744e27..bbddd75 100644 --- a/src/library/os/linux/execution_environment.cpp +++ b/src/library/os/linux/execution_environment.cpp @@ -94,7 +94,7 @@ return result; } -bool ExecutionEnvironment::is_cloud() { return getCloudProvider() == NONE; } +bool ExecutionEnvironment::is_cloud() { return getCloudProvider() != ON_PREMISE; } bool ExecutionEnvironment::is_docker() { return (checkContainerProc() == 1 || checkSystemdContainer() == 1); } diff --git a/src/library/os/os.h b/src/library/os/os.h index e8d6863..9fda7c7 100644 --- a/src/library/os/os.h +++ b/src/library/os/os.h @@ -35,7 +35,6 @@ FUNCTION_RETURN getDiskInfos(DiskInfo* diskInfos, size_t* disk_info_size); FUNCTION_RETURN getUserHomePath(char[MAX_PATH]); FUNCTION_RETURN getModuleName(char buffer[MAX_PATH]); -// FUNCTION_RETURN getCpuId(unsigned char identifier[6]); FUNCTION_RETURN getMachineName(unsigned char identifier[6]); /** * Get an identifier of the machine in an os specific way. diff --git a/src/library/pc_identifier/ethernet.cpp b/src/library/pc_identifier/ethernet.cpp index 219969a..80bb4b7 100644 --- a/src/library/pc_identifier/ethernet.cpp +++ b/src/library/pc_identifier/ethernet.cpp @@ -9,8 +9,8 @@ #include <array> #include <vector> -#include "../../../include/licensecc/datatypes.h" -#include "../../../projects/DEFAULT/include/licensecc/DEFAULT/licensecc_properties.h" +#include <licensecc/datatypes.h> +#include <licensecc_properties.h> #include "../base/base.h" #include "../os/network.hpp" #include "pc_identifier.hpp" diff --git a/test/library/os/network_test.cpp b/test/library/os/network_test.cpp index b917914..49705c6 100644 --- a/test/library/os/network_test.cpp +++ b/test/library/os/network_test.cpp @@ -23,7 +23,7 @@ FUNCTION_RETURN result = getAdapterInfos(adapters); ExecutionEnvironment exec_env; if (result != FUNC_RET_OK && exec_env.is_docker()) { - BOOST_TEST_INFO("detected docker environment, not having network interfaces is normal here"); + BOOST_TEST_MESSAGE("detected docker environment, not having network interfaces is normal here"); return; } BOOST_CHECK_EQUAL(result, FUNC_RET_OK); -- Gitblit v1.9.1