-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
181 lines (148 loc) · 6.49 KB
/
build.gradle
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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
plugins{
id 'java'
id 'com.github.johnrengelman.shadow' version '1.2.4'
id 'de.undercouch.download' version '3.1.1' // For the download tasks
}
repositories {
jcenter()
}
dependencies {
compile fileTree(dir: 'lib', include: '*.jar')
compile fileTree(dir: 'C:/Program Files/IBM/IBMIMShared/plugins', include: '*.jar', exclude: ['org*','*eclipse*'])
compile fileTree(dir: 'C:/ProgramData/IBM/RFT/customization', include: '*.jar')
compile 'junit:junit:4.12'
}
sourceSets{
main{
java {
srcDirs = ['.']
}
}
test{
java {
srcDirs = ['.']
}
}
}
task copyTemplates(type: Copy) {
from 'templates'
into 'build/classes/main/templates'
}
task copyTemplatesTest(type: Copy) {
from 'templates'
into 'build/classes/test/templates'
}
task copyDatastore(type: Copy) {
from 'resources/DatastoreDefinition.rftdsd'
into 'build/classes/main/resources/'
}
task copyDatastoreTest(type: Copy) {
from 'resources/DatastoreDefinition.rftdsd'
into 'build/classes/test/resources/'
}
task copyMains(type: Copy) {
from 'resources/src/usi/'
exclude '*.class'
exclude '*.java'
into 'build/classes/main/resources/src/usi/'
}
task copyMainsTest(type: Copy) {
from 'resources/src/usi/'
exclude '*.class'
exclude '*.java'
into 'build/classes/test/resources/src/usi/'
}
task copyMains2(type: Copy) {
from 'src/usi/'
include '*.testsuite'
into 'build/classes/main/src/usi/'
}
task copyMains2Test(type: Copy) {
from 'src/usi/'
include '*.testsuite'
into 'build/classes/test/src/usi/'
}
task copyTestMain(type: Copy) {
from 'resources/test/rft/'
exclude '*.class'
exclude '*.java'
into 'build/classes/main/resources/test/rft/'
}
task copyTestMainTest(type: Copy) {
from 'resources/test/rft/'
exclude '*.class'
exclude '*.java'
into 'build/classes/test/resources/test/rft/'
}
task copyTestMain2(type: Copy) {
from 'test/rft/'
include '*.testsuite'
into 'build/classes/main/test/rft/'
}
task copyTestMain2Test(type: Copy) {
from 'test/rft/'
include '*.testsuite'
into 'build/classes/test/test/rft/'
}
compileJava.doLast {
tasks.copyTemplates.execute()
tasks.copyTemplatesTest.execute()
tasks.copyDatastore.execute()
tasks.copyDatastoreTest.execute()
tasks.copyMains.execute()
tasks.copyMains2.execute()
tasks.copyMainsTest.execute()
tasks.copyMains2Test.execute()
tasks.copyTestMain.execute()
tasks.copyTestMain2.execute()
tasks.copyTestMainTest.execute()
tasks.copyTestMain2Test.execute()
}
task createMain(type:Exec) {
commandLine 'cmd', '/c', "echo java -Xmx8g -Xss512m -cp \"C:\\Program Files\\IBM\\SDP\\FunctionalTester\\bin\\rational_ft.jar\";"+projectDir+"\\lib\\* com.rational.test.ft.rational_ft -datastore "+projectDir+"\\build\\classes\\main -playback src.usi.Main "+projectDir+" > Main.bat"
}
task createMainRipper(type:Exec) {
commandLine 'cmd', '/c', "echo java -Xmx8g -Xss512m -cp \"C:\\Program Files\\IBM\\SDP\\FunctionalTester\\bin\\rational_ft.jar\";"+projectDir+"\\lib\\* com.rational.test.ft.rational_ft -datastore "+projectDir+"\\build\\classes\\main -playback src.usi.RipperMain "+projectDir+" > Ripper.bat"
}
task createMainRuntestsuite(type:Exec) {
commandLine 'cmd', '/c', "echo java -Xmx8g -Xss512m -cp \"C:\\Program Files\\IBM\\SDP\\FunctionalTester\\bin\\rational_ft.jar\";"+projectDir+"\\lib\\* com.rational.test.ft.rational_ft -datastore "+projectDir+"\\build\\classes\\main -playback src.usi.RunTestsuite %1 %2 > Runtestsuite.bat"
}
build.dependsOn 'createMain'
build.dependsOn 'createMainRipper'
build.dependsOn 'createMainRuntestsuite'
task deployBuddi(type:Exec) {
commandLine 'cmd', '/c', "echo mkdir "+projectDir+"\\..\\buddi\\bin > run.bat && echo cd "+projectDir+"\\..\\buddi\\bin >> run.bat && echo jar -xf "+projectDir+"\\files\\for_test\\SUTs\\Buddi.jar >> run.bat && echo cd "+projectDir+" >> run.bat >> .\\run.bat && .\\run.bat && del /Q /F run.bat"
}
task deployUPM(type:Exec) {
commandLine 'cmd', '/c', "echo mkdir "+projectDir+"\\..\\upm\\bin > run.bat && echo cd "+projectDir+"\\..\\upm\\bin >> run.bat && echo jar -xf "+projectDir+"\\files\\for_test\\SUTs\\upm.jar >> run.bat && echo cd "+projectDir+" >> run.bat >> .\\run.bat && .\\run.bat && del /Q /F run.bat"
}
task deployUPMSmall(type:Exec) {
commandLine 'cmd', '/c', "echo mkdir "+projectDir+"\\..\\upmsmall\\bin > run.bat && echo cd "+projectDir+"\\..\\upmsmall\\bin >> run.bat && echo jar -xf "+projectDir+"\\files\\for_test\\SUTs\\upmsmall.jar >> run.bat && echo cd "+projectDir+" >> run.bat >> .\\run.bat && .\\run.bat && del /Q /F run.bat"
}
task deploySPARK(type:Exec) {
commandLine 'cmd', '/c', "echo mkdir "+projectDir+"\\..\\spark\\bin > run.bat && echo cd "+projectDir+"\\..\\spark\\bin >> run.bat && echo jar -xf "+projectDir+"\\files\\for_test\\SUTs\\spark-lib.jar >> run.bat && echo jar -xf "+projectDir+"\\files\\for_test\\SUTs\\spark.jar >> run.bat && echo cd "+projectDir+" >> run.bat >> .\\run.bat && .\\run.bat && del /Q /F run.bat"
}
task deployRACHOTA(type:Exec) {
commandLine 'cmd', '/c', "echo mkdir "+projectDir+"\\..\\rachota\\bin > run.bat && echo cd "+projectDir+"\\..\\rachota\\bin >> run.bat && echo jar -xf "+projectDir+"\\files\\for_test\\SUTs\\rachota.jar >> run.bat && echo cd "+projectDir+" >> run.bat >> .\\run.bat && .\\run.bat && del /Q /F run.bat"
}
task deployOnlineShopping(type:Exec) {
commandLine 'cmd', '/c', "echo mkdir "+projectDir+"\\..\\onlineshoppingsut\\bin > run.bat && echo cd "+projectDir+"\\..\\onlineshoppingsut\\bin >> run.bat && echo jar -xf "+projectDir+"\\files\\for_test\\SUTs\\OnlineShopping.jar >> run.bat && echo cd "+projectDir+" >> run.bat >> .\\run.bat && .\\run.bat && del /Q /F run.bat"
}
task testall(type:Exec) {
commandLine 'cmd', '/c', "java -ea -Xmx8g -Xss512m -cp \"C:\\Program Files\\IBM\\SDP\\FunctionalTester\\bin\\rational_ft.jar\";"+projectDir+"\\lib\\* com.rational.test.ft.rational_ft -datastore "+projectDir+"\\build\\classes\\main -playback test.rft.runAll "+projectDir+" 2>&1"
}
testall.dependsOn 'build'
testall.dependsOn 'deployBuddi'
testall.dependsOn 'deployUPM'
testall.dependsOn 'deployRACHOTA'
testall.dependsOn 'deployOnlineShopping'
testall.dependsOn 'deploySPARK'
task runtest(type:Exec) {
commandLine 'cmd', '/c', "java -ea -Xmx8g -Xss512m -cp \"C:\\Program Files\\IBM\\SDP\\FunctionalTester\\bin\\rational_ft.jar\";"+projectDir+"\\lib\\* com.rational.test.ft.rational_ft -datastore "+projectDir+"\\build\\classes\\main -playback test.rft.$test "+projectDir+" 2>&1"
}
runtest.dependsOn 'build'
runtest.dependsOn 'deployBuddi'
runtest.dependsOn 'deployUPM'
runtest.dependsOn 'deployRACHOTA'
runtest.dependsOn 'deployOnlineShopping'
runtest.dependsOn 'deploySPARK'