CI testing with local files

Andreas Cord-Landwehr cordlandwehr at kde.org
Thu Jan 28 19:17:00 GMT 2021


On Donnerstag, 28. Januar 2021 10:20:54 CET Konstantin Kharlamov wrote:
> On Wed, 2021-01-27 at 17:36 -0500, Michael Reeves wrote:
> > Is there way to reading and writing small files in the CI? I'm in the
> > process of writing auto tests for kdiff3.
> 
> Your tests could create a directory inside the current one, and then inside
> the new directory do stuff like creating files, etc. So, unless I
> misunderstand your question, there's that.

Hi, best practise is to put those files into a QTemporaryDir or create them as 
QTemporaryFile to avoid contamination from a previous test run. Also you 
should not change input data during a test that will be needed unchanged for 
another test run but prefer copying it to a temporary location.

Best regards,
Andreas




More information about the kde-core-devel mailing list