From e3da13d1fe9ad623e05aec1977c813e7da37cedd Mon Sep 17 00:00:00 2001 From: Christian Mollekopf Date: Thu, 7 Jul 2016 11:46:45 +0200 Subject: Fail quickly if the backend is not available --- tests/mailsynctest.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'tests/mailsynctest.cpp') diff --git a/tests/mailsynctest.cpp b/tests/mailsynctest.cpp index e70e34e..faaf003 100644 --- a/tests/mailsynctest.cpp +++ b/tests/mailsynctest.cpp @@ -34,6 +34,7 @@ using namespace Sink::ApplicationDomain; void MailSyncTest::initTestCase() { Test::initTest(); + QVERIFY(isBackendAvailable()); Log::setDebugOutputLevel(Sink::Log::Trace); resetTestEnvironment(); auto resource = createResource(); -- cgit v1.2.3 From 7ac1e222090ecfaa27ea8de2950e8c98a5033137 Mon Sep 17 00:00:00 2001 From: Christian Mollekopf Date: Thu, 7 Jul 2016 11:57:43 +0200 Subject: Fix imap tests after trash addition --- tests/mailsynctest.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'tests/mailsynctest.cpp') diff --git a/tests/mailsynctest.cpp b/tests/mailsynctest.cpp index faaf003..953adbf 100644 --- a/tests/mailsynctest.cpp +++ b/tests/mailsynctest.cpp @@ -197,6 +197,10 @@ void MailSyncTest::testListFolderHierarchy() QVERIFY(names.contains("Drafts")); names.removeAll("Drafts"); } + if (mCapabilities.contains(ResourceCapabilities::Mail::trash)) { + QVERIFY(names.contains("Trash")); + names.removeAll("Trash"); + } QCOMPARE(names.size(), 3); QCOMPARE(map.value("sub")->getParent(), map.value("test")->identifier()); }); -- cgit v1.2.3 From da2b049e248c1ad7efeb53685158a205335e4e36 Mon Sep 17 00:00:00 2001 From: Christian Mollekopf Date: Thu, 7 Jul 2016 22:23:49 +0200 Subject: A new debug system. Instead of a single #define as debug area the new system allows for an identifier for each debug message with the structure component.area. The component is a dot separated identifier of the runtime component, such as the process or the plugin. The area is the code component, and can be as such defined at compiletime. The idea of this system is that it becomes possible to i.e. look at the output of all messages in the query subsystem of a specific resource (something that happens in the client process, but in the resource-specific subcomponent). The new macros are supposed to be less likely to clash with other names, hence the new names. --- tests/mailsynctest.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'tests/mailsynctest.cpp') diff --git a/tests/mailsynctest.cpp b/tests/mailsynctest.cpp index 953adbf..4401f27 100644 --- a/tests/mailsynctest.cpp +++ b/tests/mailsynctest.cpp @@ -31,6 +31,8 @@ using namespace Sink; using namespace Sink::ApplicationDomain; +SINK_DEBUG_AREA("mailsynctest") + void MailSyncTest::initTestCase() { Test::initTest(); @@ -73,7 +75,7 @@ void MailSyncTest::testListFolders() for (const auto &folder : folders) { names << folder->getName(); } - Trace() << "base folder: " << names; + SinkTrace() << "base folder: " << names; baseCount = folders.size(); }); VERIFYEXEC(job); -- cgit v1.2.3 From 9317fbffeab4a8c258acb1116eb12fbded7053d8 Mon Sep 17 00:00:00 2001 From: Christian Mollekopf Date: Fri, 8 Jul 2016 11:01:48 +0200 Subject: Control debugoutput during tests with sinksh. --- tests/mailsynctest.cpp | 1 - 1 file changed, 1 deletion(-) (limited to 'tests/mailsynctest.cpp') diff --git a/tests/mailsynctest.cpp b/tests/mailsynctest.cpp index 4401f27..4b797c8 100644 --- a/tests/mailsynctest.cpp +++ b/tests/mailsynctest.cpp @@ -37,7 +37,6 @@ void MailSyncTest::initTestCase() { Test::initTest(); QVERIFY(isBackendAvailable()); - Log::setDebugOutputLevel(Sink::Log::Trace); resetTestEnvironment(); auto resource = createResource(); QVERIFY(!resource.identifier().isEmpty()); -- cgit v1.2.3