loggingservices/eventlogger/test/src/t_logapi.cpp
branchRCL_3
changeset 24 cc28652e0254
parent 23 26645d81f48d
equal deleted inserted replaced
23:26645d81f48d 24:cc28652e0254
   778 	
   778 	
   779 	//Create the directory c:\private\10202be9\ if it does not exist.
   779 	//Create the directory c:\private\10202be9\ if it does not exist.
   780 	_LIT(KExecutableFileName,		"t_logapi_helper.exe");
   780 	_LIT(KExecutableFileName,		"t_logapi_helper.exe");
   781 	_LIT(KCommandParameters,		"c:\\private\\10202be9\\;c:\\private\\10202be9\\101f401d.txt;3");
   781 	_LIT(KCommandParameters,		"c:\\private\\10202be9\\;c:\\private\\10202be9\\101f401d.txt;3");
   782 	RProcess process;
   782 	RProcess process;
   783 	TRequestStatus processWaitStatus;
       
   784 	TInt r = process.Create(KExecutableFileName, KCommandParameters); 
   783 	TInt r = process.Create(KExecutableFileName, KCommandParameters); 
   785 	TEST(r == KErrNone);
       
   786 	process.Logon(processWaitStatus);
       
   787 	process.Resume();
   784 	process.Resume();
   788 	User::WaitForRequest(processWaitStatus);
   785 	process.Close();	 
   789 	TEST(processWaitStatus.Int() == KErrNone);
   786 	User::After(1000);
   790 	process.Close();
       
   791 	
   787 	
   792 	 //copy the repository file to the folder 10202be9
   788 	 //copy the repository file to the folder 10202be9
   793 	_LIT(KCommandParameters1,		"z:\\test\\101f401d_TEST.txt;c:\\private\\10202be9\\101f401d.txt;0");
   789 	_LIT(KCommandParameters1,		"z:\\test\\101f401d_TEST.txt;c:\\private\\10202be9\\101f401d.txt;0");
   794 	r = process.Create(KExecutableFileName, KCommandParameters1); 
   790 	r = process.Create(KExecutableFileName, KCommandParameters1); 
   795 	TEST(r == KErrNone);
       
   796 	process.Logon(processWaitStatus);
       
   797 	process.Resume();
   791 	process.Resume();
   798 	User::WaitForRequest(processWaitStatus);
   792 	process.Close();	 
   799 	TEST(processWaitStatus.Int() == KErrNone);
   793 	User::After(1000);
   800 	process.Close();
       
   801 	
   794 	
   802 	TestUtils::DeleteDatabaseL();
   795 	TestUtils::DeleteDatabaseL();
   803 	
   796 	
   804 	//Get the config settings.
   797 	//Get the config settings.
   805 	config.iMaxEventAge = 0;
   798 	config.iMaxEventAge = 0;
   835 	TEST(contactNameFormat == 1);
   828 	TEST(contactNameFormat == 1);
   836 	
   829 	
   837 	//delete the repository file c:\\private\\10202be9\\101f401d.txt.
   830 	//delete the repository file c:\\private\\10202be9\\101f401d.txt.
   838 	_LIT(KCommandParameters2,		"c:\\private\\10202be9\\101f401d.txt;private\\10202be9\101f401d.txt;2");
   831 	_LIT(KCommandParameters2,		"c:\\private\\10202be9\\101f401d.txt;private\\10202be9\101f401d.txt;2");
   839 	r = process.Create(KExecutableFileName, KCommandParameters2); 
   832 	r = process.Create(KExecutableFileName, KCommandParameters2); 
   840 	TEST(r == KErrNone);
       
   841 	process.Logon(processWaitStatus);
       
   842 	process.Resume();
   833 	process.Resume();
   843 	User::WaitForRequest(processWaitStatus);
   834 	process.Close();	 
   844 	TEST(processWaitStatus.Int() == KErrNone);
   835 	User::After(1000);
   845 	process.Close();
       
   846 
       
   847 	theLog.Write(_L8("Deleting the Log engine database... \n"));	
   836 	theLog.Write(_L8("Deleting the Log engine database... \n"));	
   848 	TestUtils::DeleteDatabaseL();
   837 	TestUtils::DeleteDatabaseL();
   849 	TheTest.Next(_L("Delay of 2 min, the necessary time to central repository to unload its cache... "));	
   838 	TheTest.Next(_L("Delay of 2 min, the necessary time to central repository to unload its cache... "));	
   850 	User::After(125000000); // Delay to time to cenrep to unload its cache.
   839 	User::After(125000000); // Delay to time to cenrep to unload its cache.
   851 	}
   840 	}