diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/CMakeLists.txt | 5 | ||||
-rw-r--r-- | tests/unit/adbd-client-test.cpp | 4 | ||||
-rw-r--r-- | tests/unit/rotation-lock-test.cpp | 4 | ||||
-rw-r--r-- | tests/utils/test-dbus-fixture.h | 2 |
4 files changed, 9 insertions, 6 deletions
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index d5fb909..42e6cb2 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -1,4 +1,7 @@ set(CMAKE_AUTOMOC ON) + +SET(CMAKE_CXX_LINK_FLAGS "${CMAKE_CXX_LINK_FLAGS} -no-pie") + find_package(GMock REQUIRED) find_package(Qt5Core REQUIRED) find_package(Qt5Test REQUIRED) @@ -28,7 +31,7 @@ endif() add_compile_options(${CXX_WARNING_ARGS}) -add_test(cppcheck cppcheck --enable=all -USCHEMA_DIR --error-exitcode=2 --inline-suppr -I${CMAKE_SOURCE_DIR} ${CMAKE_SOURCE_DIR}/src ${CMAKE_SOURCE_DIR}/tests) +add_test(cppcheck cppcheck --enable=all -USCHEMA_DIR --error-exitcode=2 --inline-suppr --library=qt -I${CMAKE_SOURCE_DIR} -i${CMAKE_SOURCE_DIR}/tests/utils/qmain.cpp -i${CMAKE_SOURCE_DIR}/tests/gmock ${CMAKE_SOURCE_DIR}/src ${CMAKE_SOURCE_DIR}/tests --suppress=missingIncludeSystem) add_subdirectory(integration) add_subdirectory(unit) diff --git a/tests/unit/adbd-client-test.cpp b/tests/unit/adbd-client-test.cpp index d1ce740..b9e7a49 100644 --- a/tests/unit/adbd-client-test.cpp +++ b/tests/unit/adbd-client-test.cpp @@ -38,7 +38,7 @@ protected: std::shared_ptr<std::string> m_tmpdir; - void SetUp() + void SetUp() override { super::SetUp(); @@ -86,7 +86,7 @@ TEST_F(AdbdClientFixture, SocketPlumbing) EXPECT_EQ(test.expected_pk, pk); ASSERT_EQ(1, adbd_server->m_responses.size()); EXPECT_EQ(test.expected_response, adbd_server->m_responses.front()); - + // cleanup connection.disconnect(); adbd_client.reset(); diff --git a/tests/unit/rotation-lock-test.cpp b/tests/unit/rotation-lock-test.cpp index b9630b5..a5a6f6c 100644 --- a/tests/unit/rotation-lock-test.cpp +++ b/tests/unit/rotation-lock-test.cpp @@ -28,12 +28,12 @@ private: protected: - void SetUp() + void SetUp() override { super::SetUp(); } - void TearDown() + void TearDown() override { super::TearDown(); } diff --git a/tests/utils/test-dbus-fixture.h b/tests/utils/test-dbus-fixture.h index 3947e58..b01405a 100644 --- a/tests/utils/test-dbus-fixture.h +++ b/tests/utils/test-dbus-fixture.h @@ -29,7 +29,7 @@ class TestDBusFixture: public GlibFixture { public: - TestDBusFixture() =default; + explicit TestDBusFixture() {}; virtual ~TestDBusFixture() =default; explicit TestDBusFixture(const std::vector<std::string>& service_dirs_in): service_dirs(service_dirs_in) {} |