Skip to content

Commit

Permalink
fix mingw
Browse files Browse the repository at this point in the history
  • Loading branch information
gcontini committed Nov 17, 2020
1 parent 7d26894 commit f7f0ba4
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 17 deletions.
27 changes: 15 additions & 12 deletions test/library/os/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,19 @@ target_link_libraries( test_network

ADD_TEST(NAME test_network COMMAND test_network)

add_executable( test_dmi_info dmi_info_test.cpp "dmi_info_test.cpp")

target_link_libraries( test_dmi_info
licensecc_static
Boost::unit_test_framework
Boost::filesystem
Boost::system
)

ADD_TEST(NAME test_dmi_info COMMAND test_dmi_info)
IF(NOT DEFINED MINGW)
add_executable( test_dmi_info dmi_info_test.cpp "dmi_info_test.cpp")
target_link_libraries( test_dmi_info
licensecc_static
Boost::unit_test_framework
Boost::filesystem
Boost::system
)
ADD_TEST(NAME test_dmi_info COMMAND test_dmi_info)
ENDIF(NOT DEFINED MINGW)

add_executable( test_execution_environment
execution_environment_test.cpp
execution_environment_test.cpp
)

target_link_libraries( test_execution_environment
Expand All @@ -36,7 +36,10 @@ target_link_libraries( test_execution_environment
ADD_TEST(NAME test_execution_environment COMMAND test_execution_environment)

if(CODE_COVERAGE AND UNIX)
target_compile_options(test_dmi_info PUBLIC -O0 -g --coverage)
IF(NOT DEFINED MINGW)
target_compile_options(test_dmi_info PUBLIC -O0 -g --coverage)
ENDIF(NOT DEFINED MINGW)

target_compile_options(test_execution_environment PUBLIC -O0 -g --coverage)
target_compile_options(test_network PUBLIC -O0 -g --coverage)
endif(CODE_COVERAGE AND UNIX)
Expand Down
8 changes: 3 additions & 5 deletions test/library/os/dmi_info_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,16 @@
#include <boost/test/unit_test.hpp>
#include "../../../src/library/os/dmi_info.hpp"


namespace license {
namespace test {
using namespace std;

BOOST_AUTO_TEST_CASE(dmi_info) {
os::DmiInfo dmiInfo;

BOOST_CHECK_MESSAGE(dmiInfo.bios_vendor().size()>0, "Bios vendor OK");
BOOST_CHECK_MESSAGE(dmiInfo.bios_description().size() > 0, "Bios description OK");
BOOST_CHECK_MESSAGE(dmiInfo.sys_vendor().size() > 0, "Sys vendor OK");

BOOST_CHECK_MESSAGE(dmiInfo.bios_vendor().size() > 0, "Bios vendor length >0");
BOOST_CHECK_MESSAGE(dmiInfo.bios_description().size() > 0, "Bios description length >0");
BOOST_CHECK_MESSAGE(dmiInfo.sys_vendor().size() > 0, "Sys vendor length >0");
}

} // namespace test
Expand Down

0 comments on commit f7f0ba4

Please sign in to comment.