[Kde-pim] Review Request 109434: starts and shutdon gpg-agent for tests
Sandro Knauß
mail at sandroknauss.de
Mon Mar 11 23:30:57 GMT 2013
> On March 11, 2013, 7:23 p.m., Kevin Krammer wrote:
> > messagecore/tests/util.cpp, line 40
> > <http://git.reviewboard.kde.org/r/109434/diff/1/?file=119323#file119323line40>
> >
> > this looks wrong.
> > this will exit when the timeout occurs, not when data becomes available for reading. the following code suggest that it wants to read though
* you are right waitForReadyRead is wrong but i need a waitForFinished. QProcess is a non blocking class, and if there is no such while loop, i don't get the output from gpg-agent, i testet it. readAllStandardOutput also doesn't block until the process is finished (http://qt-project.org/doc/qt-4.8/qprocess.html#readAllStandardOutput )
* execute is not the solution, 'cause this will push output to stdout/stderr and can't be grabed.
* i used now the sample from http://qt-project.org/doc/qt-4.8/qprocess.html#synchronous-process-api
- Sandro
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/109434/#review29019
-----------------------------------------------------------
On March 11, 2013, 7:06 p.m., Sandro Knauß wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/109434/
> -----------------------------------------------------------
>
> (Updated March 11, 2013, 7:06 p.m.)
>
>
> Review request for KDEPIM.
>
>
> Description
> -------
>
> starts and shutdon gpg-agent for tests
>
> To make sure that encryt test can run automatically f.ex. on jenkins a
> running gpg-agent is nessaccary.
>
> The gpg-agent is started via QProcess and will be killed afterwards.
>
>
> Diffs
> -----
>
> messageviewer/tests/unencryptedmessagetest.cpp 5e4ab2cc22aca347871e09f01a6fc25b512609ad
> messageviewer/tests/rendertest.cpp 87f35c6e1a706ea21ef8aaea139cbd552d6e3a0e
> messageviewer/tests/objecttreeparsertest.cpp fa9672b4d2249b509a84a3ff90829fd427a08e9c
> messageviewer/tests/objecttreeparsertest.h df6a49fd731b31960f3b39859d09487ff40f5766
> messagecore/tests/util.cpp 5dbc89c165995fa348bb7c7966de0809d74f0208
> messagecore/tests/util.h 6807a51789ee25a4d75b811751424fb28a464aed
> messagecomposer/tests/signjobtest.cpp ce20db6d7a1c1d92cd77b43b1058bf4969074730
> messagecomposer/tests/signjobtest.h 07c38d1f4ba42693036f8eee5cb8492aa830f625
> messagecomposer/tests/signencrypttest.cpp a4ef6a7cd3ffdc4617132dc1aaaa35a1fd975d32
> messagecomposer/tests/signencrypttest.h 941de3191eb961e781670606eb057e377a669426
> messagecomposer/tests/encryptjobtest.cpp 3cdced3bbb167eef1574333b44c7ad7472bf502b
> messagecomposer/tests/encryptjobtest.h bfda50739fdbef4c161534be17111c0427b3d09d
> messagecomposer/tests/cryptocomposertest.cpp b398975f17e72031fd503645654fc0db03f413c1
> messagecomposer/tests/cryptocomposertest.h 3862eea3eff43b10d9109d4ff1ddcdfa725f13ed
>
> Diff: http://git.reviewboard.kde.org/r/109434/diff/
>
>
> Testing
> -------
>
> grep MessageCore::Test::getKeys
> grep MessageCore::Test::setupEnv
>
> unset GPG_AGENT_INFO
> unset GNUPGHOME
>
> cd messagecomposer && make test
> cd messageviewer && make test
>
> ps aux | grep gpg-agent
>
>
> Thanks,
>
> Sandro Knauß
>
>
_______________________________________________
KDE PIM mailing list kde-pim at kde.org
https://mail.kde.org/mailman/listinfo/kde-pim
KDE PIM home page at http://pim.kde.org/
More information about the kde-pim
mailing list