aboutsummaryrefslogtreecommitdiffstats
path: root/share/qbs/imports/qbs/base/AutotestRunner.qbs
blob: 124ce6cd2634a8057d876e02bcf30e99f77b1e7e (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
import qbs
import qbs.ModUtils

Product {
    name: "autotest-runner"
    type: ["autotest-result"]
    builtByDefault: false
    property stringList arguments: []
    property stringList environment: ModUtils.flattenEnvironmentDictionary(
                                         qbs.commonRunEnvironment,
                                         qbs.pathListSeparator)
    property bool limitToSubProject: true
    Depends {
        productTypes: "autotest"
        limitToSubProject: product.limitToSubProject
    }
    Rule {
        inputsFromDependencies: "application"
        Artifact {
            filePath: input.filePath.replace('/', '-') + ".result.dummy" // Will never exist.
            fileTags: "autotest-result"
            alwaysUpdated: false
        }
        prepare: {
            var cmd = new Command(input.filePath, product.arguments);
            cmd.description = "Running test " + input.fileName;
            cmd.environment = product.environment;
            return cmd;
        }
    }
}