aboutsummaryrefslogtreecommitdiffstats
path: root/tests/manual/qmlplugindump/README
blob: 537afbba6e004446682df23206254a3bda42aaae (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
Tests for qmlplugindump
-----------------------

The test are executed by compiling a series of sample projects and
running qmlplugindump on them, checking the generated plugin.qmltypes
files.  Each test, except `builtins`, need a sample project in order
to be executed.  A test is defined by:

    - test name
    - sample project name
    - sample project version
    - expected results

That means that different tests can use the same sample project, but
it is not possible to define a test that use more than one sample.
Test definitions are stored in the folder `definitions` as json files;
the file name is the test name, tests are executed in lexicographical
order on their names, and the contents defines the other properties in
the following format:

    {
        "project": <project-name>,
        "version": <version>,
        "expected": [<regexp-patterns>*],
    }

where _project-name_, _version_, and _regexp-patterns_ are strings.

The first two parameters are used to invoke qmlplugindump:

    qmlplugindump -nonrelocatable <uri> <version> <path>

where:

    <uri> = tests.dumper.<project-name>
    <path> = <test-root>

therefore, it is important that the sample projects resides in
a subdirectory of `tests/dumper` named as the project itself.

The last parameter is a list of regular expression patterns that
must match the `plugin.qmltypes` produced by qmlplugindump.