Merge lp:~michihenning/unity-scopes-api/fix-chroot-tests into lp:unity-scopes-api

Proposed by Michi Henning
Status: Merged
Approved by: Paweł Stołowski
Approved revision: 318
Merged at revision: 318
Proposed branch: lp:~michihenning/unity-scopes-api/fix-chroot-tests
Merge into: lp:unity-scopes-api
Diff against target: 85 lines (+22/-9)
4 files modified
debian/changelog (+7/-7)
src/scopes/internal/RuntimeImpl.cpp (+7/-2)
test/gtest/scopes/ResultCache/ResultCache_test.cpp (+7/-0)
test/gtest/scopes/stress/Runtime.ini.in (+1/-0)
To merge this branch: bzr merge lp:~michihenning/unity-scopes-api/fix-chroot-tests
Reviewer Review Type Date Requested Status
Paweł Stołowski (community) Approve
PS Jenkins bot (community) continuous-integration Approve
Review via email: mp+249916@code.launchpad.net

Commit message

Fixed bogus test failure when running the tests in a chroot without apparmor. Fixed compiler warning about unused return value. Fixed too-long lines in changelog that caused noise from lintian.

Description of the change

Fixed bogus test failure when running the tests in a chroot without apparmor. Fixed compiler warning about unused return value. Fixed too-long lines in changelog that caused noise from lintian.

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Paweł Stołowski (stolowski) wrote :

Looks ok to me. +1

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'debian/changelog'
--- debian/changelog 2015-02-13 10:36:27 +0000
+++ debian/changelog 2015-02-23 05:06:41 +0000
@@ -1,14 +1,14 @@
1unity-scopes-api (0.6.14+15.04.20150213-0ubuntu1) vivid; urgency=medium1unity-scopes-api (0.6.14+15.04.20150213-0ubuntu1) vivid; urgency=medium
22
3 [ Michi Henning ]3 [ Michi Henning ]
4 * Added push_surfacing_results_from_cache() to Reply proxy. This allows a scope4 * Added push_surfacing_results_from_cache() to Reply proxy. This allows
5 to reply the results of the last succesful surfacing query from an on-disk cache.5 a scope to reply the results of the last succesful surfacing query
6 This is useful to prevent the user being presented with an empty screen when6 from an on-disk cache. This is useful to prevent the user being
7 swiping to the scope while the device has no network access, or the scope's7 presented with an empty screen when swiping to the scope while the
8 data source is off-line.8 device has no network access, or the scope's data source is off-line.
99
10 Note: This is change is ABI compatible with gcc and clang despite the addition 10 Note: This is change is ABI compatible with gcc and clang despite
11 a new virtual function.11 the addition a new virtual function.
12 * Fixed sporadic failure in JsonAsyncReader test caused by slow DNS.12 * Fixed sporadic failure in JsonAsyncReader test caused by slow DNS.
13 Improved tests to report exception details if an exception other13 Improved tests to report exception details if an exception other
14 than the expected one is thrown.14 than the expected one is thrown.
1515
=== modified file 'src/scopes/internal/RuntimeImpl.cpp'
--- src/scopes/internal/RuntimeImpl.cpp 2015-02-04 06:07:15 +0000
+++ src/scopes/internal/RuntimeImpl.cpp 2015-02-23 05:06:41 +0000
@@ -562,13 +562,18 @@
562{562{
563 auto is_confined = []563 auto is_confined = []
564 {564 {
565 // Find out whether we are confined. aa_getcon() returns -1 in that case.565 // Find out whether we are confined. aa_getcon() returns -1 with EACCESS in that case.
566 char* con = nullptr;566 char* con = nullptr;
567 char* mode;567 char* mode;
568 int rc = aa_getcon(&con, &mode);568 int rc = aa_getcon(&con, &mode);
569 int error = errno;
570 if (rc == -1)
571 {
572 cerr << "aa_getcon failed, errno = " << error << endl;
573 }
569 // Only con (not mode) must be deallocated574 // Only con (not mode) must be deallocated
570 free(con);575 free(con);
571 return rc == -1;576 return rc == -1 && error == EACCES;
572 };577 };
573 static bool confined = is_confined();578 static bool confined = is_confined();
574 return confined;579 return confined;
575580
=== modified file 'test/gtest/scopes/ResultCache/ResultCache_test.cpp'
--- test/gtest/scopes/ResultCache/ResultCache_test.cpp 2015-02-05 09:35:42 +0000
+++ test/gtest/scopes/ResultCache/ResultCache_test.cpp 2015-02-23 05:06:41 +0000
@@ -167,6 +167,11 @@
167 EXPECT_FALSE(boost::filesystem::exists(TEST_RUNTIME_PATH "/unconfined/CacheScope/.surfacing_cache", ec));167 EXPECT_FALSE(boost::filesystem::exists(TEST_RUNTIME_PATH "/unconfined/CacheScope/.surfacing_cache", ec));
168}168}
169169
170// Stop warnings about unused return value from system()
171
172#pragma GCC diagnostic push
173#pragma GCC diagnostic ignored "-Wunused-result"
174
170TEST_F(CacheScopeTest, surfacing_query)175TEST_F(CacheScopeTest, surfacing_query)
171{176{
172 ::unlink(TEST_RUNTIME_PATH "/unconfined/CacheScope/.surfacing_cache");177 ::unlink(TEST_RUNTIME_PATH "/unconfined/CacheScope/.surfacing_cache");
@@ -187,6 +192,8 @@
187 system("cat " TEST_RUNTIME_PATH "/unconfined/CacheScope/.surfacing_cache");192 system("cat " TEST_RUNTIME_PATH "/unconfined/CacheScope/.surfacing_cache");
188}193}
189194
195#pragma GCC diagnostic pop
196
190// Run another non-surfacing query before checking that the cache contains the197// Run another non-surfacing query before checking that the cache contains the
191// results of the last surfacing query.198// results of the last surfacing query.
192199
193200
=== modified file 'test/gtest/scopes/stress/Runtime.ini.in'
--- test/gtest/scopes/stress/Runtime.ini.in 2014-12-09 04:37:59 +0000
+++ test/gtest/scopes/stress/Runtime.ini.in 2015-02-23 05:06:41 +0000
@@ -4,4 +4,5 @@
4Default.Middleware = Zmq4Default.Middleware = Zmq
5Zmq.ConfigFile = @CMAKE_CURRENT_BINARY_DIR@/Zmq.ini5Zmq.ConfigFile = @CMAKE_CURRENT_BINARY_DIR@/Zmq.ini
6Smartscopes.Registry.Identity =6Smartscopes.Registry.Identity =
7CacheDir=@CMAKE_CURRENT_BINARY_DIR@
7LogDir=8LogDir=

Subscribers

People subscribed via source and target branches

to all changes: