equal
deleted
inserted
replaced
1 // Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). |
1 // Copyright (c) 2004-2010 Nokia Corporation and/or its subsidiary(-ies). |
2 // All rights reserved. |
2 // All rights reserved. |
3 // This component and the accompanying materials are made available |
3 // This component and the accompanying materials are made available |
4 // under the terms of "Eclipse Public License v1.0" |
4 // under the terms of "Eclipse Public License v1.0" |
5 // which accompanies this distribution, and is available |
5 // which accompanies this distribution, and is available |
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
83 _LIT( KC32ServerName, "c32exe"); |
83 _LIT( KC32ServerName, "c32exe"); |
84 KillProcess(KC32ServerName); // Don't need to check the return code, it always return KErrNone anyway. |
84 KillProcess(KC32ServerName); // Don't need to check the return code, it always return KErrNone anyway. |
85 User::After(KGeneralDelay); |
85 User::After(KGeneralDelay); |
86 } |
86 } |
87 |
87 |
|
88 LOCAL_C void KillCentrepExe() |
|
89 { |
|
90 _LIT( KCentralRepositoryServerName, "Centralrepositorysrv"); |
|
91 KillProcess(KCentralRepositoryServerName); // Don't need to check the return code, it always return KErrNone anyway. |
|
92 User::After(KGeneralDelay); |
|
93 } |
|
94 |
88 //This function restores the state of the files required for this test |
95 //This function restores the state of the files required for this test |
89 //Existing files are deleted and then the required files are copied |
96 //Existing files are deleted and then the required files are copied |
90 //back from the Z drive to the c drive |
97 //back from the Z drive to the c drive |
91 LOCAL_C void RestoreRFSTestFilesL(TRepositoryFileState aState) |
98 LOCAL_C void RestoreRFSTestFilesL(TRepositoryFileState aState) |
92 { |
99 { |
180 } |
187 } |
181 |
188 |
182 |
189 |
183 LOCAL_C void RestoreFactorySettingsTestL() |
190 LOCAL_C void RestoreFactorySettingsTestL() |
184 { |
191 { |
185 TheTest.Start(_L("ResetAllRepositoriesTestL")); |
192 TheTest.Start(_L("RestoreFactorySettingsTestL")); |
186 TInt r; |
193 TInt r; |
187 TInt i; |
194 TInt i; |
188 TBuf<20> str; |
195 TBuf<20> str; |
189 |
196 |
190 TheTest.Next(_L("Open repository to ensure server is running")); |
197 TheTest.Next(_L("Open repository to ensure server is running")); |
245 // Close repository |
252 // Close repository |
246 CleanupStack::PopAndDestroy(repository); |
253 CleanupStack::PopAndDestroy(repository); |
247 |
254 |
248 TheTest.End(); |
255 TheTest.End(); |
249 } |
256 } |
250 |
|
251 |
257 |
252 |
258 |
253 /** |
259 /** |
254 @SYMTestCaseID SYSLIB-CENTRALREPOSITORY-CT-3341 |
260 @SYMTestCaseID SYSLIB-CENTRALREPOSITORY-CT-3341 |
255 @SYMTestCaseDesc Restore factory Settings from Rom file. |
261 @SYMTestCaseDesc Restore factory Settings from Rom file. |
632 LOCAL_C void MainL() |
638 LOCAL_C void MainL() |
633 { |
639 { |
634 TheTest.Start(_L(" @SYMTestCaseID:SYSLIB-CENTRALREPOSITORY-CT-0497-0001 Restore Factory Settings tests ")); |
640 TheTest.Start(_L(" @SYMTestCaseID:SYSLIB-CENTRALREPOSITORY-CT-0497-0001 Restore Factory Settings tests ")); |
635 CleanupCDriveL(); |
641 CleanupCDriveL(); |
636 KillC32Exe(); //Need to kill C32Exe as it is interfering with the test. |
642 KillC32Exe(); //Need to kill C32Exe as it is interfering with the test. |
|
643 KillCentrepExe(); |
637 RestoreFactorySettingsTestL(); |
644 RestoreFactorySettingsTestL(); |
638 PDEF105203(); |
645 PDEF105203(); |
639 RFSRomOnlyL(); |
646 RFSRomOnlyL(); |
640 RFSRomAndInstallL(); |
647 RFSRomAndInstallL(); |
641 RFSInstallOnlyL(); |
648 RFSInstallOnlyL(); |