D27910: Make sure warning output is enabled before testing if the correct warning is printed

Martin Tobias Holmedahl Sandsmark noreply at phabricator.kde.org
Tue Apr 7 14:03:56 BST 2020


sandsmark abandoned this revision.
sandsmark added a comment.


  In D27910#632041 <https://phabricator.kde.org/D27910#632041>, @dfaure wrote:
  
  > Note that in both cases the env var QT_LOGGING_RULES would break the unittest anyway... so yeah it's only about qtlogging.ini which we can easily skip with test mode.
  
  
  Yeah, the issue for me was qtlogging.ini, but it's not that far fetched that the user has set QT_LOGGING_RULES manually. Because it's a bit surprising and not obvious why this fails, maybe we could check if the warnings are disabled (e. g. `if (!KArchiveLog().isWarningEnabled()) { qWarning()<< "Warnings disabled for" << KArchiveLog().categoryName() << ", the test will probably fail"; }`), if not outright calling `qunsetenv("QT_LOGGING_RULES");`

REPOSITORY
  R243 KArchive

REVISION DETAIL
  https://phabricator.kde.org/D27910

To: sandsmark, dfaure
Cc: apol, kde-frameworks-devel, LeGast00n, cblack, GB_2, michaelh, ngraham, bruns
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20200407/a0f7e854/attachment.html>


More information about the Kde-frameworks-devel mailing list