blob: b8f42b4b2f3642b405b5b88065a119649fcb696d (
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
63
64
65
66
67
68
69
70
71
|
import "helper.js" as Helper
Project {
property bool fail1: false
property bool fail2: false
property bool fail3: false
property bool fail4: false
property bool fail5: false
property bool fail6: false
property bool fail7: false
Product {
name: "myproduct"
type: ["foo", "bar"]
Rule {
multiplex: true
Artifact {
fileTags: ["foo"]
filePath: {
var path = "foo";
if (project.fail1)
throw "fail1";
return path;
}
}
prepare: {
var cmd = new JavaScriptCommand();
cmd.sourceCode = function () {
};
cmd.silent = true;
if (project.fail2)
generate.an.error;
if (project.fail6)
Helper.doSomethingEvil();
return cmd;
}
}
Rule {
multiplex: true
outputFileTags: ["bar"]
outputArtifacts: {
var list = [];
list.push({ fileTags: ["bar"], filePath: "bar" });
if (project.fail3)
throw "fail3";
if (project.fail5)
Helper.doSomethingBad();
return list;
}
prepare: {
var cmd = new JavaScriptCommand();
cmd.fail7 = project.fail7;
cmd.sourceCode = function () {
if (fail7)
will.fail;
};
cmd.silent = true;
if (project.fail4)
generate.an.error;
return cmd;
}
}
}
}
|