On Mon, 8 Jul 2019 22:13:48 +1200
Christian Gagneraud <[email protected]> wrote:

> On Mon, 8 Jul 2019 at 22:09, Christian Kandeler
> <[email protected]> wrote:
> > I don't know what you mean by "simulating a full project reload". Lots of 
> > tst_api test cases do project reloads.  
> 
> I just meant a convenience function that would handle:
>     project = qbs::Project();
>     job.reset(nullptr);
>     buildJob.reset(nullptr);
>     removeBuildDir(setupParams);
>     setupParams.setProjectFilePath(
>         QDir::cleanPath(m_workingDataDir +
> "/project-editing/toplevelproject.qbs"));
>     job.reset(project.setupProject(setupParams, m_logSink, nullptr));
>     waitForFinished(job.get());
>     QVERIFY2(!job->error().hasError(), qPrintable(job->error().toString()));
> 
> So far, that how my "full reload" is implemented (read: copy/pasted),
> and i will want to do that b/w 5 and 10 times.

*shrug* Whatever you need there. But note that you cannot use any
QVERIFYs etc in such functions, as they won't be able to abort your test. 
Perhaps take a look at 
doBuildProject() for inspiration.

Christian
_______________________________________________
Qbs mailing list
[email protected]
https://lists.qt-project.org/listinfo/qbs

Reply via email to