[Development] Tests, Shadow-Build and Cross-Compilation

Jedrzej Nowacki jedrzej.nowacki at nokia.com
Tue Jan 31 09:36:40 CET 2012


On Sunday 29. January 2012 21.21.12 ext Olivier Goffart wrote:
> On Sunday 29 January 2012 21:13:25 Holger Hans Peter Freyther wrote:
> > Hi all,
> > 
> > I finally got around to play with my personal jenkins[1] setup again,
> > specially to learn (and be kind of an example on how a non Tier1 platform
> > could ever become one).
> > 
> > There are some issues and I would like to discuss how these can be solved
> > in a way that doesn't look like an ad-hoc solution and that might scale.
> > 
> > I will mumble about the Problems, the Ad-Hoc solutions and muse about a
> > fix...
> > 
> > Problems:
> >   Shadow builds:
> > I always liked shadow builds as I could have several Qt configurations
> > but a command/shared source directory (e.g. X11, QWS, for i386 and ARM).
> > It is quite common for tests to break in shadow builds (the QA page in
> > the wiki discourages this as well).
> 
> Yes, the wiki recommands not to use shadowbuild because it often do not
> work. (I had the problem today again while trying to run qlibrary
> autotest)
> 
> [...]
> 
> > Musing:
> > So somehow cross-compilation and shadow-builds suffer from the same
> > problem that accessing files from the source directory with a relative
> > path. One proposal would be to use something like
> > 'QDir::addSearchPath("testdata", SRCDIR)'" and have it set to the path
> > of the .pro file, and access everything using the prefix. Danimo
> > mentioned that this will fail for multimedia that might not use the Qt
> > resource system. So we might want to have a method in the testlib to
> > resolve a path like "testdata:foo" to a proper path? For cross compiling
> > one could change the testdata prefix with a command line option or
> > environment variable?
> > 
> > The other part/wish would be to always have deployment targets for the
> > testcases and generate a run script or such as part of the installation.
> 
> There is QFINDTESTDATA and QTest::qFindTestData that have been added
> recently, I think for this reason.  Have you heard of them?

Hi,

  Another solution which works nice is to use RESOURCES and rcc to compile 
your data into executable. It is shadow build friendly.

Cheers,
  Jędrek
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/development/attachments/20120131/52320673/attachment.html>


More information about the Development mailing list