installationservices/swi/test/tsisfile/steps/basestep.cpp
changeset 60 245df5276b97
parent 0 ba25891c3a9e
equal deleted inserted replaced
53:ae54820ef82c 60:245df5276b97
     1 /*
     1 /*
     2 * Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
     2 * Copyright (c) 2002-2010 Nokia Corporation and/or its subsidiary(-ies).
     3 * All rights reserved.
     3 * All rights reserved.
     4 * This component and the accompanying materials are made available
     4 * This component and the accompanying materials are made available
     5 * under the terms of the License "Eclipse Public License v1.0"
     5 * under the terms of the License "Eclipse Public License v1.0"
     6 * which accompanies this distribution, and is available
     6 * which accompanies this distribution, and is available
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
   139 					ERR_PRINTF2(_L("Failed to read contents data: error %d"), err);					
   139 					ERR_PRINTF2(_L("Failed to read contents data: error %d"), err);					
   140 					}
   140 					}
   141 				SetTestStepResult(err);		
   141 				SetTestStepResult(err);		
   142 				User::Leave(err);
   142 				User::Leave(err);
   143 				}
   143 				}
       
   144 #ifdef SIS_CRC_CHECK_ENABLED			
   144 			TRAP(err, contents->CheckCrcL());
   145 			TRAP(err, contents->CheckCrcL());
   145 			if (err == KErrCorrupt)
   146 			if (err == KErrCorrupt)
   146 				{
   147 				{
   147 				ERR_PRINTF1(_L("Crc values in SIS file are incorrect"));
   148 				ERR_PRINTF1(_L("Crc values in SIS file are incorrect"));
   148 				SetTestStepResult(err);		
   149 				SetTestStepResult(err);		
   149 				User::Leave(err);
   150 				User::Leave(err);
   150 				}
   151 				}
       
   152 #endif  			
   151 			CleanupStack::Pop(contents);	
   153 			CleanupStack::Pop(contents);	
   152 			return contents;								
   154 			return contents;	
   153 			}
   155 			
   154 			
   156 			}		
   155 	CController* CParserTestStep::GetControllerL(CContents& contents, TBool aUseInPlaceParse)
   157 	CController* CParserTestStep::GetControllerL(CContents& contents, TBool aUseInPlaceParse)
   156 		{
   158 		{
   157 		TRAPD(err, iControllerData = contents.ReadControllerL());
   159 		TRAPD(err, iControllerData = contents.ReadControllerL());
   158 
   160 
   159 		if (err != KErrNone)
   161 		if (err != KErrNone)