Prepare environment to be able to test grantleeheaderstyle.
ClosedPublic

Authored by knauss on Sep 24 2018, 12:57 PM.

Details

Test Plan

run grantleeheaderstyleplugin against examples.

Diff Detail

Repository
R81 KDE PIM Addons
Branch
dev
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 6627
Build 6645: arc lint + arc unit
knauss created this revision.Sep 24 2018, 12:57 PM
Restricted Application added a project: KDE PIM. · View Herald TranscriptSep 24 2018, 12:57 PM
Restricted Application added a subscriber: kde-pim. · View Herald Transcript
knauss requested review of this revision.Sep 24 2018, 12:57 PM

@dfaure: you made tests form frameworks run without installing, so maybe there are already some ecm foo available for that...

dfaure requested changes to this revision.Oct 4 2018, 2:15 AM

No ECM foo for local copying, so this CMakeLists.txt looks fine to me.

plugins/messageviewerheaderplugins/autotests/grantleeheaderstyleplugintest.cpp
46

KDEHOME? This isn't 2011 anymore. Nothing uses KDEHOME anymore, you can remove that.

QStandardPaths::setTestModeEnabled(true); would be a better thing to call here instead.

47

Note that this will have no effect on Windows, so for now you'll have to skip anything that relies on this, if Q_OS_WIN.

A proper fix (QT_DATA_DIRS) is coming soon hopefully.

109

No way to QCOMPARE that?

Right now this method looks suspiciously like the previous one...

This revision now requires changes to proceed.Oct 4 2018, 2:15 AM
knauss added inline comments.Oct 4 2018, 1:03 PM
plugins/messageviewerheaderplugins/autotests/grantleeheaderstyleplugintest.cpp
46

but with QStandardPaths::setTestModeEnabled(true); i have no control over the XDG_DATA_HOME, so how I know on cmake where to copy files?

47

Any ideas how to get it working on widows, too?

109

the test initself it not ready - I'll plan a complete test of the grantlee header files. But befor doing that I need a propper way to access the files. That's why I did not implemented the test completly on that review request.

knauss updated this revision to Diff 48652.Jan 4 2019, 12:02 AM

Make the "prepare enviornemt" solution more bullet proof taking comments into account.

dfaure accepted this revision.Feb 3 2019, 12:45 PM
dfaure added inline comments.
plugins/messageviewerheaderplugins/autotests/grantleeheaderstyleplugintest.cpp
47

Installing the files in one the dirs returned for GenericDataLocation, see QStandardPaths documentation.

$QT_DATA_DIRS was shot down.

This revision is now accepted and ready to land.Feb 3 2019, 12:45 PM
knauss closed this revision.Mar 25 2019, 7:38 PM
knauss reopened this revision.

messup different Review requests

This revision is now accepted and ready to land.Mar 25 2019, 7:39 PM
This revision was automatically updated to reflect the committed changes.