| 6914 |
dpurdie |
1 |
package com.erggroup.buildtool.utf;
|
|
|
2 |
|
|
|
3 |
|
|
|
4 |
import java.sql.SQLException;
|
|
|
5 |
import java.util.ArrayList;
|
|
|
6 |
import java.util.Date;
|
| 7048 |
dpurdie |
7 |
import java.util.Iterator;
|
| 6914 |
dpurdie |
8 |
|
|
|
9 |
import com.erggroup.buildtool.daemon.BuildDaemon;
|
|
|
10 |
import com.erggroup.buildtool.daemon.BuildThread;
|
|
|
11 |
import com.erggroup.buildtool.daemon.MasterThread;
|
|
|
12 |
import com.erggroup.buildtool.daemon.SlaveThread;
|
|
|
13 |
import com.erggroup.buildtool.ripple.BuildFile;
|
|
|
14 |
import com.erggroup.buildtool.ripple.BuildFile.BuildFileState;
|
|
|
15 |
import com.erggroup.buildtool.ripple.BuildStandard;
|
|
|
16 |
import com.erggroup.buildtool.ripple.ReleaseConfig;
|
|
|
17 |
import com.erggroup.buildtool.ripple.ReleaseManager;
|
|
|
18 |
import com.erggroup.buildtool.ripple.Package;
|
|
|
19 |
import com.erggroup.buildtool.ripple.RippleEngine;
|
|
|
20 |
import com.erggroup.buildtool.ripple.RunLevelData;
|
|
|
21 |
import com.erggroup.buildtool.ripple.RunLevel.BuildState;
|
|
|
22 |
|
| 7033 |
dpurdie |
23 |
import org.slf4j.Logger;
|
|
|
24 |
import org.slf4j.LoggerFactory;
|
| 6914 |
dpurdie |
25 |
import org.junit.AfterClass;
|
|
|
26 |
import org.junit.BeforeClass;
|
|
|
27 |
import org.junit.After;
|
|
|
28 |
import org.junit.Before;
|
|
|
29 |
import org.junit.Test;
|
|
|
30 |
import org.junit.runner.JUnitCore;
|
|
|
31 |
|
|
|
32 |
import static org.junit.Assert.*;
|
|
|
33 |
|
|
|
34 |
/**
|
|
|
35 |
* container of Build Daemon test methods
|
|
|
36 |
*/
|
|
|
37 |
public class DaemonBuildTestCase
|
|
|
38 |
{
|
| 7033 |
dpurdie |
39 |
private static final Logger mLogger = LoggerFactory.getLogger(DaemonBuildTestCase.class);
|
| 7051 |
dpurdie |
40 |
myReleaseManager releaseManager = null;
|
| 6914 |
dpurdie |
41 |
RippleEngine rippleEngine = null;
|
| 7051 |
dpurdie |
42 |
ArrayList<Package> testPackageCollection = new ArrayList<Package>();
|
| 6914 |
dpurdie |
43 |
|
| 7051 |
dpurdie |
44 |
/**
|
|
|
45 |
* Init the package set
|
|
|
46 |
*/
|
| 7070 |
dpurdie |
47 |
public void initTestPackages(String setName)
|
| 7051 |
dpurdie |
48 |
{
|
| 7070 |
dpurdie |
49 |
releaseManager.initTestPackages(rippleEngine, testPackageCollection, setName);
|
| 7051 |
dpurdie |
50 |
}
|
|
|
51 |
|
|
|
52 |
/** Create a WIP for a package in the Release
|
|
|
53 |
* This will mark it as directlyPlanned
|
|
|
54 |
* @param newPvId
|
|
|
55 |
* @param alias
|
|
|
56 |
*/
|
|
|
57 |
private Package createWip(int newPvId, String alias) {
|
|
|
58 |
|
|
|
59 |
Package wip = ReleaseManager.NULL_PACKAGE;
|
|
|
60 |
|
|
|
61 |
for (Iterator<Package> it = testPackageCollection.iterator(); it.hasNext(); )
|
|
|
62 |
{
|
|
|
63 |
Package p = it.next();
|
|
|
64 |
|
|
|
65 |
if ( p.mAlias.compareTo( alias ) == 0 )
|
|
|
66 |
{
|
|
|
67 |
wip = new Package(newPvId, p);
|
|
|
68 |
wip.mDirectlyPlanned = true;
|
|
|
69 |
testPackageCollection.add(wip);
|
|
|
70 |
break;
|
|
|
71 |
}
|
|
|
72 |
}
|
|
|
73 |
return wip;
|
|
|
74 |
}
|
|
|
75 |
|
|
|
76 |
|
|
|
77 |
|
| 6914 |
dpurdie |
78 |
/** Subclass and override key methods so that the test can control
|
|
|
79 |
* the data being used
|
|
|
80 |
*/
|
|
|
81 |
public class myReleaseManager extends ReleaseManagerUtf
|
|
|
82 |
{
|
|
|
83 |
int mAmyReleaseManager = 1;
|
| 7051 |
dpurdie |
84 |
|
|
|
85 |
public myReleaseManager(final String connectionString, final String username, final String password)
|
| 6914 |
dpurdie |
86 |
{
|
| 7070 |
dpurdie |
87 |
super(connectionString, username, password);
|
|
|
88 |
mLogger.error("Test {}", connectionString);
|
| 6914 |
dpurdie |
89 |
}
|
|
|
90 |
|
|
|
91 |
public myReleaseManager()
|
|
|
92 |
{
|
|
|
93 |
super();
|
|
|
94 |
}
|
|
|
95 |
|
|
|
96 |
@Override
|
| 7048 |
dpurdie |
97 |
public void queryPackageVersions(RippleEngine rippleEngine, ArrayList<Package> packageCollection, int baseline) throws SQLException, Exception
|
| 6914 |
dpurdie |
98 |
{
|
| 7048 |
dpurdie |
99 |
|
|
|
100 |
// Filter for the packages that are in the release
|
|
|
101 |
for (Iterator<Package> it = testPackageCollection.iterator(); it.hasNext(); )
|
|
|
102 |
{
|
|
|
103 |
Package p = it.next();
|
|
|
104 |
if (!p.mDirectlyPlanned && p.mTestBuildInstruction == 0 && p.mForcedRippleInstruction == 0)
|
|
|
105 |
{
|
|
|
106 |
p.mIsNotReleased = false;
|
| 7078 |
dpurdie |
107 |
if (p.mBuildTime <= 0)
|
|
|
108 |
p.mBuildTime = 90;
|
| 7048 |
dpurdie |
109 |
packageCollection.add(p);
|
|
|
110 |
}
|
|
|
111 |
}
|
| 6914 |
dpurdie |
112 |
|
| 7048 |
dpurdie |
113 |
}
|
|
|
114 |
|
|
|
115 |
@Override
|
|
|
116 |
public void queryWips(RippleEngine rippleEngine, ArrayList<Package> packageCollection, int baseline) throws SQLException, Exception
|
|
|
117 |
{
|
|
|
118 |
// Filter for the packages that are WIPs
|
|
|
119 |
for (Iterator<Package> it = testPackageCollection.iterator(); it.hasNext(); )
|
|
|
120 |
{
|
|
|
121 |
Package p = it.next();
|
|
|
122 |
if (p.mDirectlyPlanned )
|
|
|
123 |
{
|
|
|
124 |
p.mIsNotReleased = true;
|
|
|
125 |
p.mDirectlyPlanned = true;
|
|
|
126 |
p.mBuildReason = BuildReason.NewVersion;
|
| 7078 |
dpurdie |
127 |
if (p.mBuildTime <= 0)
|
|
|
128 |
p.mBuildTime = 100;
|
| 7048 |
dpurdie |
129 |
packageCollection.add(p);
|
|
|
130 |
}
|
|
|
131 |
}
|
|
|
132 |
|
|
|
133 |
}
|
|
|
134 |
|
|
|
135 |
@Override
|
|
|
136 |
public void queryTest(RippleEngine rippleEngine, ArrayList<Package> packageCollection, int baseline) throws SQLException, Exception
|
|
|
137 |
{
|
|
|
138 |
// Filter for the packages that are TEST builds
|
|
|
139 |
for (Iterator<Package> it = testPackageCollection.iterator(); it.hasNext(); )
|
|
|
140 |
{
|
|
|
141 |
Package p = it.next();
|
|
|
142 |
if (p.mTestBuildInstruction != 0 )
|
|
|
143 |
{
|
|
|
144 |
p.mIsNotReleased = true;
|
|
|
145 |
p.mDirectlyPlanned = false;
|
|
|
146 |
p.mBuildReason = BuildReason.Test;
|
|
|
147 |
packageCollection.add(p);
|
|
|
148 |
}
|
|
|
149 |
}
|
|
|
150 |
|
|
|
151 |
}
|
|
|
152 |
|
|
|
153 |
@Override
|
|
|
154 |
public void queryRipples(RippleEngine rippleEngine, ArrayList<Package> packageCollection, int baseline) throws SQLException, Exception
|
|
|
155 |
{
|
|
|
156 |
// Filter for the packages that are forced Ripples
|
|
|
157 |
for (Iterator<Package> it = testPackageCollection.iterator(); it.hasNext(); )
|
|
|
158 |
{
|
|
|
159 |
Package p = it.next();
|
|
|
160 |
if (p.mForcedRippleInstruction != 0)
|
|
|
161 |
{
|
|
|
162 |
p.mIsNotReleased = true;
|
|
|
163 |
p.mDirectlyPlanned = false;
|
|
|
164 |
p.mBuildReason = BuildReason.Ripple;
|
| 7070 |
dpurdie |
165 |
p.mBuildTime = 3;
|
| 7048 |
dpurdie |
166 |
packageCollection.add(p);
|
|
|
167 |
}
|
|
|
168 |
}
|
|
|
169 |
}
|
|
|
170 |
|
| 6914 |
dpurdie |
171 |
@Override
|
|
|
172 |
public void queryReleaseConfig(final String hostname) throws SQLException, Exception
|
|
|
173 |
{
|
|
|
174 |
mReleaseConfigCollection.resetData();
|
|
|
175 |
|
|
|
176 |
if ( mConnectionString.compareTo("unit test spawn thread") == 0)
|
|
|
177 |
{
|
|
|
178 |
mLogger.info("queryReleaseConfig 3 unit test spawn thread");
|
|
|
179 |
// specifying a gbebuildfilter of unit test is designed to invoke a benign thread for unit test purposes
|
|
|
180 |
ReleaseConfig releaseConfig = new ReleaseConfig(1,1,'M', "DummyHost1","DummyTarget1", "DummyMachtype1", "Win32");
|
|
|
181 |
mReleaseConfigCollection.add(releaseConfig);
|
|
|
182 |
releaseConfig = new ReleaseConfig(2,2,'S', "DummyHost2","DummyTarget2", "DummyMachtype2", "Linux");
|
|
|
183 |
mReleaseConfigCollection.add(releaseConfig);
|
|
|
184 |
}
|
|
|
185 |
}
|
|
|
186 |
|
|
|
187 |
@Override
|
|
|
188 |
public boolean queryReleaseConfig(final int rtag_id, final int rcon_id,final String machine_hostname, final char daemon_mode, final long threadStartTime) throws SQLException, Exception
|
|
|
189 |
{
|
|
|
190 |
boolean retVal = false;
|
|
|
191 |
|
|
|
192 |
if ( mConnectionString.compareTo("unit test exit") != 0 )
|
|
|
193 |
{
|
|
|
194 |
retVal = true;
|
|
|
195 |
}
|
|
|
196 |
return retVal;
|
|
|
197 |
}
|
|
|
198 |
|
|
|
199 |
@Override
|
|
|
200 |
public void queryRunLevel(final int rtag_id) throws SQLException, Exception
|
|
|
201 |
{
|
|
|
202 |
if ( mConnectionString.compareTo("unit test coordinate slave threads") == 0)
|
|
|
203 |
{
|
|
|
204 |
|
|
|
205 |
if ( mRunLevelCollection.size() == 0)
|
|
|
206 |
{
|
|
|
207 |
// first time not all slave threads are waiting
|
|
|
208 |
RunLevelData runLevel = new RunLevelData(1, BuildState.DB_WAITING, 'S',0);
|
|
|
209 |
mRunLevelCollection.add(runLevel);
|
|
|
210 |
runLevel = new RunLevelData(2, BuildState.DB_IDLE, 'S',0);
|
|
|
211 |
mRunLevelCollection.add(runLevel);
|
|
|
212 |
}
|
|
|
213 |
else
|
|
|
214 |
{
|
|
|
215 |
// subsequent times all slave threads are waiting
|
|
|
216 |
mRunLevelCollection.clear();
|
|
|
217 |
RunLevelData runLevel = new RunLevelData(1, BuildState.DB_WAITING, 'S',0);
|
|
|
218 |
mRunLevelCollection.add(runLevel);
|
|
|
219 |
runLevel = new RunLevelData(2, BuildState.DB_WAITING, 'S',0);
|
|
|
220 |
mRunLevelCollection.add(runLevel);
|
|
|
221 |
}
|
|
|
222 |
}
|
|
|
223 |
}
|
|
|
224 |
|
|
|
225 |
public boolean queryRunLevelSchedule(Date resumeTime, boolean recover) throws SQLException, Exception
|
|
|
226 |
{
|
|
|
227 |
boolean retVal = true;
|
|
|
228 |
|
|
|
229 |
if ( mConnectionString.compareTo("unit test not allowed to proceed") == 0 )
|
|
|
230 |
{
|
|
|
231 |
// schedule a 100ms max wait
|
|
|
232 |
resumeTime.setTime( resumeTime.getTime() + 100 );
|
|
|
233 |
retVal = false;
|
|
|
234 |
}
|
|
|
235 |
return retVal;
|
|
|
236 |
}
|
| 7051 |
dpurdie |
237 |
|
|
|
238 |
/** Build a single package collection
|
|
|
239 |
* It will be split up when requested by the classes under test
|
|
|
240 |
*
|
|
|
241 |
* @param packageCollection
|
|
|
242 |
*/
|
| 7070 |
dpurdie |
243 |
private void initTestPackages(RippleEngine rippleEngine, ArrayList<Package> packageCollection, String setName)
|
| 7051 |
dpurdie |
244 |
{
|
|
|
245 |
packageCollection.clear();
|
|
|
246 |
|
|
|
247 |
/* a highly unlikely set of packages
|
|
|
248 |
* planned info
|
|
|
249 |
* pv_id pkg_id pkg_name v_ext pkg_vcs_tag change_type
|
|
|
250 |
* 0 76 UncommonDependency .tim 0.TIM.WIP \vob\UncommonDependency P
|
|
|
251 |
* 1 1011 DependencyMissingFromRelease .tim 1.TIM.WIP \vob\DependencyMissingFromRelease M
|
|
|
252 |
* 2 34 CommonDependency .tim 2.TIM.WIP \vob\CommonDependency M
|
|
|
253 |
* 3 908 SolarisCentricProduct .tim 3.TIM.WIP \vob\SolarisCentricProduct N
|
|
|
254 |
* 4 6 GenericProduct .tim 4.TIM.WIP \vob\GenericProduct P
|
|
|
255 |
* 5 11 Product .tim 5.TIM.WIP \vob\Product M
|
|
|
256 |
* 6 113 UnfinishedProduct .tim 6.TIM.WIP \vob\UnfinishedProduct M
|
|
|
257 |
* 25 45 Banana .tim B.TIM.WIP \vob\Banana M
|
|
|
258 |
*/
|
|
|
259 |
Package p;
|
|
|
260 |
|
| 7070 |
dpurdie |
261 |
if ( setName.compareTo("iteration1") == 0 )
|
| 7051 |
dpurdie |
262 |
{
|
|
|
263 |
p = new Package(76, 0, "UncommonDependency", "1.0.0000", ".tim", "UncommonDependency.tim", "CC::/vob/UncommonDependency::0.TIM.WIP", 'b', 'P');
|
|
|
264 |
//p.mDirectlyPlanned = true;
|
|
|
265 |
packageCollection.add(p);
|
|
|
266 |
}
|
|
|
267 |
|
|
|
268 |
p = new Package(1011, 1, "DependencyMissingFromRelease", "1.0.0000", ".tim", "DependencyMissingFromRelease.tim", "CC::/vob/DependencyMissingFromRelease::1.TIM.WIP", 'b', 'M');
|
|
|
269 |
//p.mDirectlyPlanned = true;
|
|
|
270 |
packageCollection.add(p);
|
|
|
271 |
|
|
|
272 |
|
| 7070 |
dpurdie |
273 |
if ( setName.compareTo("iteration1") == 0
|
|
|
274 |
|| setName.compareTo("iteration2") == 0 )
|
| 7051 |
dpurdie |
275 |
{
|
|
|
276 |
p = new Package(34, 2, "CommonDependency", "1.0.0000", ".tim", "CommonDependency.tim", "CC::/vob/CommonDependency::2.TIM.WIP", 'b', 'M');
|
|
|
277 |
//p.mDirectlyPlanned = true;
|
|
|
278 |
packageCollection.add(p);
|
|
|
279 |
}
|
|
|
280 |
|
| 7070 |
dpurdie |
281 |
if ( setName.compareTo("iteration1") == 0
|
|
|
282 |
|| setName.compareTo("iteration2") == 0
|
|
|
283 |
|| setName.compareTo("iteration3") == 0 )
|
| 7051 |
dpurdie |
284 |
{
|
|
|
285 |
p = new Package(908, 3, "SolarisCentricProduct", "1.0.0000", ".tim", "SolarisCentricProduct.tim", "CC::/vob/SolarisCentricProduct::3.TIM.WIP", 'b', 'N');
|
|
|
286 |
//p.mDirectlyPlanned = true;
|
|
|
287 |
packageCollection.add(p);
|
|
|
288 |
}
|
|
|
289 |
|
| 7070 |
dpurdie |
290 |
if ( setName.compareTo("iteration1") == 0
|
|
|
291 |
|| setName.compareTo("iteration2") == 0
|
|
|
292 |
|| setName.compareTo("iteration3") == 0
|
|
|
293 |
|| setName.compareTo("iteration4") == 0 )
|
| 7051 |
dpurdie |
294 |
{
|
|
|
295 |
p = new Package(6, 4, "GenericProduct", "1.0.0000", ".tim", "GenericProduct.tim", "CC::/vob/GenericProduct::4.TIM.WIP", 'b', 'P');
|
|
|
296 |
//p.mDirectlyPlanned = true;
|
|
|
297 |
packageCollection.add(p);
|
|
|
298 |
}
|
|
|
299 |
|
| 7070 |
dpurdie |
300 |
if ( setName.compareTo("iteration1") == 0
|
|
|
301 |
|| setName.compareTo("iteration2") == 0
|
|
|
302 |
|| setName.compareTo("iteration3") == 0
|
|
|
303 |
|| setName.compareTo("iteration4") == 0
|
|
|
304 |
|| setName.compareTo("iteration5") == 0 )
|
| 7051 |
dpurdie |
305 |
{
|
|
|
306 |
p = new Package(11, 5, "Product", "1.0.0000", ".tim", "Product.tim", "CC::/vob/Product::5.TIM.WIP", 'b', 'M');
|
|
|
307 |
//p.mDirectlyPlanned = true;
|
|
|
308 |
packageCollection.add(p);
|
|
|
309 |
}
|
|
|
310 |
|
|
|
311 |
p = new Package(113, 6, "UnfinishedProduct", "1.0.0000", ".tim", "UnfinishedProduct.tim", "CC::/vob/UnfinishedProduct::6.TIM.WIP", 'b', 'M');
|
|
|
312 |
//p.mDirectlyPlanned = true;
|
|
|
313 |
packageCollection.add(p);
|
|
|
314 |
|
| 7070 |
dpurdie |
315 |
if ( setName.compareTo("iteration1") == 0 )
|
| 7051 |
dpurdie |
316 |
{
|
|
|
317 |
p = new Package(45, 25, "Banana", "1.0.0000", ".tim", "Banana.tim", "CC::B.TIM.WIP/vob/Banana", 'b', 'M');
|
|
|
318 |
//p.mDirectlyPlanned = true;
|
|
|
319 |
packageCollection.add(p);
|
|
|
320 |
}
|
|
|
321 |
|
|
|
322 |
/* planned dependencies
|
|
|
323 |
* pv_id pkg_name v_ext
|
|
|
324 |
* 1 NotInTheRelease .cots
|
|
|
325 |
* 2 CotsWithFunnyVersion .cots
|
|
|
326 |
* 2 UncommonDependency .tim
|
|
|
327 |
* 3 CommonDependency .tim
|
|
|
328 |
* 4 CommonDependency .tim
|
|
|
329 |
* 5 UncommonDependency .tim
|
|
|
330 |
* 25 Car .tim
|
|
|
331 |
*/
|
|
|
332 |
p = findPackage(1, packageCollection);
|
|
|
333 |
p.mDependencyCollection.add("NotInTheRelease.cots");
|
|
|
334 |
p.mDependencyIDCollection.add(-1);
|
|
|
335 |
|
| 7070 |
dpurdie |
336 |
if ( setName.compareTo("iteration1") == 0
|
|
|
337 |
|| setName.compareTo("iteration2") == 0 )
|
| 7051 |
dpurdie |
338 |
{
|
|
|
339 |
p = findPackage(2, packageCollection);
|
|
|
340 |
p.mDependencyCollection.add("CotsWithFunnyVersion.cots");
|
|
|
341 |
p.mDependencyIDCollection.add(7);
|
|
|
342 |
p.mDependencyCollection.add("UncommonDependency.tim");
|
|
|
343 |
p.mDependencyIDCollection.add(0);
|
|
|
344 |
}
|
|
|
345 |
|
| 7070 |
dpurdie |
346 |
if ( setName.compareTo("iteration1") == 0
|
|
|
347 |
|| setName.compareTo("iteration2") == 0
|
|
|
348 |
|| setName.compareTo("iteration3") == 0 )
|
| 7051 |
dpurdie |
349 |
{
|
|
|
350 |
p = findPackage(3, packageCollection);
|
|
|
351 |
p.mDependencyCollection.add("CommonDependency.tim");
|
|
|
352 |
p.mDependencyIDCollection.add(2);
|
|
|
353 |
}
|
|
|
354 |
|
| 7070 |
dpurdie |
355 |
if ( setName.compareTo("iteration1") == 0
|
|
|
356 |
|| setName.compareTo("iteration2") == 0
|
|
|
357 |
|| setName.compareTo("iteration3") == 0
|
|
|
358 |
|| setName.compareTo("iteration4") == 0 )
|
| 7051 |
dpurdie |
359 |
{
|
|
|
360 |
p = findPackage(4, packageCollection);
|
|
|
361 |
p.mDependencyCollection.add("CommonDependency.tim");
|
|
|
362 |
p.mDependencyIDCollection.add(2);
|
|
|
363 |
}
|
|
|
364 |
|
| 7070 |
dpurdie |
365 |
if ( setName.compareTo("iteration1") == 0
|
|
|
366 |
|| setName.compareTo("iteration2") == 0
|
|
|
367 |
|| setName.compareTo("iteration3") == 0
|
|
|
368 |
|| setName.compareTo("iteration4") == 0
|
|
|
369 |
|| setName.compareTo("iteration5") == 0 )
|
| 7051 |
dpurdie |
370 |
{
|
|
|
371 |
p = findPackage(5, packageCollection);
|
|
|
372 |
p.mDependencyCollection.add("UncommonDependency.tim");
|
|
|
373 |
p.mDependencyIDCollection.add(0);
|
|
|
374 |
}
|
|
|
375 |
|
| 7070 |
dpurdie |
376 |
if ( setName.compareTo("iteration1") == 0 )
|
| 7051 |
dpurdie |
377 |
{
|
|
|
378 |
p = findPackage(25, packageCollection);
|
|
|
379 |
|
|
|
380 |
p.mDependencyCollection.add("Car.tim");
|
|
|
381 |
p.mDependencyIDCollection.add(24);
|
|
|
382 |
}
|
|
|
383 |
|
|
|
384 |
|
|
|
385 |
|
|
|
386 |
/* planned build info
|
|
|
387 |
* pv_id bm_name bsa_name
|
|
|
388 |
* 0 Linux Java 1.6
|
|
|
389 |
* 1 Linux Debug
|
|
|
390 |
* 2 Linux Debug
|
|
|
391 |
* 2 Solaris Production
|
|
|
392 |
* 2 Win32 Production and Debug
|
|
|
393 |
* 3 Solaris Java 1.4
|
|
|
394 |
* 4 Generic Java 1.5
|
|
|
395 |
* 5 Linux Java 1.6
|
|
|
396 |
* 5 Win32 Java 1.6
|
|
|
397 |
* 25 Linux Java 1.6
|
|
|
398 |
*/
|
| 7070 |
dpurdie |
399 |
if ( setName.compareTo("iteration1") == 0 )
|
| 7051 |
dpurdie |
400 |
{
|
|
|
401 |
p = findPackage(0, packageCollection);
|
|
|
402 |
BuildStandard bs = new BuildStandard(rippleEngine, "Linux", "Java 1.6");
|
|
|
403 |
p.mBuildStandardCollection.add(bs);
|
|
|
404 |
}
|
|
|
405 |
|
|
|
406 |
p = findPackage(1, packageCollection);
|
|
|
407 |
BuildStandard bs = new BuildStandard(rippleEngine, "Linux", "Debug");
|
|
|
408 |
p.mBuildStandardCollection.add(bs);
|
|
|
409 |
|
| 7070 |
dpurdie |
410 |
if ( setName.compareTo("iteration1") == 0 || setName.compareTo("iteration2") == 0 )
|
| 7051 |
dpurdie |
411 |
{
|
|
|
412 |
p = findPackage(2, packageCollection);
|
|
|
413 |
bs = new BuildStandard(rippleEngine, "Linux", "Debug");
|
|
|
414 |
p.mBuildStandardCollection.add(bs);
|
|
|
415 |
bs = new BuildStandard(rippleEngine, "Solaris","Production");
|
|
|
416 |
p.mBuildStandardCollection.add(bs);
|
|
|
417 |
bs = new BuildStandard(rippleEngine, "Win32", "Production and Debug");
|
|
|
418 |
p.mBuildStandardCollection.add(bs);
|
|
|
419 |
}
|
|
|
420 |
|
| 7070 |
dpurdie |
421 |
if ( setName.compareTo("iteration1") == 0
|
|
|
422 |
|| setName.compareTo("iteration2") == 0
|
|
|
423 |
|| setName.compareTo("iteration3") == 0 )
|
| 7051 |
dpurdie |
424 |
{
|
|
|
425 |
p = findPackage(3, packageCollection);
|
|
|
426 |
bs = new BuildStandard(rippleEngine, "Solaris", "Java 1.4");
|
|
|
427 |
p.mBuildStandardCollection.add(bs);
|
|
|
428 |
}
|
|
|
429 |
|
| 7070 |
dpurdie |
430 |
if ( setName.compareTo("iteration1") == 0
|
|
|
431 |
|| setName.compareTo("iteration2") == 0
|
|
|
432 |
|| setName.compareTo("iteration3") == 0
|
|
|
433 |
|| setName.compareTo("iteration4") == 0 )
|
| 7051 |
dpurdie |
434 |
{
|
|
|
435 |
p = findPackage(4, packageCollection);
|
|
|
436 |
bs = new BuildStandard(rippleEngine, "Generic", "Java 1.5");
|
|
|
437 |
p.mBuildStandardCollection.add(bs);
|
|
|
438 |
}
|
|
|
439 |
|
| 7070 |
dpurdie |
440 |
if ( setName.compareTo("iteration1") == 0
|
|
|
441 |
|| setName.compareTo("iteration2") == 0
|
|
|
442 |
|| setName.compareTo("iteration3") == 0
|
|
|
443 |
|| setName.compareTo("iteration4") == 0
|
|
|
444 |
|| setName.compareTo("iteration5") == 0 )
|
| 7051 |
dpurdie |
445 |
{
|
|
|
446 |
p = findPackage(5, packageCollection);
|
|
|
447 |
bs = new BuildStandard(rippleEngine, "Linux", "Java 1.6");
|
|
|
448 |
p.mBuildStandardCollection.add(bs);
|
|
|
449 |
bs = new BuildStandard(rippleEngine, "Win32", "Java 1.6");
|
|
|
450 |
p.mBuildStandardCollection.add(bs);
|
|
|
451 |
}
|
|
|
452 |
|
| 7070 |
dpurdie |
453 |
if ( setName.compareTo("iteration1") == 0 )
|
| 7051 |
dpurdie |
454 |
{
|
|
|
455 |
p = findPackage(25, packageCollection);
|
|
|
456 |
bs = new BuildStandard(rippleEngine, "Linux", "Java 1.6");
|
|
|
457 |
p.mBuildStandardCollection.add(bs);
|
|
|
458 |
}
|
|
|
459 |
|
|
|
460 |
/* planned unit test info
|
|
|
461 |
* pv_id test_type_name
|
|
|
462 |
* 2 Manual Test
|
|
|
463 |
* 2 Interactive Test
|
|
|
464 |
* 2 Integration Test
|
|
|
465 |
* 5 Autobuild UTF
|
|
|
466 |
*/
|
| 7070 |
dpurdie |
467 |
if ( setName.compareTo("iteration1") == 0
|
|
|
468 |
|| setName.compareTo("iteration2") == 0
|
|
|
469 |
|| setName.compareTo("iteration3") == 0
|
|
|
470 |
|| setName.compareTo("iteration4") == 0
|
|
|
471 |
|| setName.compareTo("iteration5") == 0 )
|
| 7051 |
dpurdie |
472 |
{
|
|
|
473 |
p = findPackage(5, packageCollection);
|
|
|
474 |
p.mHasAutomatedUnitTests = true;
|
|
|
475 |
}
|
|
|
476 |
|
|
|
477 |
/* planned build failure info
|
|
|
478 |
* pv_id user_email
|
|
|
479 |
* 3 jimmyfishcake@vixtechnology.com
|
|
|
480 |
* 3 rayhaddock@vixtechnology.com
|
|
|
481 |
* 5 timbutdim@vixtechnology.com
|
|
|
482 |
*/
|
| 7070 |
dpurdie |
483 |
if ( setName.compareTo("iteration1") == 0
|
|
|
484 |
|| setName.compareTo("iteration2") == 0
|
|
|
485 |
|| setName.compareTo("iteration3") == 0 )
|
| 7051 |
dpurdie |
486 |
{
|
|
|
487 |
p = findPackage(3, packageCollection);
|
|
|
488 |
p.addEmail("jimmyfishcake@vixtechnology.com");
|
|
|
489 |
p.addEmail("rayhaddock@vixtechnology.com");
|
|
|
490 |
}
|
|
|
491 |
|
| 7070 |
dpurdie |
492 |
if ( setName.compareTo("iteration1") == 0
|
|
|
493 |
|| setName.compareTo("iteration2") == 0
|
|
|
494 |
|| setName.compareTo("iteration3") == 0
|
|
|
495 |
|| setName.compareTo("iteration4") == 0
|
|
|
496 |
|| setName.compareTo("iteration5") == 0 )
|
| 7051 |
dpurdie |
497 |
{
|
|
|
498 |
p = findPackage(5, packageCollection);
|
|
|
499 |
p.addEmail("timbutdim@vixtechnology.com");
|
|
|
500 |
}
|
|
|
501 |
|
|
|
502 |
/* planned advisory ripple info
|
|
|
503 |
* pv_id
|
|
|
504 |
* 0
|
|
|
505 |
*/
|
| 7070 |
dpurdie |
506 |
if ( setName.compareTo("iteration1") == 0 )
|
| 7051 |
dpurdie |
507 |
{
|
|
|
508 |
p = findPackage(0, packageCollection);
|
|
|
509 |
p.mAdvisoryRipple = true;
|
|
|
510 |
}
|
|
|
511 |
|
|
|
512 |
/* released info
|
|
|
513 |
* pv_id pkg_id pkg_name pkg_version v_ext pkg_vcs_tag ripple_field
|
|
|
514 |
* 7 8 CotsWithFunnyVersion hoopla2_x.cots .cots CotsWithFunnyVersion_hoopla2_x.cots \vob\CotsWithFunnyVersion
|
|
|
515 |
* 8 17 NotInAnyWayReproducible 1.0.0.tim .tim NA NA
|
|
|
516 |
* 9 34 CommonDependency 1.0.0000.tim .tim CommonDependency_1.0.0000.tim \vob\CommonDependency
|
|
|
517 |
* 10 908 SolarisCentricProduct 1.0.0000.tim .tim SolarisCentricProduct_1.0.0000.tim \vob\SolarisCentricProduct m
|
|
|
518 |
* 11 16 LinuxCentricProduct 1.0.0000.tim .tim LinuxCentricProduct_1.0.0000.tim \vob\LinuxCentricProduct
|
|
|
519 |
* 12 312 Win32CentricProduct 1.0.0000.tim .tim Win32CentricProduct_1.0.0000.tim \vob\Win32CentricProduct
|
|
|
520 |
* 13 6 GenericProduct 1.0.0000.tim .tim GenericProduct_1.0.0000.tim \vob\ToBeMovedFromHere M
|
|
|
521 |
* 14 81 AdvisoryDependency 1.0.0000.tim .tim AdvisoryDependency_1.0.0000.tim \vob\AdvisoryDependency
|
|
|
522 |
* 15 1 MergedProduct 1.0.0000.tim .tim MergedProduct_1.0.0000.tim \vob\MergedProduct m
|
|
|
523 |
* 22 45 Banana 1.1.0000.tim .tim Banana_1.1.0000.tim \vob\Banana
|
|
|
524 |
* 23 18 Aardvark 1.1.1000.tim .tim Aardvark_1.1.1000.tim \vob\Aardvark
|
|
|
525 |
* 24 227 Car 1.0.10000.tim .tim Car_1.0.10000.tim \vob\Car
|
|
|
526 |
*/
|
| 7070 |
dpurdie |
527 |
if ( setName.compareTo("iteration1") != 0 )
|
| 7051 |
dpurdie |
528 |
{
|
|
|
529 |
p = new Package(76, 0, "UncommonDependency", "0.0.1000.tim", ".tim", "UncommonDependency.tim", "CC::/vob/UncommonDependency::UncommonDependency_0.0.1000.tim", 'x');
|
|
|
530 |
Package plannedPackage = findPackage(p.mAlias, packageCollection);
|
|
|
531 |
|
|
|
532 |
if ( plannedPackage == NULL_PACKAGE )
|
|
|
533 |
{
|
|
|
534 |
packageCollection.add(p);
|
|
|
535 |
}
|
|
|
536 |
else
|
|
|
537 |
{
|
|
|
538 |
plannedPackage.mVersion = "0.0.1000";
|
|
|
539 |
}
|
|
|
540 |
}
|
|
|
541 |
|
| 7070 |
dpurdie |
542 |
if ( setName.compareTo("iteration1") != 0
|
|
|
543 |
&& setName.compareTo("iteration2") != 0
|
|
|
544 |
&& setName.compareTo("iteration3") != 0 )
|
| 7051 |
dpurdie |
545 |
{
|
|
|
546 |
p = new Package(908, 3, "SolarisCentricProduct", "1.1.0000.tim", ".tim", "SolarisCentricProduct.tim", "CC::/vob/SolarisCentricProduct::SolarisCentricProduct_1.1.0000.tim", 'm');
|
|
|
547 |
Package plannedPackage = findPackage(p.mAlias, packageCollection);
|
|
|
548 |
|
|
|
549 |
if ( plannedPackage == NULL_PACKAGE )
|
|
|
550 |
{
|
|
|
551 |
packageCollection.add(p);
|
|
|
552 |
}
|
|
|
553 |
else
|
|
|
554 |
{
|
|
|
555 |
plannedPackage.mVersion = "1.1.0000";
|
|
|
556 |
}
|
|
|
557 |
}
|
|
|
558 |
|
| 7070 |
dpurdie |
559 |
if ( setName.compareTo("iteration1") != 0
|
|
|
560 |
&& setName.compareTo("iteration2") != 0
|
|
|
561 |
&& setName.compareTo("iteration3") != 0
|
|
|
562 |
&& setName.compareTo("iteration4") != 0 )
|
| 7051 |
dpurdie |
563 |
{
|
|
|
564 |
p = new Package(6, 4, "GenericProduct", "1.0.1000.tim", ".tim", "GenericProduct.tim", "CC::/vob/GenericProduct::GenericProduct_1.0.1000.tim", 'M');
|
|
|
565 |
Package plannedPackage = findPackage(p.mAlias, packageCollection);
|
|
|
566 |
|
|
|
567 |
if ( plannedPackage == NULL_PACKAGE )
|
|
|
568 |
{
|
|
|
569 |
packageCollection.add(p);
|
|
|
570 |
}
|
|
|
571 |
else
|
|
|
572 |
{
|
|
|
573 |
plannedPackage.mVersion = "1.0.1000";
|
|
|
574 |
}
|
|
|
575 |
}
|
|
|
576 |
|
| 7070 |
dpurdie |
577 |
if ( setName.compareTo("iteration1") != 0
|
|
|
578 |
&& setName.compareTo("iteration2") != 0
|
|
|
579 |
&& setName.compareTo("iteration3") != 0
|
|
|
580 |
&& setName.compareTo("iteration4") != 0
|
|
|
581 |
&& setName.compareTo("iteration5") != 0 )
|
| 7051 |
dpurdie |
582 |
{
|
|
|
583 |
p = new Package(11, 5, "Product", "1.0.0000.tim", ".tim", "Product.tim", "CC::/vob/Product::Product_1.0.0000.tim", 'M');
|
|
|
584 |
Package plannedPackage = findPackage(p.mAlias, packageCollection);
|
|
|
585 |
|
|
|
586 |
if ( plannedPackage == NULL_PACKAGE )
|
|
|
587 |
{
|
|
|
588 |
packageCollection.add(p);
|
|
|
589 |
}
|
|
|
590 |
else
|
|
|
591 |
{
|
|
|
592 |
plannedPackage.mVersion = "1.0.0000";
|
|
|
593 |
}
|
|
|
594 |
}
|
|
|
595 |
|
|
|
596 |
p = new Package(8, 7, "CotsWithFunnyVersion", "hoopla2_x.cots", ".cots", "CotsWithFunnyVersion.cots", "CC::/vob/CotsWithFunnyVersion::CotsWithFunnyVersion_hoopla2_x", 'x');
|
|
|
597 |
Package plannedPackage = findPackage(p.mAlias, packageCollection);
|
|
|
598 |
|
|
|
599 |
if ( plannedPackage == NULL_PACKAGE )
|
|
|
600 |
{
|
|
|
601 |
packageCollection.add(p);
|
|
|
602 |
}
|
|
|
603 |
else
|
|
|
604 |
{
|
|
|
605 |
plannedPackage.mVersion = "hoopla2_x";
|
|
|
606 |
}
|
|
|
607 |
|
|
|
608 |
p = new Package(17, 8, "NotInAnyWayReproducible", "1.0.0.tim", ".tim", "NotInAnyWayReproducible.tim", "CC::NA::NA", 'x');
|
|
|
609 |
plannedPackage = findPackage(p.mAlias, packageCollection);
|
|
|
610 |
|
|
|
611 |
if ( plannedPackage == NULL_PACKAGE )
|
|
|
612 |
{
|
|
|
613 |
packageCollection.add(p);
|
|
|
614 |
}
|
|
|
615 |
else
|
|
|
616 |
{
|
|
|
617 |
plannedPackage.mVersion = "1.0.0";
|
|
|
618 |
}
|
|
|
619 |
|
| 7070 |
dpurdie |
620 |
if ( setName.compareTo("iteration1") == 0
|
|
|
621 |
|| setName.compareTo("iteration2") == 0
|
|
|
622 |
|| setName.compareTo("iteration3") == 0 )
|
| 7051 |
dpurdie |
623 |
{
|
|
|
624 |
p = new Package(908, 10, "SolarisCentricProduct", "1.0.0000.tim", ".tim", "SolarisCentricProduct.tim", "CC::/vob/SolarisCentricProduct::SolarisCentricProduct_1.0.0000.tim", 'm');
|
|
|
625 |
plannedPackage = findPackage(p.mAlias, packageCollection);
|
|
|
626 |
|
|
|
627 |
if ( plannedPackage == NULL_PACKAGE )
|
|
|
628 |
{
|
|
|
629 |
packageCollection.add(p);
|
|
|
630 |
}
|
|
|
631 |
else
|
|
|
632 |
{
|
|
|
633 |
plannedPackage.mVersion = "1.0.0000";
|
|
|
634 |
}
|
|
|
635 |
}
|
|
|
636 |
|
|
|
637 |
p = new Package(16, 11, "LinuxCentricProduct", "1.0.0000.tim", ".tim", "LinuxCentricProduct.tim", "CC::/vob/LinuxCentricProduct::LinuxCentricProduct_1.0.0000.tim", 'x');
|
|
|
638 |
plannedPackage = findPackage(p.mAlias, packageCollection);
|
|
|
639 |
|
|
|
640 |
if ( plannedPackage == NULL_PACKAGE )
|
|
|
641 |
{
|
|
|
642 |
packageCollection.add(p);
|
|
|
643 |
}
|
|
|
644 |
else
|
|
|
645 |
{
|
|
|
646 |
plannedPackage.mVersion = "1.0.0000";
|
|
|
647 |
}
|
|
|
648 |
|
|
|
649 |
p = new Package(312, 12, "Win32CentricProduct", "1.0.0000.tim", ".tim", "Win32CentricProduct.tim", "CC::/vob/Win32CentricProduct::Win32CentricProduct_1.0.0000.tim", 'x');
|
|
|
650 |
plannedPackage = findPackage(p.mAlias, packageCollection);
|
|
|
651 |
|
|
|
652 |
if ( plannedPackage == NULL_PACKAGE )
|
|
|
653 |
{
|
|
|
654 |
packageCollection.add(p);
|
|
|
655 |
}
|
|
|
656 |
else
|
|
|
657 |
{
|
|
|
658 |
plannedPackage.mVersion = "1.0.0000";
|
|
|
659 |
}
|
|
|
660 |
|
| 7070 |
dpurdie |
661 |
if ( setName.compareTo("iteration1") == 0
|
|
|
662 |
|| setName.compareTo("iteration2") == 0
|
|
|
663 |
|| setName.compareTo("iteration3") == 0
|
|
|
664 |
|| setName.compareTo("iteration4") == 0 )
|
| 7051 |
dpurdie |
665 |
{
|
|
|
666 |
p = new Package(6, 13, "GenericProduct", "1.0.0000.tim", ".tim", "GenericProduct.tim", "CC::/vob/ToBeMovedFromHere::GenericProduct_1.0.0000.tim", 'M');
|
|
|
667 |
plannedPackage = findPackage(p.mAlias, packageCollection);
|
| 7070 |
dpurdie |
668 |
|
|
|
669 |
|
|
|
670 |
if ( plannedPackage == NULL_PACKAGE )
|
|
|
671 |
{
|
|
|
672 |
packageCollection.add(p);
|
|
|
673 |
}
|
|
|
674 |
else
|
|
|
675 |
{
|
|
|
676 |
plannedPackage.mVersion = "1.0.0000";
|
|
|
677 |
}
|
|
|
678 |
}
|
|
|
679 |
|
| 7051 |
dpurdie |
680 |
p = new Package(81, 14, "AdvisoryDependency", "1.0.0000.tim", ".tim", "AdvisoryDependency.tim", "CC::/vob/AdvisoryDependency::AdvisoryDependency_1.0.0000.tim", 'x');
|
|
|
681 |
plannedPackage = findPackage(p.mAlias, packageCollection);
|
|
|
682 |
|
|
|
683 |
if ( plannedPackage == NULL_PACKAGE )
|
|
|
684 |
{
|
|
|
685 |
packageCollection.add(p);
|
|
|
686 |
}
|
|
|
687 |
else
|
|
|
688 |
{
|
|
|
689 |
plannedPackage.mVersion = "1.0.0000";
|
|
|
690 |
}
|
|
|
691 |
|
| 7070 |
dpurdie |
692 |
if ( setName.compareTo("iteration1") == 0
|
|
|
693 |
|| setName.compareTo("iteration2") == 0
|
|
|
694 |
|| setName.compareTo("iteration3") == 0
|
|
|
695 |
|| setName.compareTo("iteration4") == 0
|
|
|
696 |
|| setName.compareTo("iteration5") == 0
|
|
|
697 |
|| setName.compareTo("iteration6") == 0 )
|
| 7051 |
dpurdie |
698 |
{
|
|
|
699 |
p = new Package(1, 15, "MergedProduct", "1.0.0000.tim", ".tim", "MergedProduct.tim", "CC::/vob/MergedProduct::MergedProduct_1.0.0000.tim", 'm');
|
| 7078 |
dpurdie |
700 |
p.mBuildTime = 9990;
|
| 7051 |
dpurdie |
701 |
plannedPackage = findPackage(p.mAlias, packageCollection);
|
|
|
702 |
}
|
|
|
703 |
else
|
|
|
704 |
{
|
|
|
705 |
p = new Package(1, 16, "MergedProduct", "1.0.0000.tim", ".tim", "MergedProduct.tim", "CC::/vob/MergedProduct::MergedProduct_1.0.0000.tim", 'm');
|
| 7078 |
dpurdie |
706 |
p.mBuildTime = 9990;
|
| 7051 |
dpurdie |
707 |
plannedPackage = findPackage(p.mAlias, packageCollection);
|
|
|
708 |
}
|
|
|
709 |
|
|
|
710 |
if ( plannedPackage == NULL_PACKAGE )
|
|
|
711 |
{
|
|
|
712 |
packageCollection.add(p);
|
|
|
713 |
}
|
|
|
714 |
else
|
|
|
715 |
{
|
|
|
716 |
plannedPackage.mVersion = "1.0.0000";
|
|
|
717 |
}
|
|
|
718 |
|
| 7070 |
dpurdie |
719 |
if ( setName.compareTo("iteration1") == 0 )
|
| 7051 |
dpurdie |
720 |
{
|
|
|
721 |
p = new Package(45, 22, "Banana", "1.1.0000.tim", ".tim", "Banana.tim", "CC::/vob/Banana::Banana_1.1.0000.tim", 'x');
|
|
|
722 |
plannedPackage = findPackage(p.mAlias, packageCollection);
|
|
|
723 |
|
|
|
724 |
if ( plannedPackage == NULL_PACKAGE )
|
|
|
725 |
{
|
|
|
726 |
packageCollection.add(p);
|
|
|
727 |
}
|
|
|
728 |
else
|
|
|
729 |
{
|
|
|
730 |
plannedPackage.mVersion = "1.1.0000";
|
|
|
731 |
}
|
|
|
732 |
|
|
|
733 |
p = new Package(18, 23, "Aardvark", "1.1.1000.tim", ".tim", "Aardvark.tim", "CC::/vob/Aardvark::Aardvark_1.1.1000.tim", 'x');
|
|
|
734 |
plannedPackage = findPackage(p.mAlias, packageCollection);
|
|
|
735 |
|
|
|
736 |
if ( plannedPackage == NULL_PACKAGE )
|
|
|
737 |
{
|
|
|
738 |
packageCollection.add(p);
|
|
|
739 |
}
|
|
|
740 |
else
|
|
|
741 |
{
|
|
|
742 |
plannedPackage.mVersion = "1.1.1000";
|
|
|
743 |
}
|
|
|
744 |
|
|
|
745 |
p = new Package(227, 24, "Car", "1.0.10000.tim", ".tim", "Car.tim", "CC::/vob/Car::Car_1.0.10000.tim", 'x');
|
|
|
746 |
plannedPackage = findPackage(p.mAlias, packageCollection);
|
|
|
747 |
|
|
|
748 |
if ( plannedPackage == NULL_PACKAGE )
|
|
|
749 |
{
|
|
|
750 |
packageCollection.add(p);
|
|
|
751 |
}
|
|
|
752 |
else
|
|
|
753 |
{
|
|
|
754 |
plannedPackage.mVersion = "1.0.10000";
|
|
|
755 |
}
|
|
|
756 |
}
|
|
|
757 |
|
| 7070 |
dpurdie |
758 |
if ( setName.compareTo("iteration1") != 0
|
|
|
759 |
&& setName.compareTo("iteration2") != 0 )
|
| 7051 |
dpurdie |
760 |
{
|
|
|
761 |
p = new Package(34, 2, "CommonDependency", "2.0.0000.tim", ".tim", "CommonDependency.tim", "CC::/vob/CommonDependency::CommonDependency_2.0.0000.tim", 'x');
|
|
|
762 |
plannedPackage = findPackage(p.mAlias, packageCollection);
|
|
|
763 |
|
|
|
764 |
if ( plannedPackage == NULL_PACKAGE )
|
|
|
765 |
{
|
|
|
766 |
packageCollection.add(p);
|
|
|
767 |
}
|
|
|
768 |
else
|
|
|
769 |
{
|
|
|
770 |
plannedPackage.mVersion = "2.0.0000";
|
|
|
771 |
}
|
|
|
772 |
}
|
|
|
773 |
|
| 7070 |
dpurdie |
774 |
if ( setName.compareTo("iteration1") == 0 || setName.compareTo("iteration2") == 0 )
|
| 7051 |
dpurdie |
775 |
{
|
|
|
776 |
p = new Package(34, 9, "CommonDependency", "1.0.0000.tim", ".tim", "CommonDependency.tim", "CC::/vob/CommonDependency::CommonDependency_1.0.0000.tim", 'x');
|
|
|
777 |
plannedPackage = findPackage(p.mAlias, packageCollection);
|
|
|
778 |
|
|
|
779 |
if ( plannedPackage == NULL_PACKAGE )
|
|
|
780 |
{
|
|
|
781 |
packageCollection.add(p);
|
|
|
782 |
}
|
|
|
783 |
else
|
|
|
784 |
{
|
|
|
785 |
plannedPackage.mVersion = "1.0.0000";
|
|
|
786 |
}
|
|
|
787 |
}
|
|
|
788 |
|
|
|
789 |
/* released dependencies
|
|
|
790 |
* pv_id dpv_id pkg_name v_ext
|
|
|
791 |
* 8 9 CommonDependency .tim
|
|
|
792 |
* 9 7 CotsWithFunnyVersion .cots
|
|
|
793 |
* 10 9 CommonDependency .tim
|
|
|
794 |
* 11 44 AdvisoryDependency .tim
|
|
|
795 |
* 13 9 CommonDependency .tim
|
|
|
796 |
* 15 99 CommonDependency .tim
|
|
|
797 |
* 23 22 Banana .tim
|
|
|
798 |
* 24 23 Aardvark .tim
|
|
|
799 |
*/
|
| 7070 |
dpurdie |
800 |
if ( setName.compareTo("iteration1") != 0
|
|
|
801 |
&& setName.compareTo("iteration2") != 0 )
|
| 7051 |
dpurdie |
802 |
{
|
|
|
803 |
p = findPackage(2, packageCollection);
|
|
|
804 |
p.mDependencyCollection.add("CotsWithFunnyVersion.cots");
|
|
|
805 |
p.mDependencyIDCollection.add(7);
|
|
|
806 |
p.mDependencyCollection.add("UncommonDependency.tim");
|
|
|
807 |
p.mDependencyIDCollection.add(0);
|
|
|
808 |
}
|
|
|
809 |
|
| 7070 |
dpurdie |
810 |
if ( setName.compareTo("iteration1") != 0
|
|
|
811 |
&& setName.compareTo("iteration2") != 0
|
|
|
812 |
&& setName.compareTo("iteration3") != 0 )
|
| 7051 |
dpurdie |
813 |
{
|
|
|
814 |
p = findPackage(3, packageCollection);
|
|
|
815 |
p.mDependencyCollection.add("CommonDependency.tim");
|
|
|
816 |
p.mDependencyIDCollection.add(2);
|
|
|
817 |
}
|
|
|
818 |
|
| 7070 |
dpurdie |
819 |
if ( setName.compareTo("iteration1") != 0
|
|
|
820 |
&& setName.compareTo("iteration2") != 0
|
|
|
821 |
&& setName.compareTo("iteration3") != 0
|
|
|
822 |
&& setName.compareTo("iteration4") != 0 )
|
| 7051 |
dpurdie |
823 |
{
|
|
|
824 |
p = findPackage(4, packageCollection);
|
|
|
825 |
p.mDependencyCollection.add("CommonDependency.tim");
|
|
|
826 |
p.mDependencyIDCollection.add(2);
|
|
|
827 |
}
|
|
|
828 |
|
| 7070 |
dpurdie |
829 |
if ( setName.compareTo("iteration1") != 0
|
|
|
830 |
&& setName.compareTo("iteration2") != 0
|
|
|
831 |
&& setName.compareTo("iteration3") != 0
|
|
|
832 |
&& setName.compareTo("iteration4") != 0
|
|
|
833 |
&& setName.compareTo("iteration5") != 0 )
|
| 7051 |
dpurdie |
834 |
{
|
|
|
835 |
p = findPackage(5, packageCollection);
|
|
|
836 |
p.mDependencyCollection.add("UncommonDependency.tim");
|
|
|
837 |
p.mDependencyIDCollection.add(0);
|
|
|
838 |
}
|
|
|
839 |
|
|
|
840 |
p = findPackage(8, packageCollection);
|
|
|
841 |
p.mDependencyCollection.add("CommonDependency.tim");
|
|
|
842 |
p.mDependencyIDCollection.add(9);
|
|
|
843 |
|
| 7070 |
dpurdie |
844 |
if ( setName.compareTo("iteration1") == 0
|
|
|
845 |
|| setName.compareTo("iteration2") == 0 )
|
| 7051 |
dpurdie |
846 |
{
|
|
|
847 |
p = findPackage(9, packageCollection);
|
|
|
848 |
p.mDependencyCollection.add("CotsWithFunnyVersion.cots");
|
|
|
849 |
p.mDependencyIDCollection.add(7);
|
|
|
850 |
}
|
|
|
851 |
|
| 7070 |
dpurdie |
852 |
if ( setName.compareTo("iteration1") == 0
|
|
|
853 |
|| setName.compareTo("iteration2") == 0
|
|
|
854 |
|| setName.compareTo("iteration3") == 0 )
|
| 7051 |
dpurdie |
855 |
{
|
|
|
856 |
p = findPackage(10, packageCollection);
|
|
|
857 |
p.mDependencyCollection.add("CommonDependency.tim");
|
|
|
858 |
p.mDependencyIDCollection.add(9);
|
|
|
859 |
}
|
|
|
860 |
|
|
|
861 |
p = findPackage(11, packageCollection);
|
|
|
862 |
p.mDependencyCollection.add("AdvisoryDependency.tim");
|
|
|
863 |
p.mDependencyIDCollection.add(44);
|
|
|
864 |
|
| 7070 |
dpurdie |
865 |
if ( setName.compareTo("iteration1") == 0
|
|
|
866 |
|| setName.compareTo("iteration2") == 0
|
|
|
867 |
|| setName.compareTo("iteration3") == 0
|
|
|
868 |
|| setName.compareTo("iteration4") == 0 )
|
| 7051 |
dpurdie |
869 |
{
|
|
|
870 |
p = findPackage(13, packageCollection);
|
|
|
871 |
p.mDependencyCollection.add("CommonDependency.tim");
|
|
|
872 |
p.mDependencyIDCollection.add(9);
|
|
|
873 |
}
|
|
|
874 |
|
| 7070 |
dpurdie |
875 |
if ( setName.compareTo("iteration1") == 0
|
|
|
876 |
|| setName.compareTo("iteration2") == 0
|
|
|
877 |
|| setName.compareTo("iteration3") == 0
|
|
|
878 |
|| setName.compareTo("iteration4") == 0
|
|
|
879 |
|| setName.compareTo("iteration5") == 0
|
|
|
880 |
|| setName.compareTo("iteration6") == 0 )
|
| 7051 |
dpurdie |
881 |
{
|
|
|
882 |
p = findPackage(15, packageCollection);
|
|
|
883 |
p.mDependencyCollection.add("CommonDependency.tim");
|
|
|
884 |
p.mDependencyIDCollection.add(99); // PVID of package not in the release
|
|
|
885 |
}
|
|
|
886 |
else
|
|
|
887 |
{
|
|
|
888 |
p = findPackage(16, packageCollection);
|
|
|
889 |
p.mDependencyCollection.add("CommonDependency.tim");
|
|
|
890 |
p.mDependencyIDCollection.add(2);
|
|
|
891 |
}
|
|
|
892 |
|
| 7070 |
dpurdie |
893 |
if ( setName.compareTo("iteration1") == 0 )
|
| 7051 |
dpurdie |
894 |
{
|
|
|
895 |
p = findPackage(23, packageCollection);
|
|
|
896 |
p.mDependencyCollection.add("Banana.tim");
|
|
|
897 |
p.mDependencyIDCollection.add(22);
|
|
|
898 |
|
|
|
899 |
p = findPackage(24, packageCollection);
|
|
|
900 |
p.mDependencyCollection.add("Aardvark.tim");
|
|
|
901 |
p.mDependencyIDCollection.add(23);
|
|
|
902 |
}
|
|
|
903 |
|
|
|
904 |
/* released build info
|
|
|
905 |
* pv_id bm_name bsa_name
|
|
|
906 |
* 7 Solaris Debug
|
|
|
907 |
* 9 Linux Debug
|
|
|
908 |
* 9 Solaris Debug
|
|
|
909 |
* 9 Win32 Production
|
|
|
910 |
* 10 Solaris Java 1.4
|
|
|
911 |
* 11 Linux Production and Debug
|
|
|
912 |
* 12 Win32 Java 1.6
|
|
|
913 |
* 13 Generic Java 1.4
|
|
|
914 |
* 14 Linux Debug
|
|
|
915 |
* 15 Linux Debug
|
|
|
916 |
* 22 Linux Java 1.6
|
|
|
917 |
* 23 Linux Java 1.6
|
|
|
918 |
* 24 Linux Java 1.6
|
|
|
919 |
*/
|
| 7070 |
dpurdie |
920 |
if ( setName.compareTo("iteration1") != 0 )
|
| 7051 |
dpurdie |
921 |
{
|
|
|
922 |
p = findPackage(0, packageCollection);
|
|
|
923 |
bs = new BuildStandard(rippleEngine, "Linux", "Java 1.6");
|
|
|
924 |
p.mBuildStandardCollection.add(bs);
|
|
|
925 |
}
|
|
|
926 |
|
| 7070 |
dpurdie |
927 |
if ( setName.compareTo("iteration1") != 0
|
|
|
928 |
&& setName.compareTo("iteration2") != 0 )
|
| 7051 |
dpurdie |
929 |
{
|
|
|
930 |
p = findPackage(2, packageCollection);
|
|
|
931 |
bs = new BuildStandard(rippleEngine, "Linux", "Debug");
|
|
|
932 |
p.mBuildStandardCollection.add(bs);
|
|
|
933 |
bs = new BuildStandard(rippleEngine, "Solaris", "Production");
|
|
|
934 |
p.mBuildStandardCollection.add(bs);
|
|
|
935 |
bs = new BuildStandard(rippleEngine, "Win32", "Production and Debug");
|
|
|
936 |
p.mBuildStandardCollection.add(bs);
|
|
|
937 |
}
|
|
|
938 |
|
| 7070 |
dpurdie |
939 |
if ( setName.compareTo("iteration1") != 0
|
|
|
940 |
&& setName.compareTo("iteration2") != 0
|
|
|
941 |
&& setName.compareTo("iteration3") != 0 )
|
| 7051 |
dpurdie |
942 |
{
|
|
|
943 |
p = findPackage(3, packageCollection);
|
|
|
944 |
bs = new BuildStandard(rippleEngine, "Solaris", "Java 1.4");
|
|
|
945 |
p.mBuildStandardCollection.add(bs);
|
|
|
946 |
}
|
|
|
947 |
|
| 7070 |
dpurdie |
948 |
if ( setName.compareTo("iteration1") != 0
|
|
|
949 |
&& setName.compareTo("iteration2") != 0
|
|
|
950 |
&& setName.compareTo("iteration3") != 0
|
|
|
951 |
&& setName.compareTo("iteration4") != 0 )
|
| 7051 |
dpurdie |
952 |
{
|
|
|
953 |
p = findPackage(4, packageCollection);
|
|
|
954 |
bs = new BuildStandard(rippleEngine, "Generic", "Java 1.5");
|
|
|
955 |
p.mBuildStandardCollection.add(bs);
|
|
|
956 |
}
|
|
|
957 |
|
| 7070 |
dpurdie |
958 |
if ( setName.compareTo("iteration1") != 0
|
|
|
959 |
&& setName.compareTo("iteration2") != 0
|
|
|
960 |
&& setName.compareTo("iteration3") != 0
|
|
|
961 |
&& setName.compareTo("iteration4") != 0
|
|
|
962 |
&& setName.compareTo("iteration5") != 0 )
|
| 7051 |
dpurdie |
963 |
{
|
|
|
964 |
p = findPackage(5, packageCollection);
|
|
|
965 |
bs = new BuildStandard(rippleEngine, "Linux", "Java 1.6");
|
|
|
966 |
p.mBuildStandardCollection.add(bs);
|
|
|
967 |
bs = new BuildStandard(rippleEngine, "Win32", "Java 1.6");
|
|
|
968 |
p.mBuildStandardCollection.add(bs);
|
|
|
969 |
}
|
|
|
970 |
|
|
|
971 |
p = findPackage(7, packageCollection);
|
|
|
972 |
bs = new BuildStandard(rippleEngine, "Solaris", "Debug");
|
|
|
973 |
p.mBuildStandardCollection.add(bs);
|
|
|
974 |
|
| 7070 |
dpurdie |
975 |
if ( setName.compareTo("iteration1") == 0 || setName.compareTo("iteration2") == 0 )
|
| 7051 |
dpurdie |
976 |
{
|
|
|
977 |
p = findPackage(9, packageCollection);
|
|
|
978 |
bs = new BuildStandard(rippleEngine, "Linux", "Debug");
|
|
|
979 |
p.mBuildStandardCollection.add(bs);
|
|
|
980 |
bs = new BuildStandard(rippleEngine, "Solaris", "Debug");
|
|
|
981 |
p.mBuildStandardCollection.add(bs);
|
|
|
982 |
bs = new BuildStandard(rippleEngine, "Win32", "Production");
|
|
|
983 |
p.mBuildStandardCollection.add(bs);
|
|
|
984 |
}
|
|
|
985 |
|
| 7070 |
dpurdie |
986 |
if ( setName.compareTo("iteration1") == 0
|
|
|
987 |
|| setName.compareTo("iteration2") == 0
|
|
|
988 |
|| setName.compareTo("iteration3") == 0 )
|
| 7051 |
dpurdie |
989 |
{
|
|
|
990 |
p = findPackage(10, packageCollection);
|
|
|
991 |
bs = new BuildStandard(rippleEngine, "Solaris", "Java 1.4");
|
|
|
992 |
p.mBuildStandardCollection.add(bs);
|
|
|
993 |
}
|
|
|
994 |
|
|
|
995 |
p = findPackage(11, packageCollection);
|
|
|
996 |
bs = new BuildStandard(rippleEngine, "Linux", "Production and Debug");
|
|
|
997 |
p.mBuildStandardCollection.add(bs);
|
|
|
998 |
|
|
|
999 |
p = findPackage(12, packageCollection);
|
|
|
1000 |
bs = new BuildStandard(rippleEngine, "Win32", "Java 1.6");
|
|
|
1001 |
p.mBuildStandardCollection.add(bs);
|
|
|
1002 |
|
| 7070 |
dpurdie |
1003 |
if ( setName.compareTo("iteration1") == 0
|
|
|
1004 |
|| setName.compareTo("iteration2") == 0
|
|
|
1005 |
|| setName.compareTo("iteration3") == 0
|
|
|
1006 |
|| setName.compareTo("iteration4") == 0 )
|
| 7051 |
dpurdie |
1007 |
{
|
|
|
1008 |
p = findPackage(13, packageCollection);
|
|
|
1009 |
bs = new BuildStandard(rippleEngine, "Generic", "Java 1.4");
|
|
|
1010 |
p.mBuildStandardCollection.add(bs);
|
|
|
1011 |
}
|
|
|
1012 |
|
|
|
1013 |
p = findPackage(14, packageCollection);
|
|
|
1014 |
bs = new BuildStandard(rippleEngine, "Linux", "Debug");
|
|
|
1015 |
p.mBuildStandardCollection.add(bs);
|
|
|
1016 |
|
| 7070 |
dpurdie |
1017 |
if ( setName.compareTo("iteration1") == 0
|
|
|
1018 |
|| setName.compareTo("iteration2") == 0
|
|
|
1019 |
|| setName.compareTo("iteration3") == 0
|
|
|
1020 |
|| setName.compareTo("iteration4") == 0
|
|
|
1021 |
|| setName.compareTo("iteration5") == 0
|
|
|
1022 |
|| setName.compareTo("iteration6") == 0 )
|
| 7051 |
dpurdie |
1023 |
{
|
|
|
1024 |
p = findPackage(15, packageCollection);
|
|
|
1025 |
bs = new BuildStandard(rippleEngine, "Linux", "Debug");
|
|
|
1026 |
p.mBuildStandardCollection.add(bs);
|
|
|
1027 |
}
|
|
|
1028 |
else
|
|
|
1029 |
{
|
|
|
1030 |
p = findPackage(16, packageCollection);
|
|
|
1031 |
bs = new BuildStandard(rippleEngine, "Linux", "Debug");
|
|
|
1032 |
p.mBuildStandardCollection.add(bs);
|
|
|
1033 |
}
|
|
|
1034 |
|
| 7070 |
dpurdie |
1035 |
if ( setName.compareTo("iteration1") == 0 )
|
| 7051 |
dpurdie |
1036 |
{
|
|
|
1037 |
p = findPackage(22, packageCollection);
|
|
|
1038 |
bs = new BuildStandard(rippleEngine, "Linux", "Java 1.6");
|
|
|
1039 |
p.mBuildStandardCollection.add(bs);
|
|
|
1040 |
|
|
|
1041 |
p = findPackage(23, packageCollection);
|
|
|
1042 |
bs = new BuildStandard(rippleEngine, "Linux", "Java 1.6");
|
|
|
1043 |
p.mBuildStandardCollection.add(bs);
|
|
|
1044 |
|
|
|
1045 |
p = findPackage(24, packageCollection);
|
|
|
1046 |
bs = new BuildStandard(rippleEngine, "Solaris", "Java 1.6");
|
|
|
1047 |
p.mBuildStandardCollection.add(bs);
|
|
|
1048 |
}
|
|
|
1049 |
|
|
|
1050 |
/* released package unit test info
|
|
|
1051 |
* pv_id tt.test_type_name
|
|
|
1052 |
* 9 Manual Test
|
|
|
1053 |
* 9 Interactive Test
|
|
|
1054 |
* 9 Integration Test
|
|
|
1055 |
* 11 Autobuild UTF
|
|
|
1056 |
*/
|
| 7070 |
dpurdie |
1057 |
if ( setName.compareTo("iteration1") != 0
|
|
|
1058 |
&& setName.compareTo("iteration2") != 0
|
|
|
1059 |
&& setName.compareTo("iteration3") != 0
|
|
|
1060 |
&& setName.compareTo("iteration4") != 0
|
|
|
1061 |
&& setName.compareTo("iteration5") != 0 )
|
| 7051 |
dpurdie |
1062 |
{
|
|
|
1063 |
p = findPackage(5, packageCollection);
|
|
|
1064 |
p.mHasAutomatedUnitTests = true;
|
|
|
1065 |
}
|
|
|
1066 |
|
|
|
1067 |
p = findPackage(11, packageCollection);
|
|
|
1068 |
p.mHasAutomatedUnitTests = true;
|
|
|
1069 |
|
|
|
1070 |
/* released build failure email info
|
|
|
1071 |
* pv_id user_email
|
|
|
1072 |
* 10 jimmyfishcake@vixtechnology.com
|
|
|
1073 |
*/
|
| 7070 |
dpurdie |
1074 |
if ( setName.compareTo("iteration1") != 0
|
|
|
1075 |
&& setName.compareTo("iteration2") != 0
|
|
|
1076 |
&& setName.compareTo("iteration3") != 0 )
|
| 7051 |
dpurdie |
1077 |
{
|
|
|
1078 |
p = findPackage(3, packageCollection);
|
|
|
1079 |
p.addEmail("jimmyfishcake@vixtechnology.com");
|
|
|
1080 |
p.addEmail("rayhaddock@vixtechnology.com");
|
|
|
1081 |
}
|
|
|
1082 |
|
| 7070 |
dpurdie |
1083 |
if ( setName.compareTo("iteration1") != 0
|
|
|
1084 |
&& setName.compareTo("iteration2") != 0
|
|
|
1085 |
&& setName.compareTo("iteration3") != 0
|
|
|
1086 |
&& setName.compareTo("iteration4") != 0
|
|
|
1087 |
&& setName.compareTo("iteration5") != 0 )
|
| 7051 |
dpurdie |
1088 |
{
|
|
|
1089 |
p = findPackage(5, packageCollection);
|
|
|
1090 |
p.addEmail("timbutdim@vixtechnology.com");
|
|
|
1091 |
}
|
|
|
1092 |
|
| 7070 |
dpurdie |
1093 |
if ( setName.compareTo("iteration1") == 0
|
|
|
1094 |
|| setName.compareTo("iteration2") == 0
|
|
|
1095 |
|| setName.compareTo("iteration3") == 0 )
|
| 7051 |
dpurdie |
1096 |
{
|
|
|
1097 |
p = findPackage(10, packageCollection);
|
|
|
1098 |
p.addEmail("jimmyfishcake@vixtechnology.com");
|
|
|
1099 |
}
|
|
|
1100 |
|
|
|
1101 |
/* released advisory ripple info
|
|
|
1102 |
* pv_id
|
|
|
1103 |
* 14
|
|
|
1104 |
*/
|
| 7070 |
dpurdie |
1105 |
if ( setName.compareTo("iteration1") != 0 )
|
| 7051 |
dpurdie |
1106 |
{
|
|
|
1107 |
p = findPackage(0, packageCollection);
|
|
|
1108 |
p.mAdvisoryRipple = true;
|
|
|
1109 |
}
|
|
|
1110 |
|
|
|
1111 |
p = findPackage(14, packageCollection);
|
|
|
1112 |
p.mAdvisoryRipple = true;
|
|
|
1113 |
|
|
|
1114 |
// Insert sequence for later sorting
|
|
|
1115 |
Package.setSequence(packageCollection);
|
|
|
1116 |
|
|
|
1117 |
}
|
|
|
1118 |
|
| 6914 |
dpurdie |
1119 |
}
|
|
|
1120 |
|
|
|
1121 |
|
|
|
1122 |
public DaemonBuildTestCase()
|
|
|
1123 |
{
|
|
|
1124 |
mLogger.debug("DaemonBuildTestCase");
|
|
|
1125 |
}
|
|
|
1126 |
|
|
|
1127 |
/**
|
|
|
1128 |
* Test Case main line
|
|
|
1129 |
*/
|
|
|
1130 |
public static void main(String[] args)
|
|
|
1131 |
{
|
|
|
1132 |
mLogger.debug("main");
|
|
|
1133 |
JUnitCore.main("com.erggroup.buildtool.utf.DaemonBuildTestCase");
|
|
|
1134 |
}
|
|
|
1135 |
|
|
|
1136 |
/**
|
|
|
1137 |
* set up performed prior to any test method
|
|
|
1138 |
*/
|
|
|
1139 |
@BeforeClass
|
|
|
1140 |
public static void TestCaseSetUp()
|
|
|
1141 |
{
|
|
|
1142 |
mLogger.debug("TestCaseSetUp");
|
|
|
1143 |
}
|
|
|
1144 |
|
|
|
1145 |
/**
|
|
|
1146 |
* tear down performed after test methods
|
|
|
1147 |
*/
|
|
|
1148 |
@AfterClass
|
|
|
1149 |
public static void TestCaseTearDown()
|
|
|
1150 |
{
|
|
|
1151 |
mLogger.debug("TestCaseTearDown");
|
|
|
1152 |
}
|
|
|
1153 |
|
|
|
1154 |
/**
|
|
|
1155 |
* set up performed prior to each test method
|
|
|
1156 |
*/
|
|
|
1157 |
@Before
|
|
|
1158 |
public void TestSetUp()
|
|
|
1159 |
{
|
|
|
1160 |
mLogger.debug("TestSetUp");
|
|
|
1161 |
System.setProperty("vix.utf.name", "DaemonBuildTestCase");
|
|
|
1162 |
Package.mGenericMachtype = "win32";
|
|
|
1163 |
Package.mGbeDpkg = ".";
|
|
|
1164 |
}
|
|
|
1165 |
|
|
|
1166 |
/**
|
|
|
1167 |
* tear down performed after each test method
|
|
|
1168 |
*/
|
|
|
1169 |
@After
|
|
|
1170 |
public void TestTearDown()
|
|
|
1171 |
{
|
|
|
1172 |
mLogger.debug("TestTearDown");
|
|
|
1173 |
}
|
|
|
1174 |
|
|
|
1175 |
/**
|
|
|
1176 |
* test method designed primarily to test the sequence diagram spawn thread
|
|
|
1177 |
* also tests thread control out of necessity:
|
|
|
1178 |
* 1 constructs a BuildDaemon object, passing a connectionString of "unit test spawn thread"
|
|
|
1179 |
* this utilises the following unit test hooks in the codebase:
|
|
|
1180 |
* - BuildDaemon::BuildDaemon connectionString of "unit test spawn thread" exits while forever loop
|
|
|
1181 |
* - BuildDaemon constructor, isActive and cleanUp made public for unit test use
|
|
|
1182 |
* - ReleaseManager::queryReleaseConfig instantiates 2 ReleaseConfig objects
|
|
|
1183 |
* with rcon_id's of 1 and 2, daemon_modes of 'M' and 'S' respectively, and gbebuildfilters of
|
|
|
1184 |
* "unit test spawn thread"
|
|
|
1185 |
* - MasterThread::run gbebuildfilter of "unit test spawn thread" limits method to sleep in while forever loop
|
|
|
1186 |
* - SlaveThread::run gbebuildfilter of "unit test spawn thread" limits method to sleep in while forever loop
|
|
|
1187 |
* 2 checks the number of threads in the thread group is 3 (mainline thread + MasterThread + SlaveThread)
|
|
|
1188 |
* 3 checks isActive on the BuildDaemon object returns true when passed an rcon_id of 1
|
|
|
1189 |
* 4 checks isActive on the BuildDaemon object returns true when passed an rcon_id of 2
|
|
|
1190 |
* 5 checks isActive on the BuildDaemon object returns false when passed an rcon_id of 3
|
|
|
1191 |
* 6 calls cleanUp on the BuildDaemon object
|
|
|
1192 |
* 7 checks the number of threads in the thread group is 1 (mainline thread)
|
|
|
1193 |
* 8 checks isActive on the BuildDaemon object returns false when passed an rcon_id of 1
|
|
|
1194 |
* 9 checks isActive on the BuildDaemon object returns false when passed an rcon_id of 2
|
|
|
1195 |
* 10 checks isActive on the BuildDaemon object returns false when passed an rcon_id of 3
|
|
|
1196 |
*/
|
|
|
1197 |
@Test
|
|
|
1198 |
public void TestSpawnThread()
|
|
|
1199 |
{
|
|
|
1200 |
mLogger.debug("TestSpawnThread");
|
|
|
1201 |
int tcount;
|
|
|
1202 |
releaseManager = new myReleaseManager("unit test spawn thread", "not used", "not used");
|
|
|
1203 |
BuildDaemon buildDaemon = new BuildDaemon(releaseManager);
|
|
|
1204 |
tcount = BuildThread.mThreadGroup.activeCount();
|
|
|
1205 |
System.out.println("TestSpawnThread. tCount:" + tcount);
|
|
|
1206 |
assertTrue(tcount == 2);
|
|
|
1207 |
assertTrue(buildDaemon.isActive(1));
|
|
|
1208 |
assertTrue(buildDaemon.isActive(2));
|
|
|
1209 |
assertFalse(buildDaemon.isActive(3));
|
|
|
1210 |
buildDaemon.cleanUp();
|
|
|
1211 |
tcount = BuildThread.mThreadGroup.activeCount();
|
|
|
1212 |
System.out.println("TestSpawnThread Cleanup. tCount:" + tcount);
|
|
|
1213 |
assertTrue(tcount == 0);
|
|
|
1214 |
assertFalse(buildDaemon.isActive(1));
|
|
|
1215 |
assertFalse(buildDaemon.isActive(2));
|
|
|
1216 |
assertFalse(buildDaemon.isActive(3));
|
|
|
1217 |
}
|
|
|
1218 |
|
|
|
1219 |
/**
|
|
|
1220 |
* test method designed to test the sequence diagram coordinate slave thread:
|
|
|
1221 |
* 1 constructs a ReleaseManager object, passing a connectionString of "unit test coordinate slave threads"
|
|
|
1222 |
* 2 constructs a MasterThread object, passing a gbebuildfilter of "unit test coordinate slave threads"
|
|
|
1223 |
* this utilises the following unit test hooks in the codebase:
|
|
|
1224 |
* - MasterThread constructor made public for unit test use
|
|
|
1225 |
* - MasterThread::run gbebuildfilter of "unit test coordinate slave threads" limits method to the sequence diagram
|
|
|
1226 |
* interrupts the thread if, on one pass, at least one RunLevel object does not have a run level DB_WAITING
|
|
|
1227 |
* exits the while forever loop if, on one pass, all RunLevel objects have a run level DB_WAITING
|
|
|
1228 |
* - ReleaseManager::queryRunLevel connectionString of "unit test coordinate slave threads" instantiates 2 RunLevel
|
|
|
1229 |
* objects
|
|
|
1230 |
* initially with run levels of waiting and idle
|
|
|
1231 |
* subsequently with run levels both waiting
|
|
|
1232 |
* 3 calls run on the MasterThread object
|
|
|
1233 |
* 4 checks its thread has been interrupted
|
|
|
1234 |
*/
|
|
|
1235 |
@Test
|
|
|
1236 |
public void TestCoordinateSlaveThreads()
|
|
|
1237 |
{
|
|
|
1238 |
mLogger.debug("TestCoordinateSlaveThreads");
|
|
|
1239 |
ReleaseManager releaseManager = new myReleaseManager("unit test coordinate slave threads", "not used", "not used");
|
|
|
1240 |
MasterThread masterThread = new MasterThread(1, 1, releaseManager ,"unit test coordinate slave threads");
|
|
|
1241 |
assertFalse(Thread.interrupted());
|
|
|
1242 |
masterThread.run();
|
|
|
1243 |
// interrupted checks and importantly clears the interrupted status of this thread for subsequent tests
|
|
|
1244 |
assertTrue(Thread.interrupted());
|
|
|
1245 |
assertFalse(Thread.interrupted());
|
|
|
1246 |
}
|
|
|
1247 |
|
|
|
1248 |
/**
|
|
|
1249 |
* test method designed to test the sequence diagram generate build files
|
|
|
1250 |
* note does not test the RippleEngine:
|
|
|
1251 |
* 1 constructs a ReleaseManager object, passing a connectionString of "unit test generate build files"
|
|
|
1252 |
* 2 constructs a MasterThread object, passing a gbebuildfilter of "unit test generate build files"
|
|
|
1253 |
* this utilises the following unit test hooks in the codebase:
|
|
|
1254 |
* - MasterThread constructor made public for unit test use
|
|
|
1255 |
* - MasterThread::run gbebuildfilter of "unit test generate build files" limits method to the sequence diagram
|
|
|
1256 |
* exits the while forever loop
|
|
|
1257 |
* - ReleaseManager::queryReleaseConfig instantiates 2 ReleaseConfig objects
|
|
|
1258 |
* with rcon_id's of 1 and 2, daemon_modes of 'M' and 'S' respectively, and gbebuildfilters of
|
|
|
1259 |
* "unit test spawn thread"
|
|
|
1260 |
* - ReleaseManager::updateCurrentRunLevel utilises the public mPersistedRunLevelCollection
|
|
|
1261 |
* 3 calls run on the MasterThread object
|
|
|
1262 |
* 4 checks the first persisted run level is DB_ACTIVE
|
|
|
1263 |
* 5 checks the second persisted run level is DB_ACTIVE
|
|
|
1264 |
* 6 checks no further run levels were persisted
|
|
|
1265 |
*/
|
|
|
1266 |
@Test
|
|
|
1267 |
public void TestGenerateBuildFiles()
|
|
|
1268 |
{
|
|
|
1269 |
mLogger.debug("TestGenerateBuildFiles");
|
|
|
1270 |
myReleaseManager releaseManager = new myReleaseManager("unit test generate build files", "not used", "not used");
|
|
|
1271 |
MasterThread masterThread = new MasterThread(1, 1, releaseManager, "unit test generate build files");
|
|
|
1272 |
masterThread.run();
|
|
|
1273 |
assertTrue(RunLevelData.isAt(BuildState.DB_ACTIVE, releaseManager.mPersistedRunLevelCollection.get(0)));
|
|
|
1274 |
assertTrue(RunLevelData.isAt(BuildState.DB_ACTIVE, releaseManager.mPersistedRunLevelCollection.get(1)));
|
|
|
1275 |
assertTrue( releaseManager.mPersistedRunLevelCollection.size() == 2);
|
|
|
1276 |
}
|
|
|
1277 |
|
|
|
1278 |
/**
|
|
|
1279 |
* test method designed to test the sequence diagram consume build files
|
|
|
1280 |
* 1 constructs a ReleaseManager object, passing a connectionString of "unit test consume build files"
|
|
|
1281 |
* 2 constructs a SlaveThread object, passing a gbebuildfilter of "unit test consume build files"
|
|
|
1282 |
* this utilises the following unit test hooks in the codebase:
|
|
|
1283 |
* - SlaveThread constructor made public for unit test use
|
|
|
1284 |
* - SlaveThread::run gbebuildfilter of "unit test consume build files" limits method to the sequence diagram
|
|
|
1285 |
* interrupts the thread if, on one pass, the current build file string is empty
|
|
|
1286 |
* exits the while forever loop
|
|
|
1287 |
* - ReleaseManager::queryRunLevel
|
|
|
1288 |
* initially returns an empty current build file string
|
|
|
1289 |
* subsequently returns a "unit test build file content" current build file string
|
|
|
1290 |
* 3 calls run on the SlaveThread object
|
|
|
1291 |
*/
|
|
|
1292 |
@Test
|
|
|
1293 |
public void TestConsumeBuildFiles()
|
|
|
1294 |
{
|
|
|
1295 |
mLogger.debug("TestConsumeBuildFiles");
|
|
|
1296 |
ReleaseManager releaseManager = new myReleaseManager("unit test consume build files", "not used", "not used");
|
|
|
1297 |
SlaveThread slaveThread = new SlaveThread(1, 1, releaseManager, "unit test consume build files");
|
|
|
1298 |
assertFalse(Thread.interrupted());
|
|
|
1299 |
slaveThread.run();
|
|
|
1300 |
}
|
|
|
1301 |
|
|
|
1302 |
/**
|
|
|
1303 |
* test method designed to test the sequence diagram allowed to proceed
|
|
|
1304 |
* 1 constructs a ReleaseManager object, passing a connectionString of "unit test allowed to proceed"
|
|
|
1305 |
* 2 constructs a MasterThread object, passing a gbebuildfilter of "unit test allowed to proceed"
|
|
|
1306 |
* this utilises the following unit test hooks in the codebase:
|
|
|
1307 |
* - MasterThread constructor made public for unit test use
|
|
|
1308 |
* - MasterThread::run gbebuildfilter of "unit test allowed to proceed" limits method to the sequence diagram
|
|
|
1309 |
* exits the while forever loop
|
|
|
1310 |
* - ReleaseManager::queryReleaseConfig, queryRunLevelSchedule, queryDirectedRunLevel methods return true
|
|
|
1311 |
* - ReleaseManager::updateCurrentRunLevel utilises the public mPersistedRunLevelCollection
|
|
|
1312 |
* 3 calls run on the MasterThread object
|
|
|
1313 |
* 4 checks the first persisted run level is DB_IDLE
|
|
|
1314 |
* 5 checks the second persisted run level is DB_IDLE
|
|
|
1315 |
* 6 checks the third persisted run level is DB_WAITING
|
|
|
1316 |
* 7 checks no further run levels were persisted
|
|
|
1317 |
*/
|
|
|
1318 |
@Test
|
|
|
1319 |
public void TestAllowedToProceed()
|
|
|
1320 |
{
|
|
|
1321 |
mLogger.debug("TestAllowedToProceed");
|
|
|
1322 |
myReleaseManager releaseManager = new myReleaseManager("unit test allowed to proceed", "not used", "not used");
|
|
|
1323 |
MasterThread masterThread = new MasterThread(1, 1, releaseManager, "unit test allowed to proceed");
|
|
|
1324 |
masterThread.run();
|
|
|
1325 |
|
|
|
1326 |
assertTrue( RunLevelData.isAt(BuildState.DB_IDLE, releaseManager.mPersistedRunLevelCollection.get(0)));
|
|
|
1327 |
assertTrue( releaseManager.mPersistedRunLevelCollection.size() == 1);
|
|
|
1328 |
}
|
|
|
1329 |
|
|
|
1330 |
/**
|
|
|
1331 |
* test method designed to test the sequence diagram not allowed to proceed
|
|
|
1332 |
* 1 constructs a ReleaseManager object, passing a connectionString of "unit test not allowed to proceed"
|
|
|
1333 |
* 2 constructs a MasterThread object, passing a gbebuildfilter of "unit test not allowed to proceed"
|
|
|
1334 |
* this utilises the following unit test hooks in the codebase:
|
|
|
1335 |
* - MasterThread constructor made public for unit test use
|
|
|
1336 |
* - MasterThread::run gbebuildfilter of "unit test not allowed to proceed" limits method to the sequence diagram
|
|
|
1337 |
* exits the while forever loop
|
|
|
1338 |
* - ReleaseManager::queryReleaseConfig method returns true
|
|
|
1339 |
* - ReleaseManager::queryRunLevelSchedule method returns false
|
|
|
1340 |
* - ReleaseManager::updateCurrentRunLevel utilises the public mPersistedRunLevelCollection
|
|
|
1341 |
* 3 calls run on the MasterThread object
|
|
|
1342 |
* 4 checks the first persisted run level is DB_IDLE
|
|
|
1343 |
* 5 checks the second persisted run level is DB_IDLE
|
|
|
1344 |
* 6 checks the third persisted run level is DB_PAUSED
|
|
|
1345 |
* 7 checks no further run levels were persisted
|
|
|
1346 |
* nb cannot check only one thread is running,
|
|
|
1347 |
* a Timer thread, though having run to completion, may still be "active"
|
|
|
1348 |
*/
|
|
|
1349 |
@Test
|
|
|
1350 |
public void TestNotAllowedToProceed()
|
|
|
1351 |
{
|
|
|
1352 |
mLogger.debug("TestNotAllowedToProceed");
|
|
|
1353 |
myReleaseManager releaseManager = new myReleaseManager("unit test not allowed to proceed", "not used", "not used");
|
|
|
1354 |
MasterThread masterThread = new MasterThread(1, 1, releaseManager, "unit test not allowed to proceed");
|
|
|
1355 |
masterThread.run();
|
|
|
1356 |
|
|
|
1357 |
assertTrue(RunLevelData.isAt(BuildState.DB_IDLE, releaseManager.mPersistedRunLevelCollection.get(0)));
|
|
|
1358 |
assertTrue(RunLevelData.isAt(BuildState.DB_PAUSED, releaseManager.mPersistedRunLevelCollection.get(1)));
|
|
|
1359 |
assertTrue( releaseManager.mPersistedRunLevelCollection.size() == 2);
|
|
|
1360 |
}
|
|
|
1361 |
|
|
|
1362 |
/**
|
|
|
1363 |
* test method designed to test the sequence diagram exit
|
|
|
1364 |
* 1 constructs a ReleaseManager object, passing a connectionString of "unit test exit"
|
|
|
1365 |
* 2 constructs a MasterThread object, passing a gbebuildfilter of "unit test exit"
|
|
|
1366 |
* this utilises the following unit test hooks in the codebase:
|
|
|
1367 |
* - MasterThread constructor made public for unit test use
|
|
|
1368 |
* - MasterThread::run gbebuildfilter of "unit test exit" limits method to the sequence diagram
|
|
|
1369 |
* - ReleaseManager::queryReleaseConfig method returns false
|
|
|
1370 |
* - ReleaseManager::updateCurrentRunLevel utilises the public mPersistedRunLevelCollection
|
|
|
1371 |
* 3 calls run on the MasterThread object
|
|
|
1372 |
* 4 checks the first persisted run level is DB_IDLE
|
|
|
1373 |
* 5 checks no further run levels were persisted
|
|
|
1374 |
*/
|
|
|
1375 |
@Test
|
|
|
1376 |
public void TestExit()
|
|
|
1377 |
{
|
|
|
1378 |
mLogger.debug("TestExit");
|
|
|
1379 |
myReleaseManager releaseManager = new myReleaseManager("unit test exit", "not used", "not used");
|
|
|
1380 |
MasterThread masterThread = new MasterThread(1, 1, releaseManager, "unit test exit");
|
|
|
1381 |
masterThread.run();
|
|
|
1382 |
|
|
|
1383 |
assertTrue(RunLevelData.isAt(BuildState.DB_IDLE, releaseManager.mPersistedRunLevelCollection.get(0)));
|
|
|
1384 |
assertTrue( releaseManager.mPersistedRunLevelCollection.size() == 1);
|
|
|
1385 |
}
|
|
|
1386 |
|
|
|
1387 |
/**
|
|
|
1388 |
* test method designed to test the sequence diagram check environment
|
|
|
1389 |
* 1 constructs a ReleaseManager object, passing a connectionString of "unit check environment"
|
|
|
1390 |
* 2 constructs a MasterThread object, passing a gbebuildfilter of "unit check environment"
|
|
|
1391 |
* this utilises the following unit test hooks in the codebase:
|
|
|
1392 |
* - MasterThread constructor made public for unit test use
|
|
|
1393 |
* - MasterThread::run gbebuildfilter of "unit test check environment" limits method to the sequence diagram
|
|
|
1394 |
* exits the while forever loop
|
|
|
1395 |
* - MasterThread::housekeep method does not call deleteDirectory
|
|
|
1396 |
* - MasterThread::hasSufficientDiskSpace initially returns false, then true
|
|
|
1397 |
* - ReleaseManager::updateCurrentRunLevel utilises the public mPersistedRunLevelCollection
|
|
|
1398 |
* 3 calls run on the MasterThread object
|
|
|
1399 |
* 4 checks the first persisted run level is DB_CANNOT_CONTINUE
|
|
|
1400 |
* 5 checks the next persisted run level is DB_ACTIVE
|
|
|
1401 |
* 6 checks no further run levels were persisted
|
|
|
1402 |
*/
|
|
|
1403 |
@Test
|
|
|
1404 |
public void TestCheckEnvironment()
|
|
|
1405 |
{
|
|
|
1406 |
mLogger.debug("TestCheckEnvironment");
|
|
|
1407 |
myReleaseManager releaseManager = new myReleaseManager("unit test check environment", "not used", "not used");
|
|
|
1408 |
MasterThread masterThread = new MasterThread(1, 1, releaseManager, "unit test check environment");
|
|
|
1409 |
masterThread.run();
|
|
|
1410 |
assertTrue(RunLevelData.isAt(BuildState.DB_CANNOT_CONTINUE, releaseManager.mPersistedRunLevelCollection.get(0)));
|
|
|
1411 |
assertTrue(RunLevelData.isAt(BuildState.DB_ACTIVE, releaseManager.mPersistedRunLevelCollection.get(1)));
|
|
|
1412 |
assertTrue( releaseManager.mPersistedRunLevelCollection.size() == 2);
|
|
|
1413 |
}
|
|
|
1414 |
|
|
|
1415 |
/**
|
| 7051 |
dpurdie |
1416 |
* I'm guessing as to the function of this test
|
|
|
1417 |
* Test for:
|
|
|
1418 |
* Circular dependencies
|
|
|
1419 |
* Build Dependency not in the release
|
|
|
1420 |
* Package has no build environment
|
|
|
1421 |
* Package not built for configured platforms
|
|
|
1422 |
* A package is selected to be built
|
|
|
1423 |
*
|
| 6914 |
dpurdie |
1424 |
*/
|
|
|
1425 |
@Test
|
|
|
1426 |
public void TestPlanRelease_1()
|
|
|
1427 |
{
|
| 7070 |
dpurdie |
1428 |
mLogger.debug("TestPlanRelease - Iteration 1");
|
| 6914 |
dpurdie |
1429 |
System.out.println("TestPlanRelease - Iteration 1");
|
| 7051 |
dpurdie |
1430 |
releaseManager = new myReleaseManager("iteration1", "not used", "not used");
|
|
|
1431 |
rippleEngine = new RippleEngine(releaseManager, 11111, true);
|
|
|
1432 |
|
| 6914 |
dpurdie |
1433 |
try
|
|
|
1434 |
{
|
|
|
1435 |
rippleEngine.collectMetaData();
|
| 7051 |
dpurdie |
1436 |
|
|
|
1437 |
// Generate basic test set and then tweak for this test
|
| 7070 |
dpurdie |
1438 |
initTestPackages(releaseManager.mConnectionString);
|
| 7051 |
dpurdie |
1439 |
createWip(1000, "UncommonDependency.tim");
|
|
|
1440 |
createWip(1001, "DependencyMissingFromRelease.tim");
|
|
|
1441 |
createWip(1002, "CommonDependency.tim");
|
|
|
1442 |
createWip(1003, "SolarisCentricProduct.tim");
|
|
|
1443 |
createWip(1004, "GenericProduct.tim");
|
|
|
1444 |
createWip(1005, "Product.tim");
|
|
|
1445 |
createWip(1006, "UnfinishedProduct.tim");
|
|
|
1446 |
createWip(1007, "Banana.tim");
|
|
|
1447 |
|
| 6914 |
dpurdie |
1448 |
rippleEngine.planRelease(false);
|
|
|
1449 |
}
|
|
|
1450 |
catch (Exception e)
|
|
|
1451 |
{
|
|
|
1452 |
}
|
|
|
1453 |
|
|
|
1454 |
boolean rv;
|
|
|
1455 |
BuildFile buildFile;
|
|
|
1456 |
|
|
|
1457 |
buildFile = rippleEngine.getFirstBuildFileContent();
|
|
|
1458 |
assertTrue(buildFile != null);
|
|
|
1459 |
assertTrue(buildFile.state != BuildFileState.Dummy);
|
|
|
1460 |
assertTrue(buildFile.state != BuildFileState.Empty);
|
|
|
1461 |
|
|
|
1462 |
rv = Utilities.checkBuildfile(buildFile.content, "daemon1");
|
|
|
1463 |
assertTrue(rv);
|
|
|
1464 |
|
|
|
1465 |
buildFile = rippleEngine.getNextBuildFileContent();
|
|
|
1466 |
assertTrue(buildFile != null);
|
|
|
1467 |
assertTrue(buildFile.state == BuildFileState.Empty);
|
|
|
1468 |
}
|
|
|
1469 |
|
|
|
1470 |
@Test
|
|
|
1471 |
public void TestPlanRelease_2()
|
|
|
1472 |
{
|
|
|
1473 |
//
|
|
|
1474 |
System.out.println("TestPlanRelease - Iteration 2");
|
|
|
1475 |
releaseManager = new myReleaseManager("iteration2", "not used", "not used");
|
| 7051 |
dpurdie |
1476 |
rippleEngine = new RippleEngine(releaseManager, 11111, true);
|
| 6914 |
dpurdie |
1477 |
|
|
|
1478 |
// this is all the MasterThread does
|
|
|
1479 |
try
|
|
|
1480 |
{
|
|
|
1481 |
rippleEngine.collectMetaData();
|
| 7070 |
dpurdie |
1482 |
initTestPackages(releaseManager.mConnectionString);
|
| 7051 |
dpurdie |
1483 |
|
|
|
1484 |
createWip(1001, "DependencyMissingFromRelease.tim");
|
|
|
1485 |
createWip(1002, "CommonDependency.tim");
|
|
|
1486 |
createWip(1003, "SolarisCentricProduct.tim");
|
|
|
1487 |
createWip(1004, "GenericProduct.tim");
|
|
|
1488 |
createWip(1005, "Product.tim");
|
|
|
1489 |
createWip(1006, "UnfinishedProduct.tim");
|
|
|
1490 |
createWip(1007, "Banana.tim");
|
|
|
1491 |
|
| 6914 |
dpurdie |
1492 |
rippleEngine.planRelease(false);
|
|
|
1493 |
}
|
|
|
1494 |
catch (Exception e)
|
|
|
1495 |
{
|
|
|
1496 |
}
|
|
|
1497 |
|
|
|
1498 |
boolean rv;
|
|
|
1499 |
BuildFile buildFile;
|
|
|
1500 |
|
|
|
1501 |
buildFile = rippleEngine.getFirstBuildFileContent();
|
|
|
1502 |
assertTrue(buildFile != null);
|
|
|
1503 |
assertTrue(buildFile.state != BuildFileState.Dummy);
|
|
|
1504 |
assertTrue(buildFile.state != BuildFileState.Empty);
|
|
|
1505 |
|
|
|
1506 |
rv = Utilities.checkBuildfile(buildFile.content, "daemon2");
|
|
|
1507 |
assertTrue(rv);
|
|
|
1508 |
|
|
|
1509 |
buildFile = rippleEngine.getNextBuildFileContent();
|
|
|
1510 |
assertTrue(buildFile != null);
|
|
|
1511 |
assertTrue(buildFile.state == BuildFileState.Empty);
|
|
|
1512 |
}
|
|
|
1513 |
|
|
|
1514 |
@Test
|
|
|
1515 |
public void TestPlanRelease_3()
|
|
|
1516 |
{
|
|
|
1517 |
//
|
|
|
1518 |
System.out.println("TestPlanRelease - Iteration 3");
|
|
|
1519 |
releaseManager = new myReleaseManager("iteration3", "not used", "not used");
|
| 7051 |
dpurdie |
1520 |
rippleEngine = new RippleEngine(releaseManager, 11111, true);
|
|
|
1521 |
|
| 6914 |
dpurdie |
1522 |
// this is all the MasterThread does
|
|
|
1523 |
try
|
|
|
1524 |
{
|
|
|
1525 |
rippleEngine.collectMetaData();
|
| 7070 |
dpurdie |
1526 |
initTestPackages(releaseManager.mConnectionString);
|
| 7051 |
dpurdie |
1527 |
|
|
|
1528 |
createWip(1001, "DependencyMissingFromRelease.tim");
|
|
|
1529 |
createWip(1003, "SolarisCentricProduct.tim");
|
|
|
1530 |
createWip(1004, "GenericProduct.tim");
|
|
|
1531 |
createWip(1005, "Product.tim");
|
|
|
1532 |
createWip(1006, "UnfinishedProduct.tim");
|
|
|
1533 |
|
| 6914 |
dpurdie |
1534 |
rippleEngine.planRelease(false);
|
|
|
1535 |
}
|
|
|
1536 |
catch (Exception e)
|
|
|
1537 |
{
|
|
|
1538 |
}
|
|
|
1539 |
|
|
|
1540 |
boolean rv;
|
|
|
1541 |
BuildFile buildFile;
|
|
|
1542 |
|
|
|
1543 |
buildFile = rippleEngine.getFirstBuildFileContent();
|
|
|
1544 |
assertTrue(buildFile != null);
|
|
|
1545 |
assertTrue(buildFile.state != BuildFileState.Dummy);
|
|
|
1546 |
assertTrue(buildFile.state != BuildFileState.Empty);
|
|
|
1547 |
|
|
|
1548 |
rv = Utilities.checkBuildfile(buildFile.content, "daemon3");
|
|
|
1549 |
assertTrue(rv);
|
|
|
1550 |
|
|
|
1551 |
buildFile = rippleEngine.getNextBuildFileContent();
|
|
|
1552 |
assertTrue(buildFile != null);
|
|
|
1553 |
assertTrue(buildFile.state == BuildFileState.Empty);
|
|
|
1554 |
}
|
|
|
1555 |
|
|
|
1556 |
@Test
|
|
|
1557 |
public void TestPlanRelease_4()
|
|
|
1558 |
{
|
|
|
1559 |
|
|
|
1560 |
//
|
|
|
1561 |
System.out.println("TestPlanRelease - Iteration 4");
|
|
|
1562 |
releaseManager = new myReleaseManager("iteration4", "not used", "not used");
|
| 7051 |
dpurdie |
1563 |
rippleEngine = new RippleEngine(releaseManager, 11111, true);
|
| 6914 |
dpurdie |
1564 |
|
|
|
1565 |
// this is all the MasterThread does
|
|
|
1566 |
try
|
|
|
1567 |
{
|
|
|
1568 |
rippleEngine.collectMetaData();
|
| 7051 |
dpurdie |
1569 |
|
| 7070 |
dpurdie |
1570 |
initTestPackages(releaseManager.mConnectionString);
|
| 7051 |
dpurdie |
1571 |
createWip(1001, "DependencyMissingFromRelease.tim");
|
|
|
1572 |
createWip(1004, "GenericProduct.tim");
|
|
|
1573 |
createWip(1005, "Product.tim");
|
|
|
1574 |
createWip(1006, "UnfinishedProduct.tim");
|
|
|
1575 |
|
| 6914 |
dpurdie |
1576 |
rippleEngine.planRelease(false);
|
|
|
1577 |
}
|
|
|
1578 |
catch (Exception e)
|
|
|
1579 |
{
|
|
|
1580 |
}
|
|
|
1581 |
|
|
|
1582 |
boolean rv;
|
|
|
1583 |
BuildFile buildFile;
|
|
|
1584 |
|
|
|
1585 |
buildFile = rippleEngine.getFirstBuildFileContent();
|
|
|
1586 |
assertTrue(buildFile != null);
|
|
|
1587 |
assertTrue(buildFile.state != BuildFileState.Dummy);
|
|
|
1588 |
assertTrue(buildFile.state != BuildFileState.Empty);
|
|
|
1589 |
|
|
|
1590 |
rv = Utilities.checkBuildfile(buildFile.content, "daemon4");
|
|
|
1591 |
assertTrue(rv)
|
|
|
1592 |
;
|
|
|
1593 |
buildFile = rippleEngine.getNextBuildFileContent();
|
|
|
1594 |
assertTrue(buildFile != null);
|
|
|
1595 |
assertTrue(buildFile.state == BuildFileState.Empty);
|
|
|
1596 |
}
|
|
|
1597 |
|
|
|
1598 |
@Test
|
|
|
1599 |
public void TestPlanRelease_5()
|
|
|
1600 |
{
|
|
|
1601 |
|
|
|
1602 |
//
|
|
|
1603 |
System.out.println("TestPlanRelease - Iteration 5");
|
|
|
1604 |
releaseManager = new myReleaseManager("iteration5", "not used", "not used");
|
| 7051 |
dpurdie |
1605 |
rippleEngine = new RippleEngine(releaseManager, 11111, true);
|
| 6914 |
dpurdie |
1606 |
|
|
|
1607 |
// this is all the MasterThread does
|
|
|
1608 |
try
|
|
|
1609 |
{
|
|
|
1610 |
rippleEngine.collectMetaData();
|
| 7051 |
dpurdie |
1611 |
|
| 7070 |
dpurdie |
1612 |
initTestPackages(releaseManager.mConnectionString);
|
| 7051 |
dpurdie |
1613 |
createWip(1001, "DependencyMissingFromRelease.tim");
|
|
|
1614 |
createWip(1005, "Product.tim");
|
|
|
1615 |
createWip(1006, "UnfinishedProduct.tim");
|
|
|
1616 |
|
| 6914 |
dpurdie |
1617 |
rippleEngine.planRelease(false);
|
|
|
1618 |
}
|
|
|
1619 |
catch (Exception e)
|
|
|
1620 |
{
|
|
|
1621 |
}
|
|
|
1622 |
|
|
|
1623 |
boolean rv;
|
|
|
1624 |
BuildFile buildFile;
|
|
|
1625 |
|
|
|
1626 |
buildFile = rippleEngine.getFirstBuildFileContent();
|
|
|
1627 |
assertTrue(buildFile != null);
|
|
|
1628 |
assertTrue(buildFile.state != BuildFileState.Dummy);
|
|
|
1629 |
assertTrue(buildFile.state != BuildFileState.Empty);
|
|
|
1630 |
|
|
|
1631 |
rv = Utilities.checkBuildfile(buildFile.content, "daemon5");
|
|
|
1632 |
assertTrue(rv);
|
|
|
1633 |
|
|
|
1634 |
buildFile = rippleEngine.getNextBuildFileContent();
|
|
|
1635 |
assertTrue(buildFile != null);
|
|
|
1636 |
assertTrue(buildFile.state == BuildFileState.Empty);
|
|
|
1637 |
}
|
|
|
1638 |
|
|
|
1639 |
@Test
|
|
|
1640 |
public void TestPlanRelease_6()
|
|
|
1641 |
{
|
|
|
1642 |
|
|
|
1643 |
//
|
|
|
1644 |
System.out.println("TestPlanRelease - Iteration 6");
|
|
|
1645 |
releaseManager = new myReleaseManager("iteration6", "not used", "not used");
|
| 7051 |
dpurdie |
1646 |
rippleEngine = new RippleEngine(releaseManager, 11111, true);
|
| 6914 |
dpurdie |
1647 |
|
|
|
1648 |
// this is all the MasterThread does
|
|
|
1649 |
try
|
|
|
1650 |
{
|
|
|
1651 |
rippleEngine.collectMetaData();
|
| 7051 |
dpurdie |
1652 |
|
| 7070 |
dpurdie |
1653 |
initTestPackages(releaseManager.mConnectionString);
|
| 7051 |
dpurdie |
1654 |
createWip(1001, "DependencyMissingFromRelease.tim");
|
|
|
1655 |
createWip(1006, "UnfinishedProduct.tim");
|
|
|
1656 |
|
| 6914 |
dpurdie |
1657 |
rippleEngine.planRelease(false);
|
|
|
1658 |
}
|
|
|
1659 |
catch (Exception e)
|
|
|
1660 |
{
|
|
|
1661 |
}
|
|
|
1662 |
|
|
|
1663 |
boolean rv;
|
|
|
1664 |
BuildFile buildFile;
|
|
|
1665 |
|
|
|
1666 |
buildFile = rippleEngine.getFirstBuildFileContent();
|
|
|
1667 |
assertTrue(buildFile != null);
|
|
|
1668 |
assertTrue(buildFile.state != BuildFileState.Dummy);
|
|
|
1669 |
assertTrue(buildFile.state != BuildFileState.Empty);
|
|
|
1670 |
|
|
|
1671 |
rv = Utilities.checkBuildfile(buildFile.content, "daemon6");
|
|
|
1672 |
assertTrue(rv);
|
|
|
1673 |
|
|
|
1674 |
buildFile = rippleEngine.getNextBuildFileContent();
|
|
|
1675 |
assertTrue(buildFile != null);
|
|
|
1676 |
assertTrue(buildFile.state == BuildFileState.Empty);
|
|
|
1677 |
}
|
|
|
1678 |
|
|
|
1679 |
@Test
|
|
|
1680 |
public void TestPlanRelease_7()
|
|
|
1681 |
{
|
|
|
1682 |
|
|
|
1683 |
//
|
|
|
1684 |
System.out.println("TestPlanRelease - Iteration 7");
|
|
|
1685 |
releaseManager = new myReleaseManager("iteration7", "not used", "not used");
|
| 7051 |
dpurdie |
1686 |
rippleEngine = new RippleEngine(releaseManager, 11111, true);
|
| 6914 |
dpurdie |
1687 |
|
|
|
1688 |
// this is all the MasterThread does
|
|
|
1689 |
try
|
|
|
1690 |
{
|
|
|
1691 |
rippleEngine.collectMetaData();
|
| 7070 |
dpurdie |
1692 |
|
|
|
1693 |
initTestPackages(releaseManager.mConnectionString);
|
|
|
1694 |
createWip(1001, "DependencyMissingFromRelease.tim");
|
|
|
1695 |
createWip(1006, "UnfinishedProduct.tim");
|
|
|
1696 |
|
| 6914 |
dpurdie |
1697 |
rippleEngine.planRelease(false);
|
|
|
1698 |
}
|
|
|
1699 |
catch (Exception e)
|
|
|
1700 |
{
|
|
|
1701 |
}
|
|
|
1702 |
|
|
|
1703 |
boolean rv;
|
|
|
1704 |
BuildFile buildFile;
|
|
|
1705 |
|
|
|
1706 |
buildFile = rippleEngine.getFirstBuildFileContent();
|
|
|
1707 |
assertTrue(buildFile != null);
|
|
|
1708 |
assertTrue(buildFile.state == BuildFileState.Dummy);
|
|
|
1709 |
|
|
|
1710 |
rv = Utilities.checkBuildfile(buildFile.content, "daemon7");
|
|
|
1711 |
assertTrue(rv);
|
|
|
1712 |
|
|
|
1713 |
buildFile = rippleEngine.getNextBuildFileContent();
|
|
|
1714 |
assertTrue(buildFile != null);
|
|
|
1715 |
assertTrue(buildFile.state == BuildFileState.Empty);
|
|
|
1716 |
}
|
|
|
1717 |
|
|
|
1718 |
|
|
|
1719 |
/**
|
|
|
1720 |
* test method designed to test ripple field limits
|
|
|
1721 |
* 1 tests applyPV returns 1 for package with version a.b.1.2.0
|
|
|
1722 |
*/
|
|
|
1723 |
@Test
|
|
|
1724 |
public void TestRippleFieldLimits()
|
|
|
1725 |
{
|
|
|
1726 |
ReleaseManager rm = new myReleaseManager();
|
|
|
1727 |
// for test purposes, p.mId will contain the return value of applyPV
|
|
|
1728 |
// test applyPV returns 1 and leaves mVersion alone
|
|
|
1729 |
Package p = new Package(rm, "a.b.1.2.0", 255, 255, 255, 255);
|
|
|
1730 |
assertTrue(p.getId() == 1);
|
|
|
1731 |
assertTrue(p.getVersion().compareTo("a.b.1.2.0") == 0);
|
|
|
1732 |
|
|
|
1733 |
// test applyPV returns 2 and leaves mVersion alone
|
|
|
1734 |
p = new Package(rm, "1.0.0000", 0, 0, 0, 0);
|
|
|
1735 |
assertTrue(p.getId() == 2);
|
|
|
1736 |
assertTrue(p.getVersion().compareTo("1.0.0000") == 0);
|
|
|
1737 |
|
|
|
1738 |
// test applyPV returns 2 and leaves mVersion alone
|
|
|
1739 |
p = new Package(rm, "1.0.0009", 0, 0, 0, 9);
|
|
|
1740 |
assertTrue(p.getId() == 2);
|
|
|
1741 |
assertTrue(p.getVersion().compareTo("1.0.0009") == 0);
|
|
|
1742 |
|
|
|
1743 |
// test applyPV returns 2 and leaves mVersion alone
|
|
|
1744 |
p = new Package(rm, "1.0.9000", 0, 0, 9, 0);
|
|
|
1745 |
assertTrue(p.getId() == 2);
|
|
|
1746 |
assertTrue(p.getVersion().compareTo("1.0.9000") == 0);
|
|
|
1747 |
|
|
|
1748 |
// test applyPV returns 2 and leaves mVersion alone
|
|
|
1749 |
p = new Package(rm, "1.9.0000", 0, 9, 0, 0);
|
|
|
1750 |
assertTrue(p.getId() == 2);
|
|
|
1751 |
assertTrue(p.getVersion().compareTo("1.9.0000") == 0);
|
|
|
1752 |
|
|
|
1753 |
// test applyPV returns 2 and leaves mVersion alone
|
|
|
1754 |
p = new Package(rm, "1.0.0000", 1, 0, 0, 0);
|
|
|
1755 |
assertTrue(p.getId() == 2);
|
|
|
1756 |
assertTrue(p.getVersion().compareTo("1.0.0000") == 0);
|
|
|
1757 |
|
|
|
1758 |
// test applyPV returns 2 and leaves mVersion alone - wince style limits
|
|
|
1759 |
p = new Package(rm, "9.9.9000", 9, 9, 9, 0);
|
|
|
1760 |
assertTrue(p.getId() == 2);
|
|
|
1761 |
assertTrue(p.getVersion().compareTo("9.9.9000") == 0);
|
|
|
1762 |
|
| 7049 |
dpurdie |
1763 |
// test applyPV returns 0 and sets mNextVersion from 8.8.8000 to 8.8.9000 and does not change mVersion
|
| 6914 |
dpurdie |
1764 |
p = new Package(rm, "8.8.8000", 9, 9, 9, 0);
|
|
|
1765 |
assertTrue(p.getId() == 0);
|
| 7049 |
dpurdie |
1766 |
assertTrue(p.getVersion().compareTo("8.8.8000") == 0);
|
|
|
1767 |
assertTrue(p.getNextVersion().compareTo("8.8.9000") == 0);
|
| 6914 |
dpurdie |
1768 |
|
| 7049 |
dpurdie |
1769 |
// test applyPV returns 0 and sets mNextVersion from 8.8.9000 to 8.9.0000
|
| 6914 |
dpurdie |
1770 |
p = new Package(rm, "8.8.9000", 9, 9, 9, 0);
|
|
|
1771 |
assertTrue(p.getId() == 0);
|
| 7049 |
dpurdie |
1772 |
assertTrue(p.getVersion().compareTo("8.8.9000") == 0);
|
|
|
1773 |
assertTrue(p.getNextVersion().compareTo("8.9.0000") == 0);
|
| 6914 |
dpurdie |
1774 |
|
| 7049 |
dpurdie |
1775 |
// test applyPV returns 0 and sets mNextVersion from 8.9.9000 to 9.0.0000
|
| 6914 |
dpurdie |
1776 |
p = new Package(rm, "8.9.9000", 9, 9, 9, 0);
|
|
|
1777 |
assertTrue(p.getId() == 0);
|
| 7049 |
dpurdie |
1778 |
assertTrue(p.getVersion().compareTo("8.9.9000") == 0);
|
|
|
1779 |
assertTrue(p.getNextVersion().compareTo("9.0.0000") == 0);
|
| 6914 |
dpurdie |
1780 |
|
|
|
1781 |
// test applyPV returns 2 and leaves mVersion alone - mos style limits
|
|
|
1782 |
p = new Package(rm, "99.99.0000", 99, 99, 0, 0);
|
|
|
1783 |
assertTrue(p.getId() == 2);
|
|
|
1784 |
assertTrue(p.getVersion().compareTo("99.99.0000") == 0);
|
|
|
1785 |
|
| 7049 |
dpurdie |
1786 |
// test applyPV returns 0 and sets mNextVersion from 98.98.0000 to 98.99.0000
|
| 6914 |
dpurdie |
1787 |
p = new Package(rm, "98.98.0000", 99, 99, 0, 0);
|
|
|
1788 |
assertTrue(p.getId() == 0);
|
| 7049 |
dpurdie |
1789 |
assertTrue(p.getVersion().compareTo("98.98.0000") == 0);
|
|
|
1790 |
assertTrue(p.getNextVersion().compareTo("98.99.0000") == 0);
|
| 6914 |
dpurdie |
1791 |
|
| 7049 |
dpurdie |
1792 |
// test applyPV returns 0 and sets mNextVersion from 98.99.0000 to 99.0.0000
|
| 6914 |
dpurdie |
1793 |
p = new Package(rm, "98.99.0000", 99, 99, 0, 0);
|
|
|
1794 |
assertTrue(p.getId() == 0);
|
| 7049 |
dpurdie |
1795 |
assertTrue(p.getVersion().compareTo("98.99.0000") == 0);
|
|
|
1796 |
assertTrue(p.getNextVersion().compareTo("99.0.0000") == 0);
|
| 6914 |
dpurdie |
1797 |
|
|
|
1798 |
}
|
|
|
1799 |
|
|
|
1800 |
/**
|
|
|
1801 |
* test method designed to ripple of COTS packages
|
|
|
1802 |
* 1 tests applyPV returns 1 for package with version a.b.1.2.0
|
|
|
1803 |
*/
|
|
|
1804 |
@Test
|
|
|
1805 |
public void TestCotsRipples()
|
|
|
1806 |
{
|
|
|
1807 |
ReleaseManager rm = new myReleaseManager();
|
|
|
1808 |
// for test purposes, p.mId will contain the return value of applyPV
|
|
|
1809 |
// test applyPV returns 1 and leaves mVersion alone
|
|
|
1810 |
|
|
|
1811 |
mLogger.debug("TestCotsRipples: willNotRipple.cots");
|
|
|
1812 |
Package p = new Package(rm, "willNotRipple.cots", 255, 255, 255, 255);
|
|
|
1813 |
assertTrue(p.getId() == 1);
|
|
|
1814 |
assertTrue(p.getVersion().compareTo("willNotRipple") == 0);
|
|
|
1815 |
|
|
|
1816 |
mLogger.debug("TestCotsRipples: willRipple.0000.cots");
|
|
|
1817 |
p = new Package(rm, "willRipple.0000.cots", 255, 255, 255, 255);
|
|
|
1818 |
assertTrue(p.getId() == 0);
|
| 7049 |
dpurdie |
1819 |
assertTrue(p.getVersion().compareTo("willRipple.0000") == 0);
|
|
|
1820 |
assertTrue(p.getNextVersion().compareTo("willRipple.1000") == 0);
|
| 6914 |
dpurdie |
1821 |
|
|
|
1822 |
mLogger.debug("TestCotsRipples: willNotRipple.000.cots");
|
|
|
1823 |
p = new Package(rm, "willNotRipple.000.cots", 255, 255, 255, 255);
|
|
|
1824 |
assertTrue(p.getId() == 1);
|
|
|
1825 |
assertTrue(p.getVersion().compareTo("willNotRipple.000") == 0);
|
|
|
1826 |
|
|
|
1827 |
}
|
|
|
1828 |
|
|
|
1829 |
}
|