Merge lp:~michihenning/storage-framework/remove-gio-dep into lp:storage-framework/devel

Proposed by Michi Henning
Status: Merged
Approved by: James Henstridge
Approved revision: 120
Merged at revision: 122
Proposed branch: lp:~michihenning/storage-framework/remove-gio-dep
Merge into: lp:storage-framework/devel
Diff against target: 331 lines (+45/-62)
9 files modified
CMakeLists.txt (+0/-1)
debian/changelog (+2/-1)
demo/provider_test/provider-test.cpp (+9/-9)
src/local-provider/CMakeLists.txt (+0/-2)
src/local-provider/LocalProvider.cpp (+17/-35)
src/local-provider/LocalProvider.h (+4/-0)
src/provider/internal/PendingJobs.cpp (+5/-0)
tests/local-provider/local-provider_test.cpp (+6/-13)
tests/registry/registry_test.cpp (+2/-1)
To merge this branch: bzr merge lp:~michihenning/storage-framework/remove-gio-dep
Reviewer Review Type Date Requested Status
James Henstridge Approve
unity-api-1-bot continuous-integration Approve
Review via email: mp+320762@code.launchpad.net

Commit message

Removed dependency on libgio by using QMimeDatabase to detect content type.
Fixed a bunch of compiler warnings on zesty.

Description of the change

Removed dependency on libgio by using QMimeDatabase to detect content type.
Fixed a bunch of compiler warnings on zesty.

To post a comment you must log in.
Revision history for this message
unity-api-1-bot (unity-api-1-bot) wrote :

PASSED: Continuous integration, rev:119
https://jenkins.canonical.com/unity-api-1/job/lp-storage-framework-ci/270/
Executed test runs:
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build/1857
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-0-fetch/1864
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=amd64,release=xenial+overlay/1640
        deb: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=amd64,release=xenial+overlay/1640/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=amd64,release=zesty/1640
        deb: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=amd64,release=zesty/1640/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=armhf,release=xenial+overlay/1640
        deb: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=armhf,release=xenial+overlay/1640/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=armhf,release=zesty/1640
        deb: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=armhf,release=zesty/1640/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=i386,release=xenial+overlay/1640
        deb: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=i386,release=xenial+overlay/1640/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=i386,release=zesty/1640
        deb: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=i386,release=zesty/1640/artifact/output/*zip*/output.zip

Click here to trigger a rebuild:
https://jenkins.canonical.com/unity-api-1/job/lp-storage-framework-ci/270/rebuild

review: Approve (continuous-integration)
120. By Michi Henning

Merged devel and updated changelog.

Revision history for this message
unity-api-1-bot (unity-api-1-bot) wrote :

PASSED: Continuous integration, rev:120
https://jenkins.canonical.com/unity-api-1/job/lp-storage-framework-ci/272/
Executed test runs:
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build/1882
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-0-fetch/1889
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=amd64,release=xenial+overlay/1671
        deb: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=amd64,release=xenial+overlay/1671/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=amd64,release=zesty/1671
        deb: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=amd64,release=zesty/1671/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=armhf,release=xenial+overlay/1671
        deb: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=armhf,release=xenial+overlay/1671/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=armhf,release=zesty/1671
        deb: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=armhf,release=zesty/1671/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=i386,release=xenial+overlay/1671
        deb: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=i386,release=xenial+overlay/1671/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=i386,release=zesty/1671
        deb: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=i386,release=zesty/1671/artifact/output/*zip*/output.zip

Click here to trigger a rebuild:
https://jenkins.canonical.com/unity-api-1/job/lp-storage-framework-ci/272/rebuild

review: Approve (continuous-integration)
Revision history for this message
James Henstridge (jamesh) wrote :

