Prevent unnecessary log messages in unit tests

This commit is contained in:
TheAssassin
2018-11-15 19:08:03 +01:00
parent beb2ee15be
commit e994eacfa0
2 changed files with 16 additions and 2 deletions

View File

@@ -5,9 +5,10 @@ add_executable(test_desktopfile
test_desktopfilereader.cpp
test_desktopfilewriter.cpp
test_desktopfile_conformance.cpp
main.cpp
)
target_link_libraries(test_desktopfile PRIVATE linuxdeploy_core_desktopfile gtest gtest_main)
target_link_libraries(test_desktopfile PRIVATE linuxdeploy_core_desktopfile gtest)
set_property(TARGET test_desktopfile
PROPERTY COMPILE_FLAGS "-DDESKTOP_FILE_PATH=\\\"${TEST_DATA_DIR}/simple_app.desktop\\\""

View File

@@ -1,2 +1,15 @@
#define
// library headers
#include <gtest/gtest.h>
// local headers
#include <linuxdeploy/core/log.h>
using namespace linuxdeploy::core::log;
int main(int argc, char** argv) {
// set loglevel to prevent unnecessary log messages
ldLog::setVerbosity(LD_ERROR);
::testing::InitGoogleTest(&argc, argv);
return RUN_ALL_TESTS();
}