persistentstorage/centralrepository/test/t_cenrep_rfs.cpp
branchRCL_3
changeset 24 cc28652e0254
parent 23 26645d81f48d
equal deleted inserted replaced
23:26645d81f48d 24:cc28652e0254
    71 		}
    71 		}
    72 	}
    72 	}
    73 #define TEST(arg) ::CheckL((arg), __LINE__)
    73 #define TEST(arg) ::CheckL((arg), __LINE__)
    74 #define TEST2(aValue, aExpected) ::CheckL(aValue, aExpected, __LINE__)
    74 #define TEST2(aValue, aExpected) ::CheckL(aValue, aExpected, __LINE__)
    75 
    75 
    76 // This function kills the C32exe.exe process. This commsdat process will
       
    77 // interfere with the test if not killed. In a nutshell, some of the test cases 
       
    78 // will kill and then wait for 2 seconds and restart the centrep server 
       
    79 // with --SoftReset option. During that 2 seconds wait sometimes C32exe.exe 
       
    80 // will use centrep API, thus starting the server normally without --SoftReset.
       
    81 LOCAL_C void KillC32Exe()
       
    82     {
       
    83     _LIT( KC32ServerName, "c32exe");
       
    84     KillProcess(KC32ServerName); // Don't need to check the return code, it always return KErrNone anyway.
       
    85     User::After(KGeneralDelay);
       
    86     }
       
    87 
    76 
    88 //This function restores the state of the files required for this test
    77 //This function restores the state of the files required for this test
    89 //Existing files are deleted and then the required files are copied
    78 //Existing files are deleted and then the required files are copied
    90 //back from the Z drive to the c drive
    79 //back from the Z drive to the c drive
    91 LOCAL_C void RestoreRFSTestFilesL(TRepositoryFileState aState)
    80 LOCAL_C void RestoreRFSTestFilesL(TRepositoryFileState aState)
   631 */
   620 */
   632 LOCAL_C void MainL()
   621 LOCAL_C void MainL()
   633 	{
   622 	{
   634 	TheTest.Start(_L(" @SYMTestCaseID:SYSLIB-CENTRALREPOSITORY-CT-0497-0001 Restore Factory Settings tests "));
   623 	TheTest.Start(_L(" @SYMTestCaseID:SYSLIB-CENTRALREPOSITORY-CT-0497-0001 Restore Factory Settings tests "));
   635 	CleanupCDriveL();
   624 	CleanupCDriveL();
   636 	KillC32Exe(); //Need to kill C32Exe as it is interfering with the test.
       
   637 	RestoreFactorySettingsTestL();
   625 	RestoreFactorySettingsTestL();
   638 	PDEF105203();
   626 	PDEF105203();
   639 	RFSRomOnlyL();
   627 	RFSRomOnlyL();
   640 	RFSRomAndInstallL();
   628 	RFSRomAndInstallL();
   641 	RFSInstallOnlyL();
   629 	RFSInstallOnlyL();