aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorRobert Tari <robert@tari.in>2021-08-04 17:08:17 +0200
committerRobert Tari <robert@tari.in>2021-08-04 17:08:17 +0200
commit53bab0ef23c8396dd6e3473593ffe027cb2d5fc4 (patch)
tree8413072aa2b936f1bdf9ed07ad5c645472161245 /tests
parent4d6d205398bec86a702ed4af9c7834b950f67c8c (diff)
parent3336228bccde7de599e7f56b4b8b67b8552c6a95 (diff)
downloadayatana-indicator-display-53bab0ef23c8396dd6e3473593ffe027cb2d5fc4.tar.gz
ayatana-indicator-display-53bab0ef23c8396dd6e3473593ffe027cb2d5fc4.tar.bz2
ayatana-indicator-display-53bab0ef23c8396dd6e3473593ffe027cb2d5fc4.zip
Merge branch 'sunweaver-pr/travis-ci'
Attributes GH PR #15: https://github.com/AyatanaIndicators/ayatana-indicator-display/pull/15
Diffstat (limited to 'tests')
-rw-r--r--tests/CMakeLists.txt5
-rw-r--r--tests/unit/adbd-client-test.cpp4
-rw-r--r--tests/unit/rotation-lock-test.cpp4
-rw-r--r--tests/utils/test-dbus-fixture.h2
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) {}