qt5base-lts/tests/auto/uiloader
Rohan McGovern 173099696f tests: clean up usage of QT_CONFIG to fix circular dependencies
With modularized Qt, using QT_CONFIG is dangerous, because the behavior
changes depending on the order in which modules are qmake'd.

For example, an autotest doing:

  contains(QT_CONFIG,svg):QT += svg

...will depend on libQtSvg if (and only if) the autotest is qmake'd
_after_ qtsvg is qmake'd.

This makes the tested functionality unpredictable.
Also, if the above example occurs within qtbase, it causes the test to
sometimes have a circular dependency: if qtsvg is qmake'd before the
test is qmake'd, the test in qtbase depends on qtsvg which depends on
qtbase.

Tests must avoid functionality tests via QT_CONFIG except where all the
tested modules are dependencies of the current module.

Usage of QT_CONFIG with qt3support was entirely removed since Qt5
will not retain qt3support.

Reviewed-by: Jason McDonald
Change-Id: I5a5013b3ec7e1f38fb78864763c9e7586c15e70b
2011-05-16 13:10:00 +10:00
..
baseline Initial import from the monolithic Qt. 2011-04-27 12:05:43 +02:00
tst_screenshot Initial import from the monolithic Qt. 2011-04-27 12:05:43 +02:00
uiloader tests: clean up usage of QT_CONFIG to fix circular dependencies 2011-05-16 13:10:00 +10:00
.gitignore Initial import from the monolithic Qt. 2011-04-27 12:05:43 +02:00
desert.ini Initial import from the monolithic Qt. 2011-04-27 12:05:43 +02:00
dole.ini Initial import from the monolithic Qt. 2011-04-27 12:05:43 +02:00
gravlaks.ini Initial import from the monolithic Qt. 2011-04-27 12:05:43 +02:00
jackychan.ini Initial import from the monolithic Qt. 2011-04-27 12:05:43 +02:00
jeunehomme.ini Initial import from the monolithic Qt. 2011-04-27 12:05:43 +02:00
kangaroo.ini Initial import from the monolithic Qt. 2011-04-27 12:05:43 +02:00
kayak.ini Initial import from the monolithic Qt. 2011-04-27 12:05:43 +02:00
README.TXT Initial import from the monolithic Qt. 2011-04-27 12:05:43 +02:00
scruffy.ini Initial import from the monolithic Qt. 2011-04-27 12:05:43 +02:00
troll15.ini Initial import from the monolithic Qt. 2011-04-27 12:05:43 +02:00
tundra.ini Initial import from the monolithic Qt. 2011-04-27 12:05:43 +02:00
uiloader.pro Initial import from the monolithic Qt. 2011-04-27 12:05:43 +02:00
wartburg.ini Initial import from the monolithic Qt. 2011-04-27 12:05:43 +02:00
WTC0090dca226c8.ini Initial import from the monolithic Qt. 2011-04-27 12:05:43 +02:00

   -------------------------------------------------------------------------
         TESTING WIDGETS DEFINED IN *.UI FILES (SCREENSHOT COMPARISON)
   -------------------------------------------------------------------------
              This test is based on dev/qt/tests/auto/atwrapper/


HOW TO RUN THE TESTS

    Compile the necessary programs:
        qmake
        make

    Now there should be an executable 'uiloader'.
    Run the tests:
        ./uiloader



CONFIGURATION

    The tests can be executed on different machines. For every machine there
    is a config file <hostname>.ini.

    If this file is not available the tests won't be run on the machine.

        Example kayak.ini:

            [General]
            ftpBaseDir=/arthurtest
            ftpHost=wartburg
            ftpPass=anonymouspass
            ftpUser=anonymous
            output=testresults

            [engines]
            1\engine=uic
            size=1

    Don't modify the [engines] section. Later it will be used for styles.  The
    only thing you might want to modify is the ftpHost value. At the moment
    wartburg is just a server on which we test the tests.

    The actual test server is: kramer.troll.no



HOW IT WORKS

    There are 3 important folders:

        tst_uiloader/       Actual program executing the tests.
        tst_screenshot/     Program to generate one *.png file out of *.ui
        baseline/           This is a dir with *.ui files.
        
    ./uiloader (compiled from tst_uiloader) will use the tst_screenshot program
    and the files in baseline/.

    In order to generate screenshots the *.ui files in baseline/ will be used.
    Therefore a folder testresults/ (specified in the config) will be
    created/used.

    Structure of testresults/:
        
        |-- testresults
        |   `-- i686 Linux g++-4 full-config    That's buildKey().
        |       `-- 4.5.0                       Used Qt version.
        |           |-- uic                     Here are the generated images.
        |           |-- uic.baseline            Baseline downloaded from server.
        |           |-- uic.diff                Diff Images of failed tests.
        |           `-- uic.failed              Generated images of failed tests.

    If there is no baseline at the server the results in uic/ will be uploaded
    as a new baseline (first run for your machine). So to create a new baseline
    on the server you just need to remove your folders there.

    On the server side there is a dir /arthurtest with following structure
    (it will be created if it's not there):

        |-- arthurtest
        |   `-- <your machines hostname>
        |       `-- <buildKey()>
        |           `-- <qt version>
        |               |-- uic.baseline    Baseline.
        |               |-- uic.diff        Here the local diffs will be uploaded.
        |               `-- uic.failed      Here the local failed files will be uploaded.

    After a test run the files in local uic.diff/ and uic.failed/ will be
    uploaded to the server.

    For every run the uic.diff/ and uic.failed/ on the local and remote machine
    will be cleared in order to place new files there. On the local side uic/
    gets cleared, too.