equal
deleted
inserted
replaced
108 void CMultiTargetAgent::ClientAppL() |
108 void CMultiTargetAgent::ClientAppL() |
109 // |
109 // |
110 // Performs each test in turn |
110 // Performs each test in turn |
111 // |
111 // |
112 { |
112 { |
|
113 test.Start(_L("ClientAppL")); |
113 TInt err = iServSession.Connect(securityServerVersion); |
114 TInt err = iServSession.Connect(securityServerVersion); |
114 if (err != KErrNone) |
115 if (err != KErrNone) |
115 { |
116 { |
116 User::Panic(_L("Can't open server session"), err); |
117 User::Panic(_L("Can't open server session"), err); |
117 } |
118 } |
118 |
119 SetupDebugServerL(); |
119 LaunchTargetsInOrderL(); |
120 LaunchTargetsInOrderL(); |
120 RDebug::Printf( "returning from CMultiTargetAgent::ClientAppL" ); |
121 RDebug::Printf( "returning from CMultiTargetAgent::ClientAppL" ); |
|
122 test.End(); |
121 } |
123 } |
122 |
124 |
123 /** |
125 /** |
124 Launch a process |
126 Launch a process |
125 |
127 |
156 } |
158 } |
157 |
159 |
158 void CMultiTargetAgent::SetupDebugServerL() |
160 void CMultiTargetAgent::SetupDebugServerL() |
159 { |
161 { |
160 RDebug::Printf( "CMultiTargetAgent::SetupDebugServerL" ); |
162 RDebug::Printf( "CMultiTargetAgent::SetupDebugServerL" ); |
161 |
163 test.Next(_L("SetupDebugServerL\n")); |
162 iTargets.ReserveL( KNumApps ); |
164 iTargets.ReserveL( KNumApps ); |
163 |
165 |
164 RBuf targetName; |
166 RBuf targetName; |
165 CleanupClosePushL( targetName ); |
167 CleanupClosePushL( targetName ); |
166 |
168 |
233 RDebug::Printf( "> OpenGlobal mutex ret=%d", ret ); |
235 RDebug::Printf( "> OpenGlobal mutex ret=%d", ret ); |
234 test( ret == KErrNone ); |
236 test( ret == KErrNone ); |
235 |
237 |
236 TBool thisLaunchCompleted; |
238 TBool thisLaunchCompleted; |
237 |
239 |
238 SetupDebugServerL(); |
240 test.Next(_L("LaunchTargetsInOrderL\n")); |
239 |
|
240 for( TInt numLaunches = KNumLaunches; numLaunches > 0; numLaunches-- ) |
241 for( TInt numLaunches = KNumLaunches; numLaunches > 0; numLaunches-- ) |
241 { |
242 { |
242 for( TInt numApps = KNumApps; numApps > 0; numApps-- ) |
243 for( TInt numApps = KNumApps; numApps > 0; numApps-- ) |
243 { |
244 { |
244 thisLaunchCompleted = EFalse; |
245 thisLaunchCompleted = EFalse; |
360 CleanupStack::PopAndDestroy( &tgtCollapseName ); // tgtCollapseName |
361 CleanupStack::PopAndDestroy( &tgtCollapseName ); // tgtCollapseName |
361 CleanupStack::PopAndDestroy( &tgt8Name ); // tgt8Name |
362 CleanupStack::PopAndDestroy( &tgt8Name ); // tgt8Name |
362 } |
363 } |
363 } |
364 } |
364 |
365 |
365 CleanupStack::PopAndDestroy( &launchSemaphore ); // launchSemaphore |
366 launchSemaphore.Signal(); |
366 |
367 |
367 for( TInt i = iTargets.Count()-1; i>=0; i-- ) |
368 CleanupStack::PopAndDestroy( &launchSemaphore ); // launchSemaphore |
368 { |
369 |
369 RDebug::Printf( "Closing target %d", i ); |
370 for( TInt i = iTargets.Count()-1; i>=0; i-- ) |
370 iTargets[ i ].Close(); |
371 { |
371 } |
372 RDebug::Printf( "Closing target %d", i ); |
372 |
373 iTargets[ i ].Close(); |
373 iTargets.Close(); |
374 } |
374 |
375 |
375 return KErrNone; |
376 iTargets.Close(); |
|
377 |
|
378 return KErrNone; |
376 } |
379 } |
377 |
380 |
378 |
381 |
379 GLDEF_C TInt E32Main() |
382 GLDEF_C TInt E32Main() |
380 { |
383 { |