Merge lp:~pete-woods/indicator-network/tests-not-run-lp1612619 into lp:indicator-network

Proposed by Pete Woods
Status: Merged
Approved by: Pete Woods
Approved revision: 624
Merged at revision: 622
Proposed branch: lp:~pete-woods/indicator-network/tests-not-run-lp1612619
Merge into: lp:indicator-network
Diff against target: 98 lines (+35/-6)
3 files modified
CMakeLists.txt (+8/-0)
debian/rules (+8/-4)
tests/integration/test-indicator.cpp (+19/-2)
To merge this branch: bzr merge lp:~pete-woods/indicator-network/tests-not-run-lp1612619
Reviewer Review Type Date Requested Status
Indicator Applet Developers Pending
Review via email: mp+302916@code.launchpad.net

Commit message

Re-enable tests on all architectures

Description of the change

Re-enable tests on all architectures

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'CMakeLists.txt'
--- CMakeLists.txt 2016-06-20 11:06:20 +0000
+++ CMakeLists.txt 2016-08-17 11:48:25 +0000
@@ -113,6 +113,7 @@
113add_subdirectory(po)113add_subdirectory(po)
114add_subdirectory(doc)114add_subdirectory(doc)
115115
116if(ENABLE_TESTS)
116enable_testing()117enable_testing()
117add_subdirectory(tests)118add_subdirectory(tests)
118119
@@ -138,6 +139,13 @@
138 ${CMAKE_BINARY_DIR}/*139 ${CMAKE_BINARY_DIR}/*
139)140)
140141
142else()
143
144# The autopilot tests need this fixture
145add_subdirectory(tests/data)
146
147endif()
148
141endif()149endif()
142150
143add_subdirectory(scripts)151add_subdirectory(scripts)
144152
=== modified file 'debian/rules'
--- debian/rules 2015-12-16 11:48:00 +0000
+++ debian/rules 2016-08-17 11:48:25 +0000
@@ -7,13 +7,17 @@
77
8export DPKG_GENSYMBOLS_CHECK_LEVEL = 48export DPKG_GENSYMBOLS_CHECK_LEVEL = 4
99
10ifneq (,$(filter $(DEB_HOST_ARCH),arm64 s390x powerpc))
11 ENABLE_TESTS = OFF
12else
13 ENABLE_TESTS = ON
14endif
15
10%:16%:
11 dh $@ --parallel --fail-missing --with python317 dh $@ --parallel --fail-missing --with python3
1218
13ifneq (,filter(s390x ,$(DEB_HOST_ARCH)))19override_dh_auto_configure:
14override_dh_auto_test:20 dh_auto_configure -- -DENABLE_TESTS=${ENABLE_TESTS}
15 dh_auto_test || true
16endif
1721
18override_dh_install:22override_dh_install:
19 cd tests/autopilot; \23 cd tests/autopilot; \
2024
=== modified file 'tests/integration/test-indicator.cpp'
--- tests/integration/test-indicator.cpp 2016-07-15 11:25:21 +0000
+++ tests/integration/test-indicator.cpp 2016-08-17 11:48:25 +0000
@@ -3193,12 +3193,21 @@
31933193
3194 ASSERT_NO_THROW(startIndicator());3194 ASSERT_NO_THROW(startIndicator());
31953195
3196
3197 auto modems = con->modems();
3198 QSignalSpy rowsInsertedSpy(modems, SIGNAL(rowsInserted(const QModelIndex &, int, int)));
3199 if (modems->rowCount() == 0) {
3200 ASSERT_TRUE(rowsInsertedSpy.wait());
3201 }
3202
3203 ASSERT_EQ(1, modems->rowCount());
3204
3196 // Check that the indicator switch is enabled when we are not in flightmode3205 // Check that the indicator switch is enabled when we are not in flightmode
3197 // and there is a SIM for mobile data set.3206 // and there is a SIM for mobile data set.
31983207
3199 con->setMobileDataEnabled(true);3208 con->setMobileDataEnabled(true);
3200 con->setFlightMode(false);3209 con->setFlightMode(false);
3201 con->setSimForMobileData(getModemSim(*con->modems(), 0));3210 con->setSimForMobileData(getModemSim(*modems, 0));
32023211
3203 EXPECT_MATCHRESULT(mh::MenuMatcher(phoneParameters())3212 EXPECT_MATCHRESULT(mh::MenuMatcher(phoneParameters())
3204 .item(mh::MenuItemMatcher()3213 .item(mh::MenuItemMatcher()
@@ -3254,11 +3263,19 @@
32543263
3255 ASSERT_NO_THROW(startIndicator());3264 ASSERT_NO_THROW(startIndicator());
32563265
3266 auto modems = con->modems();
3267 QSignalSpy rowsInsertedSpy(modems, SIGNAL(rowsInserted(const QModelIndex &, int, int)));
3268 if (modems->rowCount() == 0) {
3269 ASSERT_TRUE(rowsInsertedSpy.wait());
3270 }
3271
3272 ASSERT_EQ(1, modems->rowCount());
3273
3257 // Check that Connectivity::mobileDataEnabled follows the indicator switch3274 // Check that Connectivity::mobileDataEnabled follows the indicator switch
32583275
3259 con->setMobileDataEnabled(true);3276 con->setMobileDataEnabled(true);
3260 con->setFlightMode(false);3277 con->setFlightMode(false);
3261 con->setSimForMobileData(getModemSim(*con->modems(), 0));3278 con->setSimForMobileData(getModemSim(*modems, 0));
3262 QTest::qWait(250);3279 QTest::qWait(250);
3263 QSignalSpy spy(con.get(), SIGNAL(mobileDataEnabledUpdated(bool)));3280 QSignalSpy spy(con.get(), SIGNAL(mobileDataEnabledUpdated(bool)));
32643281

Subscribers

People subscribed via source and target branches