Re: [Qbs] Qt Quick Tests and custom import paths

2018-05-31 Thread Federico Frenguelli
This is amazing! And it is exactly what I am doing now using a custom module and a custom test runner! Thanks On Thu, 31 May 2018 at 11:23, Christian Kandeler wrote: > On Tue, 15 May 2018 15:19:49 +0200 > Federico Frenguelli wrote: > > > I'm writing a test for a qt quick component and I need

Re: [Qbs] Qt Quick Tests and custom import paths

2018-05-31 Thread Christian Kandeler
On Tue, 15 May 2018 15:19:49 +0200 Federico Frenguelli wrote: > I'm writing a test for a qt quick component and I need to add "qrc:/qml" to > the qml import paths. > One way would be to add custom arguments to the AutotestRunner: > > AutotestRunner { > arguments: ["-import", "qrc:/qml"] > }

Re: [Qbs] Qt Quick Tests and custom import paths

2018-05-17 Thread Christian Kandeler
unction in a rule is a bit more involved (and requires the master branch). Christian >   > __ > > Od: Christian Kandeler <christian.kande...@qt.io> > > Komu: qbs@qt-project.org > > Datum: 17.05.2018 10:25

Re: [Qbs] Qt Quick Tests and custom import paths

2018-05-17 Thread resurrection
018 10:25 Předmět: Re: [Qbs] Qt Quick Tests and custom import paths On Wed, 16 May 2018 18:01:40 +0200 Federico Frenguelli <synas...@gmail.com> wrote: > > If functions were properly supported as properties, there'd be a simple > > generic solution: > > > > Autotes

Re: [Qbs] Qt Quick Tests and custom import paths

2018-05-17 Thread Federico Frenguelli
> What do you mean by that? > > > Is it possible to access a product's properties from the artifact? > > Artifact objects have a "product" property, which gives you the product > object. > My idea was to define a custom property in the test Product like the "qmlImportPaths" property that is used

Re: [Qbs] Qt Quick Tests and custom import paths

2018-05-17 Thread Christian Kandeler
On Thu, 17 May 2018 10:57:31 +0200 Federico Frenguelli wrote: > On Thu, 17 May 2018 at 10:25, Christian Kandeler > wrote: > > > On Wed, 16 May 2018 18:01:40 +0200 > > Federico Frenguelli wrote: > > > > > > If functions were

Re: [Qbs] Qt Quick Tests and custom import paths

2018-05-17 Thread Federico Frenguelli
On Thu, 17 May 2018 at 10:25, Christian Kandeler wrote: > On Wed, 16 May 2018 18:01:40 +0200 > Federico Frenguelli wrote: > > > > If functions were properly supported as properties, there'd be a simple > > > generic solution: > > > > > >

Re: [Qbs] Qt Quick Tests and custom import paths

2018-05-17 Thread Christian Kandeler
On Wed, 16 May 2018 18:01:40 +0200 Federico Frenguelli wrote: > > If functions were properly supported as properties, there'd be a simple > > generic solution: > > > > AutotestRunner { > > additionalArgsFunc: function(testArtifact) { > > var myArgs = []; > >

Re: [Qbs] Qt Quick Tests and custom import paths

2018-05-16 Thread Federico Frenguelli
> If functions were properly supported as properties, there'd be a simple > generic solution: > > AutotestRunner { > additionalArgsFunc: function(testArtifact) { > var myArgs = []; > var additionalImportPaths = > testArtifact.quickpaths.additionalImportPaths; > for

Re: [Qbs] Qt Quick Tests and custom import paths

2018-05-16 Thread Federico Frenguelli
I finally found a solution which I want to report here, so that we can start a discussion and maybe improve the state of Qt Quick tests in QBS. This is a toy project that shows what I did: https://github.com/synasius/prefect-qtquick-tests If you checkout the first commit and run "qbs build -p

Re: [Qbs] Qt Quick Tests and custom import paths

2018-05-15 Thread Christian Kandeler
On Tue, 15 May 2018 15:19:49 +0200 Federico Frenguelli wrote: > I'm writing a test for a qt quick component and I need to add "qrc:/qml" to > the qml import paths. > One way would be to add custom arguments to the AutotestRunner: > > AutotestRunner { > arguments:

[Qbs] Qt Quick Tests and custom import paths

2018-05-15 Thread Federico Frenguelli
Hi everyone, I'm writing a test for a qt quick component and I need to add "qrc:/qml" to the qml import paths. One way would be to add custom arguments to the AutotestRunner: AutotestRunner { arguments: ["-import", "qrc:/qml"] } but then tests fail when I mix cpp tests with qt quick tests.