summaryrefslogtreecommitdiff
path: root/tests/tests.pro
blob: 514356f315a7436e37535a16117632a6c6c2d691 (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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
TEMPLATE = subdirs

load(am-config)
requires(!disable-installer)

SUBDIRS = \
    manual \
    application \
    applicationinfo \
    main \
    runtime \
    cryptography \
    signature \
    utilities \
    installationreport \
    packagecreator \
    packageextractor \
    packager-tool \
    applicationinstaller \
    debugwrapper \
    qml \
    yaml \
    configuration \

linux*:SUBDIRS += \
    sudo \
    processreader \
    systemreader \

OTHER_FILES += \
    tests.pri \
    data/create-test-packages.sh \
    data/certificates/create-test-certificates.sh \
    data/utilities.sh \

# sadly, the appman-packager is too complex to build as a host tool
!cross_compile {
    prepareRecursiveTarget(check)
    qtPrepareTool(APPMAN_PACKAGER, appman-packager)

    unix {
        OPENSSL_HOME = $$(OPENSSL_HOME)
        !isEmpty(OPENSSL_HOME): {
            EXTRA_PATH=$$OPENSSL_HOME/bin
        }

        # create test data on the fly - this is needed for the CI server
        testdata.target = testdata
        testdata.depends = $$PWD/data/create-test-packages.sh $$APPMAN_PACKAGER_EXE
        testdata.commands = (cd $$PWD/data ;PATH=\"$$EXTRA_PATH:$$(PATH)\" ./create-test-packages.sh $$APPMAN_PACKAGER)
        QMAKE_EXTRA_TARGETS += testdata

        # qmake would create a default check target implicitly, but since we need 'testdata' as an
        # dependency, we have to set it up explicitly
        check.depends = testdata $$check.depends

        # add the first target to make sure the testdata is created already at the compile step
        first.depends = testdata
        QMAKE_EXTRA_TARGETS *= first
    }
    QMAKE_EXTRA_TARGETS *= check
}