stif/TestEngine/src/TestCaseController.cpp
changeset 26 4fde310f06fe
parent 0 a03f92240627
child 30 86a2e675b80a
equal deleted inserted replaced
21:f5d4820de50d 26:4fde310f06fe
   217     __TRACE( KVerbose, ( _L( "CTestCaseController::~CTestCaseController" ) ) );
   217     __TRACE( KVerbose, ( _L( "CTestCaseController::~CTestCaseController" ) ) );
   218     Cancel();
   218     Cancel();
   219 
   219 
   220     delete iRDebugLogger;
   220     delete iRDebugLogger;
   221     delete iTimeout;
   221     delete iTimeout;
   222 
   222     delete iTestCaseArguments;
   223     }
   223     }
   224 
   224 
   225 /*
   225 /*
   226 -------------------------------------------------------------------------------
   226 -------------------------------------------------------------------------------
   227 
   227 
   251                             iEngine->PanicClient( EReqPending, aMessage ) );
   251                             iEngine->PanicClient( EReqPending, aMessage ) );
   252     iMessage = aMessage;
   252     iMessage = aMessage;
   253 
   253 
   254     iState = ETestCaseRunning;
   254     iState = ETestCaseRunning;
   255     
   255     
       
   256     delete iTestCaseArguments;
       
   257     iTestCaseArguments = NULL;
       
   258     
       
   259     TInt testCaseArgumentsLength = iMessage.GetDesLength( 1 );
       
   260     if ( ( testCaseArgumentsLength != KErrArgument ) && ( testCaseArgumentsLength != KErrBadDescriptor ) )
       
   261         {
       
   262         iTestCaseArguments = HBufC::NewL( testCaseArgumentsLength );
       
   263         TPtr testCaseArgumentsPtr( iTestCaseArguments->Des() );
       
   264         User::LeaveIfError( iMessage.Read( 1, testCaseArgumentsPtr ) );
       
   265         iTestExecution.RunTestCase( iResultPckg, *iTestCaseArguments, iStatus );        
       
   266         }
       
   267     else
       
   268         {    
       
   269         iTestExecution.RunTestCase( iResultPckg, iStatus );
       
   270         }
   256     SetActive();
   271     SetActive();
   257 
       
   258     iTestExecution.RunTestCase( iResultPckg, iStatus );    
       
   259 
   272 
   260     // If testcase has timeout (handler), then start it
   273     // If testcase has timeout (handler), then start it
   261     if ( iTimeout )
   274     if ( iTimeout )
   262         {
   275         {
   263         iTimeout->Start();
   276         iTimeout->Start();
  2565         {
  2578         {
  2566         // Print reset module name
  2579         // Print reset module name
  2567         __TRACE( KInit, (  _L("Loaded reset module[%S]"), &dllName ) );
  2580         __TRACE( KInit, (  _L("Loaded reset module[%S]"), &dllName ) );
  2568         }
  2581         }
  2569 
  2582 
  2570     // Verify the UID
  2583     
  2571     TUid KUidTestModule = TUid::Uid ( 0x101FB3E7 );
       
  2572     TUidType requiredUID( KDynamicLibraryUid, KSharedLibraryUid, KUidTestModule );
       
  2573 
       
  2574     TUidType moduleUID = resetModule.Type();    
       
  2575     if ( moduleUID != requiredUID )
       
  2576         {
       
  2577         // New instance can't be created
       
  2578         RDebug::Print( ( _L("STIF TF: Reset module has invalid UID. Aborting loading!") ) );
       
  2579         __TRACE ( KError, ( CStifLogger::EError, _L("Reset module has invalid UID. Aborting loading!" ) ) );
       
  2580         return KErrNotSupported;
       
  2581         }
       
  2582 
  2584 
  2583     // Get pointer to first exported function
  2585     // Get pointer to first exported function
  2584     CTestInterfaceFactory libEntry;
  2586     CTestInterfaceFactory libEntry;
  2585     libEntry = (CTestInterfaceFactory) resetModule.Lookup( 1 );
  2587     libEntry = (CTestInterfaceFactory) resetModule.Lookup( 1 );
  2586     if ( libEntry == NULL )
  2588     if ( libEntry == NULL )