|
1 // Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
2 // All rights reserved. |
|
3 // This component and the accompanying materials are made available |
|
4 // under the terms of "Eclipse Public License v1.0" |
|
5 // which accompanies this distribution, and is available |
|
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
7 // |
|
8 // Initial Contributors: |
|
9 // Nokia Corporation - initial contribution. |
|
10 // |
|
11 // Contributors: |
|
12 // |
|
13 // Description: |
|
14 // SWIS test step implementation |
|
15 // |
|
16 // |
|
17 |
|
18 /** |
|
19 @file |
|
20 */ |
|
21 |
|
22 #include "installStep.h" |
|
23 #include "common.h" |
|
24 #include "tui.h" |
|
25 #include <e32std.h> |
|
26 #include <test/testexecutelog.h> |
|
27 #include <swi/launcher.h> |
|
28 #include <bautils.h> |
|
29 #include "swi/sisregistrysession.h" |
|
30 #include "swi/sisregistrypackage.h" |
|
31 #include "swi/sisregistryentry.h" |
|
32 #include "cleanuputils.h" |
|
33 |
|
34 using namespace Swi; |
|
35 |
|
36 // |
|
37 // CinstallStep |
|
38 // |
|
39 |
|
40 CinstallStep::~CinstallStep() |
|
41 { |
|
42 delete iUi; |
|
43 } |
|
44 |
|
45 |
|
46 CinstallStep::CinstallStep(TInstallType aInstallType, TBool aDoCancelTest) |
|
47 : iInstallType(aInstallType), iDoCancelTest(aDoCancelTest), |
|
48 iInstallSuccess(EFalse) |
|
49 { |
|
50 // Call base class method to set up the human readable name for logging |
|
51 |
|
52 switch (aInstallType) |
|
53 { |
|
54 case EUseFileHandle: |
|
55 SetTestStepName(KInstallFHStep); |
|
56 break; |
|
57 |
|
58 case EUseMemory: |
|
59 SetTestStepName(KInstallMemStep); |
|
60 break; |
|
61 |
|
62 case EUseFileName: |
|
63 SetTestStepName(KInstallStep); |
|
64 break; |
|
65 |
|
66 case EUseCAF: |
|
67 SetTestStepName(KInstallCAFStep); |
|
68 break; |
|
69 |
|
70 case EUseOpenFileName: |
|
71 SetTestStepName(KInstallOpenFileStep); |
|
72 break; |
|
73 |
|
74 case ECheckExitValue: |
|
75 SetTestStepName(KCheckedInstallStep); |
|
76 break; |
|
77 |
|
78 } |
|
79 } |
|
80 |
|
81 /** |
|
82 * Override of base class virtual. Prepares for the test run of SWIS |
|
83 * @return TVerdict code |
|
84 */ |
|
85 TVerdict CinstallStep::doTestStepPreambleL() |
|
86 { |
|
87 SetTestStepResult(EPass); |
|
88 // get step parameters |
|
89 TPtrC str; |
|
90 if (!GetStringFromConfig(ConfigSection(), _L("sis"), str)) |
|
91 { |
|
92 INFO_PRINTF1(HTML_RED); |
|
93 ERR_PRINTF1(_L("FAIL: Missing SIS file name")); |
|
94 INFO_PRINTF1(HTML_RED_OFF); |
|
95 SetTestStepResult(EFail); |
|
96 return TestStepResult(); |
|
97 } |
|
98 iSisFileName.Copy(str); |
|
99 INFO_PRINTF2(_L("Installing '%S'"), &iSisFileName); |
|
100 |
|
101 // create UI handler and populate the answers from XML file |
|
102 iUi = new(ELeave) TUI(); |
|
103 |
|
104 return TestStepResult(); |
|
105 } |
|
106 |
|
107 |
|
108 |
|
109 |
|
110 /** |
|
111 * Override of base class pure virtual |
|
112 * Demonstrates reading configuration parameters fom an ini file section |
|
113 * @return TVerdict code |
|
114 */ |
|
115 TVerdict CinstallStep::doTestStepL() |
|
116 { |
|
117 INFO_PRINTF1(KInstallStep); |
|
118 |
|
119 // Try to set up a repository object, we'll need this if any |
|
120 // NotifyRequests are listed. Only open the repository if there are |
|
121 // notifys. |
|
122 |
|
123 TInt bRet; |
|
124 |
|
125 // First find out if the install step is supposed to be successful. |
|
126 TInt insterr=KErrNone; |
|
127 bRet = GetIntFromConfig(ConfigSection(), KExpectedError, insterr ); |
|
128 if(bRet!=1) insterr=KErrNone; |
|
129 |
|
130 CInstallPrefs* prefs = CInstallPrefs::NewLC(); |
|
131 TInt err = DoInstallL(*prefs); |
|
132 iInstallSuccess = (err == KErrNone); |
|
133 |
|
134 // Expected error? |
|
135 if(insterr != err) |
|
136 { |
|
137 INFO_PRINTF1(HTML_RED); |
|
138 ERR_PRINTF3( _L("Installation return wrong error code, expected %d, got %d."), insterr, err ); |
|
139 INFO_PRINTF1(HTML_RED_OFF); |
|
140 SetTestStepResult(EFail); |
|
141 } |
|
142 else |
|
143 { |
|
144 INFO_PRINTF2( _L("Installation error code %d (expected)."), err ); |
|
145 } |
|
146 |
|
147 |
|
148 CleanupStack::PopAndDestroy(prefs); |
|
149 |
|
150 return TestStepResult(); |
|
151 |
|
152 } |
|
153 |
|
154 TInt CinstallStep::DoInstallL(CInstallPrefs& aInstallPrefs) |
|
155 { |
|
156 TInt err=KErrNone; |
|
157 RFs fs; |
|
158 RFile file; |
|
159 switch (iInstallType) |
|
160 { |
|
161 case EUseFileName: |
|
162 err = Launcher::Install(*iUi, iSisFileName, aInstallPrefs); |
|
163 INFO_PRINTF2(_L("EUseFileName: Install return code was %d"), err); |
|
164 return err; |
|
165 |
|
166 case EUseOpenFileName: |
|
167 // open the file as a shared for readers only |
|
168 { |
|
169 User::LeaveIfError(fs.Connect()); |
|
170 fs.ShareProtected(); |
|
171 CleanupClosePushL(fs); |
|
172 RFile file; |
|
173 User::LeaveIfError(file.Open(fs, iSisFileName, EFileShareReadersOnly)); |
|
174 CleanupClosePushL(file); |
|
175 TInt error = Launcher::Install(*iUi, iSisFileName, aInstallPrefs); |
|
176 CleanupStack::PopAndDestroy(2, &fs); |
|
177 return error; |
|
178 } |
|
179 |
|
180 case EUseFileHandle: |
|
181 { |
|
182 RFs fs; |
|
183 User::LeaveIfError(fs.Connect()); |
|
184 fs.ShareProtected(); |
|
185 CleanupClosePushL(fs); |
|
186 RFile file; |
|
187 User::LeaveIfError(file.Open(fs, iSisFileName, 0)); |
|
188 CleanupClosePushL(file); |
|
189 TInt error=Launcher::Install(*iUi, file, aInstallPrefs); |
|
190 CleanupStack::PopAndDestroy(2, &fs); |
|
191 return error; |
|
192 } |
|
193 |
|
194 case ECheckExitValue: |
|
195 { |
|
196 // This test case does an install and checks for pass or failure |
|
197 // TInt err = Launcher::Install(*iUi, iSisFileName, *prefs); |
|
198 TInt err = Launcher::Install(*iUi, iSisFileName, aInstallPrefs); |
|
199 INFO_PRINTF2(_L("Install return code was %d"), err); |
|
200 |
|
201 TPtrC expected; |
|
202 if (!GetStringFromConfig(ConfigSection(), _L("result"), expected)) |
|
203 { |
|
204 return ETestSuiteError; |
|
205 } |
|
206 else |
|
207 { |
|
208 _LIT(KSucess, "sucess"); |
|
209 _LIT(KFailure, "failure"); |
|
210 |
|
211 TVerdict result; |
|
212 |
|
213 if (expected.CompareF(KSucess) == 0) |
|
214 { |
|
215 result = (err == KErrNone ? EPass : EFail); |
|
216 } |
|
217 else if (expected.CompareF(KFailure) == 0) |
|
218 { |
|
219 result = (err != KErrNone ? EPass : EFail); |
|
220 } |
|
221 else |
|
222 { |
|
223 result = ETestSuiteError; |
|
224 } |
|
225 return result; |
|
226 } |
|
227 } |
|
228 // Unreachable. |
|
229 // break; |
|
230 } |
|
231 |
|
232 // Shouldn't get here |
|
233 return KErrGeneral; |
|
234 } |
|
235 |
|
236 /** |
|
237 * Override of base class virtual |
|
238 * @return TVerdict code |
|
239 */ |
|
240 TVerdict CinstallStep::doTestStepPostambleL() |
|
241 { |
|
242 CheckFilesExistL(); |
|
243 CheckFilesNonExistL(); |
|
244 return TestStepResult(); |
|
245 } |
|
246 |
|
247 /** Need to wait a few seconds for ECOM to |
|
248 discover the change. Otherwise the next step may fail. |
|
249 @pre caller has checked the install/uninstall |
|
250 is successful. Otherwise will waste 30 s. |
|
251 */ |
|
252 void Cinstallers::WaitForEComReDiscoveryL() |
|
253 { |
|
254 REComSession& ecomSession = REComSession::OpenL(); |
|
255 CleanupClosePushL(ecomSession); |
|
256 TRequestStatus ecomstatus; |
|
257 ecomSession.NotifyOnChange(ecomstatus); |
|
258 |
|
259 RTimer timer; |
|
260 User::LeaveIfError(timer.CreateLocal()); |
|
261 CleanupClosePushL(timer); |
|
262 const TInt KInterval = 30000000; // 30 s |
|
263 TRequestStatus timerstatus; |
|
264 timer.After(timerstatus, KInterval); |
|
265 |
|
266 User::WaitForRequest(ecomstatus, timerstatus); |
|
267 |
|
268 if (ecomstatus == KRequestPending) |
|
269 { |
|
270 ecomSession.CancelNotifyOnChange(ecomstatus); |
|
271 User::WaitForRequest(ecomstatus); |
|
272 |
|
273 INFO_PRINTF1(HTML_RED); |
|
274 ERR_PRINTF1(_L("No notification from ECOM")); |
|
275 INFO_PRINTF1(HTML_RED_OFF); |
|
276 // does not affect test result as this is the equivalent of |
|
277 // DELAY 30000 in the script. |
|
278 } |
|
279 else |
|
280 { |
|
281 timer.Cancel(); |
|
282 User::WaitForRequest(timerstatus); |
|
283 INFO_PRINTF1(_L("ECOM has discovered the change")); |
|
284 } |
|
285 |
|
286 CleanupStack::PopAndDestroy(2); // ecomsession, RTimer |
|
287 REComSession::FinalClose(); |
|
288 } |
|
289 |
|
290 /** Resolver installation step */ |
|
291 |
|
292 /** constructor */ |
|
293 CResolverInstallStep::CResolverInstallStep(CinstallStep::TInstallType aInstallType) |
|
294 : CinstallStep(aInstallType) |
|
295 { |
|
296 } |
|
297 |
|
298 /** destructor */ |
|
299 CResolverInstallStep::~CResolverInstallStep() |
|
300 { |
|
301 iLibrary.Close(); |
|
302 } |
|
303 |
|
304 /** uses CinstallStep::dotestStepL to do the install. |
|
305 But adds an optional step of loading a DLL before, and |
|
306 a step to wait for ECom rediscovery after. |
|
307 */ |
|
308 TVerdict CResolverInstallStep::doTestStepL() |
|
309 { |
|
310 TPtrC libraryPath; |
|
311 if (GetStringFromConfig(ConfigSection(), _L("loadresolver"), libraryPath)) |
|
312 { |
|
313 TUidType nullUid; |
|
314 TInt err = iLibrary.Load(libraryPath, nullUid); |
|
315 if (err != KErrNone) |
|
316 { |
|
317 ERR_PRINTF2(_L("Preload resolver failed %d"), err); |
|
318 return EFail; |
|
319 } |
|
320 } |
|
321 |
|
322 // continue to do the actual install. |
|
323 TVerdict ret = CinstallStep::doTestStepL(); |
|
324 |
|
325 if (iInstallSuccess) |
|
326 { |
|
327 WaitForEComReDiscoveryL(); |
|
328 } |
|
329 |
|
330 return ret; |
|
331 } |
|
332 |
|
333 /* ******************************************************************************* |
|
334 * Code below was copies from |
|
335 * \master\common\generic\security\swi\test\tuiscriptadaptors\tswisstep.cpp |
|
336 * |
|
337 * If there are any problems with this code, it may be worth contacting the |
|
338 * Security team. |
|
339 * *******************************************************************************/ |
|
340 |
|
341 // |
|
342 // CuninstallStep |
|
343 // |
|
344 |
|
345 CuninstallStep::~CuninstallStep() |
|
346 { |
|
347 delete iUi; |
|
348 } |
|
349 |
|
350 CuninstallStep::CuninstallStep(TUninstallType aType, TBool aDoCancelTest) |
|
351 : iType(aType), iDoCancelTest(aDoCancelTest) |
|
352 { |
|
353 // Call base class method to set up the human readable name for logging |
|
354 SetTestStepName(KUninstallStep); |
|
355 } |
|
356 |
|
357 |
|
358 |
|
359 |
|
360 /** |
|
361 * Override of base class virtual. Prepares for the test run of SWIS |
|
362 * @return TVerdict code |
|
363 */ |
|
364 TVerdict CuninstallStep::doTestStepPreambleL() |
|
365 { |
|
366 // get step parameters |
|
367 TInt uid=0; |
|
368 |
|
369 TPtrC str; |
|
370 |
|
371 if (!GetHexFromConfig(ConfigSection(), _L("uid"), uid)) |
|
372 { |
|
373 INFO_PRINTF1(HTML_RED); |
|
374 ERR_PRINTF1(_L("Missing uid")); |
|
375 INFO_PRINTF1(HTML_RED_OFF); |
|
376 SetTestStepResult(EFail); |
|
377 return TestStepResult(); |
|
378 } |
|
379 |
|
380 iUid.iUid=uid; |
|
381 |
|
382 if (iType == EByPackage) |
|
383 { |
|
384 TPtrC vendorName; |
|
385 if (!GetStringFromConfig(ConfigSection(), _L("vendorName"), vendorName)) |
|
386 { |
|
387 INFO_PRINTF1(HTML_RED); |
|
388 ERR_PRINTF1(_L("Missing Vendor Name")); |
|
389 INFO_PRINTF1(HTML_RED_OFF); |
|
390 SetTestStepResult(EFail); |
|
391 return TestStepResult(); |
|
392 } |
|
393 iVendorName.Set(vendorName); |
|
394 |
|
395 TPtrC packageName; |
|
396 if (!GetStringFromConfig(ConfigSection(), _L("packageName"), packageName)) |
|
397 { |
|
398 INFO_PRINTF1(HTML_RED); |
|
399 ERR_PRINTF1(_L("Missing Package Name")); |
|
400 INFO_PRINTF1(HTML_RED_OFF); |
|
401 SetTestStepResult(EFail); |
|
402 return TestStepResult(); |
|
403 } |
|
404 iPackageName.Set(packageName); |
|
405 |
|
406 INFO_PRINTF4(_L("Uninstalling %D, %S, %S"), |
|
407 iUid.iUid, &iPackageName, &iVendorName); |
|
408 // create UI handler and populate the answers from XML file |
|
409 iUi = new(ELeave) TUI; |
|
410 |
|
411 } |
|
412 else if (iType== EByUid) |
|
413 { |
|
414 INFO_PRINTF2(_L("Uninstalling '%D'"), iUid.iUid); |
|
415 // create UI handler and populate the answers from XML file |
|
416 iUi = new(ELeave) TUI; |
|
417 |
|
418 } |
|
419 |
|
420 return TestStepResult(); |
|
421 } |
|
422 |
|
423 /** |
|
424 * Override of base class pure virtual |
|
425 * Demonstrates reading configuration parameters fom an ini file section |
|
426 * @return TVerdict code |
|
427 */ |
|
428 |
|
429 TInt CuninstallStep::DoUninstallL() |
|
430 { |
|
431 TInt err=0; |
|
432 |
|
433 INFO_PRINTF1(KUninstallStep); |
|
434 |
|
435 if (iType == EByUid) |
|
436 { |
|
437 // launch the installation |
|
438 err = Launcher::Uninstall(*iUi, iUid); |
|
439 return err; |
|
440 } |
|
441 else if (iType == EByPackage) |
|
442 { |
|
443 err = 0; |
|
444 |
|
445 // Go through list of packages from base package to get augmentations. |
|
446 CSisRegistryPackage* uninstallPackage=CSisRegistryPackage::NewLC(iUid, iPackageName, iVendorName); |
|
447 INFO_PRINTF3(_L("UnInstalling '%S', '%S'"), &iPackageName, &iVendorName); |
|
448 |
|
449 // err=Launcher::Uninstall(*iUi, *uninstallPackage); |
|
450 |
|
451 RSisRegistrySession registrySession; |
|
452 User::LeaveIfError(registrySession.Connect()); |
|
453 CleanupClosePushL(registrySession); |
|
454 |
|
455 RSisRegistryEntry registryEntry; |
|
456 |
|
457 User::LeaveIfError(registryEntry.Open(registrySession, iUid)); |
|
458 CleanupClosePushL(registryEntry); |
|
459 |
|
460 CSisRegistryPackage* package=registryEntry.PackageL(); |
|
461 CleanupStack::PushL(package); |
|
462 |
|
463 if (*package == *uninstallPackage) |
|
464 { |
|
465 err=Launcher::Uninstall(*iUi, *package); |
|
466 } |
|
467 else |
|
468 { |
|
469 // check augmenations |
|
470 RPointerArray<CSisRegistryPackage> augmentationPackages; |
|
471 CleanupResetAndDestroy<RPointerArray<CSisRegistryPackage> >::PushL(augmentationPackages); |
|
472 |
|
473 registryEntry.AugmentationsL(augmentationPackages); |
|
474 |
|
475 for (TInt i=0; i < augmentationPackages.Count(); ++i) |
|
476 { |
|
477 if (*augmentationPackages[i] == *uninstallPackage) |
|
478 { |
|
479 err=User::LeaveIfError(Launcher::Uninstall(*iUi, *augmentationPackages[i])); |
|
480 break; |
|
481 } |
|
482 } |
|
483 |
|
484 if (err != 0) |
|
485 { |
|
486 INFO_PRINTF1(HTML_RED); |
|
487 ERR_PRINTF2(_L("Package Augmentation Not found for '%s' "), &iPackageName); |
|
488 INFO_PRINTF1(HTML_RED_OFF); |
|
489 SetTestStepResult(EFail); |
|
490 return TestStepResult(); |
|
491 } |
|
492 |
|
493 CleanupStack::PopAndDestroy(&augmentationPackages); |
|
494 } |
|
495 |
|
496 CleanupStack::PopAndDestroy(3, ®istrySession); |
|
497 CleanupStack::PopAndDestroy(uninstallPackage); |
|
498 } |
|
499 return err; |
|
500 } |
|
501 |
|
502 /* ****************************************************************************** |
|
503 * End of copied code. |
|
504 * ******************************************************************************/ |
|
505 |
|
506 TVerdict CuninstallStep::doTestStepL() |
|
507 { |
|
508 INFO_PRINTF1(KUninstallStep); |
|
509 |
|
510 |
|
511 |
|
512 // Wait a fraction over a second. This is necessary because we may just |
|
513 // have been messing about with repository settings and if the install |
|
514 // happens really quickly we might not see a datestamp change (esp. on |
|
515 // hardware where the timestamp granularity is poor). |
|
516 User::After(1100000); |
|
517 User::LeaveIfError(DoUninstallL()); |
|
518 |
|
519 return TestStepResult(); |
|
520 } |
|
521 |
|
522 /** |
|
523 * Override of base class virtual |
|
524 * @return TVerdict code |
|
525 */ |
|
526 TVerdict CuninstallStep::doTestStepPostambleL() |
|
527 { |
|
528 CheckFilesExistL(); |
|
529 CheckFilesNonExistL(); |
|
530 return TestStepResult(); |
|
531 } |
|
532 |
|
533 // CResolverUninstallStep class |
|
534 |
|
535 /** constructor */ |
|
536 CResolverUninstallStep::CResolverUninstallStep(CuninstallStep::TUninstallType aType) |
|
537 : CuninstallStep(aType) |
|
538 { |
|
539 } |
|
540 |
|
541 /** nothing to do in destructor */ |
|
542 CResolverUninstallStep::~CResolverUninstallStep() |
|
543 { |
|
544 } |
|
545 |
|
546 /** runs CuninstallStep::doTestStepL and then |
|
547 do a WaitForEComReDiscoveryL */ |
|
548 TVerdict CResolverUninstallStep::doTestStepL() |
|
549 { |
|
550 TVerdict ret = CuninstallStep::doTestStepL(); |
|
551 if (ret == EPass) |
|
552 { |
|
553 WaitForEComReDiscoveryL(); |
|
554 } |
|
555 return ret; |
|
556 } |
|
557 |
|
558 Cinstallers::~Cinstallers() |
|
559 /** |
|
560 * Destructor |
|
561 */ |
|
562 { |
|
563 } |
|
564 |
|
565 Cinstallers::Cinstallers() |
|
566 /** |
|
567 * Constructor |
|
568 */ |
|
569 { |
|
570 } |
|
571 |
|
572 void Cinstallers::CheckFilesL(const TDesC& aNumEntries, |
|
573 const TDesC& aEntryBase, TBool aCheckExist) |
|
574 { |
|
575 TInt numEntries=0; |
|
576 TInt nErr=0; |
|
577 |
|
578 _LIT(Report_CheckFiles, "CheckFilesL"); |
|
579 INFO_PRINTF1(Report_CheckFiles); |
|
580 |
|
581 RFs fs; |
|
582 User::LeaveIfError(fs.Connect()); |
|
583 fs.ShareProtected(); |
|
584 CleanupClosePushL(fs); |
|
585 |
|
586 if (GetIntFromConfig(ConfigSection(), aNumEntries, numEntries) && numEntries!=0) |
|
587 { |
|
588 INFO_PRINTF1(Report_CheckFiles); |
|
589 TPtrC fname; |
|
590 for (TInt i=0; i<numEntries; i++) |
|
591 { |
|
592 // construct name of the key |
|
593 const TInt KKeyBufSize=64; |
|
594 TBuf<KKeyBufSize> keyBuf(aEntryBase); |
|
595 keyBuf.AppendNum(i); |
|
596 |
|
597 if (GetStringFromConfig(ConfigSection(), keyBuf, fname)) |
|
598 { |
|
599 TInt timeout=1e7; |
|
600 TInt wait=2.5e5; |
|
601 // check if the file (doesn't) exist. Give it some time if |
|
602 // we see a failure in case there's a race with the |
|
603 // (un)installer |
|
604 |
|
605 if (aCheckExist) |
|
606 { |
|
607 TInt sec=timeout; |
|
608 while (!BaflUtils::FileExists(fs, fname) && (sec>0)) |
|
609 { |
|
610 User::After(wait); |
|
611 sec -= wait; |
|
612 }; |
|
613 if (!BaflUtils::FileExists(fs, fname)) |
|
614 { |
|
615 INFO_PRINTF1(HTML_RED); |
|
616 ERR_PRINTF2(_L("File missing: %S"), &fname); |
|
617 INFO_PRINTF1(HTML_RED_OFF); |
|
618 nErr++; |
|
619 } |
|
620 } |
|
621 else |
|
622 { |
|
623 TInt sec=timeout; |
|
624 while (BaflUtils::FileExists(fs, fname) && (sec>0)) |
|
625 { |
|
626 User::After(wait); |
|
627 sec -= wait; |
|
628 }; |
|
629 if (BaflUtils::FileExists(fs, fname)) |
|
630 { |
|
631 INFO_PRINTF1(HTML_RED); |
|
632 ERR_PRINTF2(_L("File exists (but shouldn't): %S"), &fname); |
|
633 INFO_PRINTF1(HTML_RED_OFF); |
|
634 nErr++; |
|
635 } |
|
636 } |
|
637 } |
|
638 else |
|
639 { |
|
640 // the string must exist, otherwise the config is invalid |
|
641 INFO_PRINTF1(HTML_RED); |
|
642 ERR_PRINTF2(_L("Missing file name for key '%S'"), &keyBuf); |
|
643 INFO_PRINTF1(HTML_RED_OFF); |
|
644 nErr++; |
|
645 } |
|
646 } |
|
647 } |
|
648 |
|
649 if (nErr) |
|
650 SetTestStepResult(EFail); |
|
651 CleanupStack::PopAndDestroy(1, &fs); |
|
652 } |
|
653 |
|
654 void Cinstallers::CheckFilesExistL() |
|
655 { |
|
656 _LIT(KNumExist, "numexist"); // this specifies how many files to check for |
|
657 _LIT(KExistBase, "exist"); // + number (0-based) = file to check for |
|
658 CheckFilesL(KNumExist, KExistBase, ETrue); |
|
659 } |
|
660 |
|
661 void Cinstallers::CheckFilesNonExistL() |
|
662 { |
|
663 _LIT(KNumNonExist, "numnonexist"); // this specifies how many files to check for |
|
664 _LIT(KNonExistBase, "nonexist"); // + number (0-based) = file to check for |
|
665 CheckFilesL(KNumNonExist, KNonExistBase, EFalse); |
|
666 } |
|
667 |