Looks good.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'CMakeLists.txt'
--- CMakeLists.txt 2017-03-29 05:53:32 +0000
+++ CMakeLists.txt 2017-03-30 00:57:41 +0000
@@ -123,7 +123,6 @@
123123
124include(FindPkgConfig)124include(FindPkgConfig)
125pkg_check_modules(APPARMOR_DEPS REQUIRED libapparmor)125pkg_check_modules(APPARMOR_DEPS REQUIRED libapparmor)
126pkg_check_modules(GIO_DEPS REQUIRED gio-2.0 gio-unix-2.0)
127pkg_check_modules(GLIB_DEPS REQUIRED glib-2.0)126pkg_check_modules(GLIB_DEPS REQUIRED glib-2.0)
128pkg_check_modules(ONLINEACCOUNTS_DEPS REQUIRED OnlineAccountsQt)127pkg_check_modules(ONLINEACCOUNTS_DEPS REQUIRED OnlineAccountsQt)
129128
130129
=== modified file 'debian/changelog'
--- debian/changelog 2017-03-29 02:22:03 +0000
+++ debian/changelog 2017-03-30 00:57:41 +0000
@@ -1,6 +1,7 @@
1storage-framework (0.4+17.04.20170320.1-0ubuntu2) UNRELEASED; urgency=medium1storage-framework (0.4+17.04.20170320.1-0ubuntu2) UNRELEASED; urgency=medium
22
3 * 3 [ Michi Henning ]
4 * Removed dependency on libgio.
45
5 -- Michi Henning <michi.henning@canonical.com> Wed, 29 Mar 2017 12:21:40 +10006 -- Michi Henning <michi.henning@canonical.com> Wed, 29 Mar 2017 12:21:40 +1000
67
78
=== modified file 'demo/provider_test/provider-test.cpp'
--- demo/provider_test/provider-test.cpp 2017-03-16 03:30:18 +0000
+++ demo/provider_test/provider-test.cpp 2017-03-30 00:57:41 +0000
@@ -99,7 +99,7 @@
99{99{
100}100}
101101
102boost::future<ItemList> MyProvider::roots(vector<string> const& keys, Context const& ctx)102boost::future<ItemList> MyProvider::roots(vector<string> const& /* keys */, Context const& ctx)
103{103{
104 printf("roots() called by %s (%d)\n", ctx.security_label.c_str(), ctx.pid);104 printf("roots() called by %s (%d)\n", ctx.security_label.c_str(), ctx.pid);
105 fflush(stdout);105 fflush(stdout);
@@ -110,7 +110,7 @@
110}110}
111111
112boost::future<tuple<ItemList,string>> MyProvider::list(112boost::future<tuple<ItemList,string>> MyProvider::list(
113 string const& item_id, string const& page_token, vector<string> const& keys,113 string const& item_id, string const& page_token, vector<string> const& /* keys */,
114 Context const& ctx)114 Context const& ctx)
115{115{
116 printf("list('%s', '%s') called by %s (%d)\n", item_id.c_str(), page_token.c_str(), ctx.security_label.c_str(), ctx.pid);116 printf("list('%s', '%s') called by %s (%d)\n", item_id.c_str(), page_token.c_str(), ctx.security_label.c_str(), ctx.pid);
@@ -138,7 +138,7 @@
138}138}
139139
140boost::future<ItemList> MyProvider::lookup(140boost::future<ItemList> MyProvider::lookup(
141 string const& parent_id, string const& name, vector<string> const& keys, Context const& ctx)141 string const& parent_id, string const& name, vector<string> const& /* keys */, Context const& ctx)
142{142{
143 printf("lookup('%s', '%s') called by %s (%d)\n", parent_id.c_str(), name.c_str(), ctx.security_label.c_str(), ctx.pid);143 printf("lookup('%s', '%s') called by %s (%d)\n", parent_id.c_str(), name.c_str(), ctx.security_label.c_str(), ctx.pid);
144 fflush(stdout);144 fflush(stdout);
@@ -161,7 +161,7 @@
161}161}
162162
163boost::future<Item> MyProvider::metadata(string const& item_id,163boost::future<Item> MyProvider::metadata(string const& item_id,
164 vector<string> const& keys,164 vector<string> const& /* keys */,
165 Context const& ctx)165 Context const& ctx)
166{166{
167 printf("metadata('%s') called by %s (%d)\n", item_id.c_str(), ctx.security_label.c_str(), ctx.pid);167 printf("metadata('%s') called by %s (%d)\n", item_id.c_str(), ctx.security_label.c_str(), ctx.pid);
@@ -189,7 +189,7 @@
189}189}
190190
191boost::future<Item> MyProvider::create_folder(191boost::future<Item> MyProvider::create_folder(
192 string const& parent_id, string const& name, vector<string> const& keys,192 string const& parent_id, string const& name, vector<string> const& /* keys */,
193 Context const& ctx)193 Context const& ctx)
194{194{
195 printf("create_folder('%s', '%s') called by %s (%d)\n", parent_id.c_str(), name.c_str(), ctx.security_label.c_str(), ctx.pid);195 printf("create_folder('%s', '%s') called by %s (%d)\n", parent_id.c_str(), name.c_str(), ctx.security_label.c_str(), ctx.pid);
@@ -206,7 +206,7 @@
206206
207boost::future<unique_ptr<UploadJob>> MyProvider::create_file(207boost::future<unique_ptr<UploadJob>> MyProvider::create_file(
208 string const& parent_id, string const& name,208 string const& parent_id, string const& name,
209 int64_t size, string const& content_type, bool allow_overwrite, vector<string> const& keys,209 int64_t size, string const& content_type, bool allow_overwrite, vector<string> const& /* keys */,
210 Context const& ctx)210 Context const& ctx)
211{211{
212 printf("create_file('%s', '%s', %" PRId64 ", '%s', %d) called by %s (%d)\n", parent_id.c_str(), name.c_str(), size, content_type.c_str(), allow_overwrite, ctx.security_label.c_str(), ctx.pid);212 printf("create_file('%s', '%s', %" PRId64 ", '%s', %d) called by %s (%d)\n", parent_id.c_str(), name.c_str(), size, content_type.c_str(), allow_overwrite, ctx.security_label.c_str(), ctx.pid);
@@ -215,7 +215,7 @@
215}215}
216216
217boost::future<unique_ptr<UploadJob>> MyProvider::update(217boost::future<unique_ptr<UploadJob>> MyProvider::update(
218 string const& item_id, int64_t size, string const& old_etag, vector<string> const& keys, Context const& ctx)218 string const& item_id, int64_t size, string const& old_etag, vector<string> const& /* keys */, Context const& ctx)
219{219{
220 printf("update('%s', %" PRId64 ", '%s') called by %s (%d)\n", item_id.c_str(), size, old_etag.c_str(), ctx.security_label.c_str(), ctx.pid);220 printf("update('%s', %" PRId64 ", '%s') called by %s (%d)\n", item_id.c_str(), size, old_etag.c_str(), ctx.security_label.c_str(), ctx.pid);
221 fflush(stdout);221 fflush(stdout);
@@ -250,7 +250,7 @@
250250
251boost::future<Item> MyProvider::move(251boost::future<Item> MyProvider::move(
252 string const& item_id, string const& new_parent_id,252 string const& item_id, string const& new_parent_id,
253 string const& new_name, vector<string> const& keys, Context const& ctx)253 string const& new_name, vector<string> const& /* keys */, Context const& ctx)
254{254{
255 printf("move('%s', '%s', '%s') called by %s (%d)\n", item_id.c_str(), new_parent_id.c_str(), new_name.c_str(), ctx.security_label.c_str(), ctx.pid);255 printf("move('%s', '%s', '%s') called by %s (%d)\n", item_id.c_str(), new_parent_id.c_str(), new_name.c_str(), ctx.security_label.c_str(), ctx.pid);
256 fflush(stdout);256 fflush(stdout);
@@ -260,7 +260,7 @@
260260
261boost::future<Item> MyProvider::copy(261boost::future<Item> MyProvider::copy(
262 string const& item_id, string const& new_parent_id,262 string const& item_id, string const& new_parent_id,
263 string const& new_name, vector<string> const& keys, Context const& ctx)263 string const& new_name, vector<string> const& /* keys */, Context const& ctx)
264{264{
265 printf("copy('%s', '%s', '%s') called by %s (%d)\n", item_id.c_str(), new_parent_id.c_str(), new_name.c_str(), ctx.security_label.c_str(), ctx.pid);265 printf("copy('%s', '%s', '%s') called by %s (%d)\n", item_id.c_str(), new_parent_id.c_str(), new_name.c_str(), ctx.security_label.c_str(), ctx.pid);
266 fflush(stdout);266 fflush(stdout);
267267
=== modified file 'src/local-provider/CMakeLists.txt'
--- src/local-provider/CMakeLists.txt 2017-03-17 04:59:44 +0000
+++ src/local-provider/CMakeLists.txt 2017-03-30 00:57:41 +0000
@@ -10,7 +10,6 @@
10target_include_directories(local-provider-lib PRIVATE10target_include_directories(local-provider-lib PRIVATE
11 ${Qt5Network_INCLUDE_DIRS}11 ${Qt5Network_INCLUDE_DIRS}
12 ${GLIB_DEPS_INCLUDE_DIRS}12 ${GLIB_DEPS_INCLUDE_DIRS}
13 ${GIO_DEPS_INCLUDE_DIRS}
14)13)
1514
16set_target_properties(local-provider-lib PROPERTIES15set_target_properties(local-provider-lib PROPERTIES
@@ -27,7 +26,6 @@
27 storage-framework-provider26 storage-framework-provider
28 Qt5::Network27 Qt5::Network
29 ${GLIB_DEPS_LIBRARIES}28 ${GLIB_DEPS_LIBRARIES}
30 ${GIO_DEPS_LIBRARIES}
31)29)
3230
33install(31install(
3432
=== modified file 'src/local-provider/LocalProvider.cpp'
--- src/local-provider/LocalProvider.cpp 2017-03-17 04:59:44 +0000
+++ src/local-provider/LocalProvider.cpp 2017-03-30 00:57:41 +0000
@@ -27,12 +27,6 @@
2727
28#include <boost/algorithm/string.hpp>28#include <boost/algorithm/string.hpp>
2929
30#pragma GCC diagnostic push
31#pragma GCC diagnostic ignored "-Wold-style-cast"
32#include <gio/gio.h>
33#include <glib.h>
34#pragma GCC diagnostic pop
35
36using namespace unity::storage::provider;30using namespace unity::storage::provider;
37using namespace std;31using namespace std;
3832
@@ -141,34 +135,6 @@
141 return buf;135 return buf;
142}136}
143137
144string get_content_type(string const& filename)
145{
146 using namespace unity::storage::internal;
147
148 static string const unknown_content_type = "application/octet-stream";
149
150 gobj_ptr<GFile> file(g_file_new_for_path(filename.c_str()));
151 assert(file); // Cannot fail according to doc.
152
153 GError* err = nullptr;
154 gobj_ptr<GFileInfo> full_info(g_file_query_info(file.get(),
155 G_FILE_ATTRIBUTE_STANDARD_FAST_CONTENT_TYPE,
156 G_FILE_QUERY_INFO_NONE,
157 /* cancellable */ NULL,
158 &err));
159 if (!full_info)
160 {
161 return unknown_content_type; // LCOV_EXCL_LINE
162 }
163
164 string content_type = g_file_info_get_attribute_string(full_info.get(), G_FILE_ATTRIBUTE_STANDARD_FAST_CONTENT_TYPE);
165 if (content_type.empty())
166 {
167 return unknown_content_type; // LCOV_EXCL_LINE
168 }
169 return content_type;
170}
171
172// Simple wrapper template that deals with exception handling so we don't138// Simple wrapper template that deals with exception handling so we don't
173// have to repeat ourselves endlessly in the various lambdas below.139// have to repeat ourselves endlessly in the various lambdas below.
174// The auto deduction of the return type requires C++ 14.140// The auto deduction of the return type requires C++ 14.
@@ -568,7 +534,7 @@
568 meta.insert({USED_SPACE_BYTES, int64_t(info.capacity - info.available)});534 meta.insert({USED_SPACE_BYTES, int64_t(info.capacity - info.available)});
569535
570 meta.insert({LAST_MODIFIED_TIME, iso_mtime});536 meta.insert({LAST_MODIFIED_TIME, iso_mtime});
571 meta.insert({CONTENT_TYPE, get_content_type(item_id)});537 meta.insert({CONTENT_TYPE, get_content_type(item_id, type)});
572538
573 auto perms = st.permissions();539 auto perms = st.permissions();
574 bool writable;540 bool writable;
@@ -584,3 +550,19 @@
584550
585 return Item{ item_id, parents, name, etag, type, meta };551 return Item{ item_id, parents, name, etag, type, meta };
586}552}
553
554string LocalProvider::get_content_type(string const& filename, unity::storage::ItemType type) const
555{
556 if (type != unity::storage::ItemType::file)
557 {
558 return "inode/directory";
559 }
560
561 auto mime_type = mime_db_.mimeTypeForFile(QString::fromStdString(filename), QMimeDatabase::MatchExtension);
562 if (!mime_type.isValid())
563 {
564 return "application/octet-stream"; // LCOV_EXCL_LINE
565 }
566
567 return mime_type.name().toStdString();
568}
587569
=== modified file 'src/local-provider/LocalProvider.h'
--- src/local-provider/LocalProvider.h 2017-03-14 07:11:40 +0000
+++ src/local-provider/LocalProvider.h 2017-03-30 00:57:41 +0000
@@ -21,6 +21,7 @@
21#include <unity/storage/provider/ProviderBase.h>21#include <unity/storage/provider/ProviderBase.h>
2222
23#include <boost/filesystem.hpp>23#include <boost/filesystem.hpp>
24#include <QMimeDatabase>
2425
25class LocalProvider : public unity::storage::provider::ProviderBase26class LocalProvider : public unity::storage::provider::ProviderBase
26{27{
@@ -80,5 +81,8 @@
80 boost::filesystem::file_status const& st) const;81 boost::filesystem::file_status const& st) const;
8182
82private:83private:
84 std::string get_content_type(std::string const& filename, unity::storage::ItemType type) const;
85
83 boost::filesystem::path const root_;86 boost::filesystem::path const root_;
87 QMimeDatabase mime_db_;
84};88};
8589
=== modified file 'src/provider/internal/PendingJobs.cpp'
--- src/provider/internal/PendingJobs.cpp 2016-09-06 04:41:17 +0000
+++ src/provider/internal/PendingJobs.cpp 2017-03-30 00:57:41 +0000
@@ -175,6 +175,9 @@
175 }175 }
176}176}
177177
178#pragma GCC diagnostic push
179#pragma GCC diagnostic ignored "-Wattributes"
180
178template<typename Job>181template<typename Job>
179void PendingJobs::cancel_job(shared_ptr<Job> const& job, string const& identifier)182void PendingJobs::cancel_job(shared_ptr<Job> const& job, string const& identifier)
180{183{
@@ -203,6 +206,8 @@
203 });206 });
204}207}
205208
209#pragma GCC diagnostic pop
210
206}211}
207}212}
208}213}
209214
=== modified file 'tests/local-provider/local-provider_test.cpp'
--- tests/local-provider/local-provider_test.cpp 2017-03-17 07:06:29 +0000
+++ tests/local-provider/local-provider_test.cpp 2017-03-30 00:57:41 +0000
@@ -259,12 +259,12 @@
259 ASSERT_EQ(5, root.metadata().size());259 ASSERT_EQ(5, root.metadata().size());
260 auto free_space_bytes = root.metadata().value("free_space_bytes").toULongLong();260 auto free_space_bytes = root.metadata().value("free_space_bytes").toULongLong();
261 cout << "free_space_bytes: " << free_space_bytes << endl;261 cout << "free_space_bytes: " << free_space_bytes << endl;
262 EXPECT_GT(free_space_bytes, 0);262 EXPECT_GT(free_space_bytes, uint64_t(0));
263 auto used_space_bytes = root.metadata().value("used_space_bytes").toULongLong();263 auto used_space_bytes = root.metadata().value("used_space_bytes").toULongLong();
264 cout << "used_space_bytes: " << used_space_bytes << endl;264 cout << "used_space_bytes: " << used_space_bytes << endl;
265 EXPECT_GT(used_space_bytes, 0);265 EXPECT_GT(used_space_bytes, uint64_t(0));
266 auto content_type = root.metadata().value("content_type").toString();266 auto content_type = root.metadata().value("content_type").toString();
267 EXPECT_EQ("inode/directory", content_type);267 EXPECT_EQ("inode/directory", content_type.toStdString());
268 auto writable = root.metadata().value("writable").toBool();268 auto writable = root.metadata().value("writable").toBool();
269 EXPECT_TRUE(writable);269 EXPECT_TRUE(writable);
270270
@@ -336,7 +336,7 @@
336 Item child = job->item();336 Item child = job->item();
337 unique_ptr<VoidJob> delete_job(child.deleteItem());337 unique_ptr<VoidJob> delete_job(child.deleteItem());
338 wait(delete_job.get());338 wait(delete_job.get());
339 ASSERT_EQ(ItemJob::Finished, delete_job->status()) << delete_job->error().errorString().toStdString();339 ASSERT_EQ(VoidJob::Finished, delete_job->status()) << delete_job->error().errorString().toStdString();
340340
341 struct stat st;341 struct stat st;
342 ASSERT_EQ(-1, stat(child.itemId().toStdString().c_str(), &st));342 ASSERT_EQ(-1, stat(child.itemId().toStdString().c_str(), &st));
@@ -383,7 +383,7 @@
383383
384 auto fut = p->metadata(ROOT_DIR(), {}, provider::Context());384 auto fut = p->metadata(ROOT_DIR(), {}, provider::Context());
385 auto item = fut.get();385 auto item = fut.get();
386 EXPECT_EQ(5, item.metadata.size());386 EXPECT_EQ(uint64_t(5), item.metadata.size());
387387
388 // Again, to get coverage for the "not file or folder" case in make_item().388 // Again, to get coverage for the "not file or folder" case in make_item().
389 ASSERT_EQ(0, mknod((ROOT_DIR() + "/pipe").c_str(), S_IFIFO | 06666, 0));389 ASSERT_EQ(0, mknod((ROOT_DIR() + "/pipe").c_str(), S_IFIFO | 06666, 0));
@@ -431,7 +431,7 @@
431431
432 job.reset(root.lookup("child"));432 job.reset(root.lookup("child"));
433 wait(job.get());433 wait(job.get());
434 EXPECT_EQ(ItemJob::Error, job->status());434 EXPECT_EQ(ItemListJob::Error, job->status());
435 EXPECT_EQ(string("NotExists: lookup(): \"") + ROOT_DIR() + "/child\": boost::filesystem::canonical: "435 EXPECT_EQ(string("NotExists: lookup(): \"") + ROOT_DIR() + "/child\": boost::filesystem::canonical: "
436 + "No such file or directory: \"" + ROOT_DIR() + "/child\"",436 + "No such file or directory: \"" + ROOT_DIR() + "/child\"",
437 job->error().errorString().toStdString());437 job->error().errorString().toStdString());
@@ -1456,13 +1456,6 @@
1456{1456{
1457 setenv("LANG", "C", true);1457 setenv("LANG", "C", true);
14581458
1459 // Test test fixture repeatedly creates and tears down the dbus connection.
1460 // The provider calls g_file_new_for_path() which talks to the GVfs backend
1461 // via dbus. If the dbus connection disappears, that causes GIO to send a
1462 // a SIGTERM, killing the test.
1463 // Setting GIO_USE_VFS variable to "local" disables sending the signal.
1464 setenv("GIO_USE_VFS", "local", true);
1465
1466 QCoreApplication app(argc, argv);1459 QCoreApplication app(argc, argv);
14671460
1468 ::testing::InitGoogleTest(&argc, argv);1461 ::testing::InitGoogleTest(&argc, argv);
14691462
=== modified file 'tests/registry/registry_test.cpp'
--- tests/registry/registry_test.cpp 2017-03-17 09:43:46 +0000
+++ tests/registry/registry_test.cpp 2017-03-30 00:57:41 +0000
@@ -27,9 +27,10 @@
2727
28#pragma GCC diagnostic push28#pragma GCC diagnostic push
29#pragma GCC diagnostic ignored "-Wold-style-cast"29#pragma GCC diagnostic ignored "-Wold-style-cast"
30#pragma GCC diagnostic ignored "-Wctor-dtor-privacy"
30#include <glib.h>31#include <glib.h>
32#include <gtest/gtest.h>
31#pragma GCC diagnostic pop33#pragma GCC diagnostic pop
32#include <gtest/gtest.h>
33#include <QCoreApplication>34#include <QCoreApplication>
34#include <QDBusConnection>35#include <QDBusConnection>
35#include <QDBusMessage>36#include <QDBusMessage>

Subscribers

People subscribed via source and target branches

to all changes: