--- a/hti/HtiServicePlugins/HtiFtpServicePlugin/src/HtiFtpServicePlugin.cpp Wed Jun 09 11:23:41 2010 +0300
+++ b/hti/HtiServicePlugins/HtiFtpServicePlugin/src/HtiFtpServicePlugin.cpp Mon Jun 21 17:25:56 2010 +0300
@@ -682,15 +682,33 @@
TInt newNameLength = aMessage[newNamePos];
GetFileNameL( aMessage.Mid( newNamePos, newNameLength + 1 ), aUnicode );
+ TInt msglen = aMessage.Length();
+ TInt recurse = 1;
+ if(msglen>originalLenngth+newNameLength+3)
+ {
+ recurse = aMessage[newNamePos+1+newNameLength];
+ }
+
+ TInt err=0;
if ( IsFileTcb( origName ) || IsFileTcb( iFileName ) )
{
HandleTcbCopyL( origName, iFileName );
}
else{
iHandlerAO = new ( ELeave ) CFtpHandlerAO( this );
- TInt err = iFileMan->Copy( origName, iFileName,
+
+ if (recurse)
+ {
+ err = iFileMan->Copy( origName, iFileName,
( CFileMan::EOverWrite | CFileMan::ERecurse ),
iHandlerAO->iStatus );
+ }
+ else
+ {
+ err = iFileMan->Copy( origName, iFileName,
+ ( CFileMan::EOverWrite ),
+ iHandlerAO->iStatus );
+ }
if ( err == KErrNone)
{
--- a/hti/hti_plat/hti_api/inc/HtiVersion.h Wed Jun 09 11:23:41 2010 +0300
+++ b/hti/hti_plat/hti_api/inc/HtiVersion.h Mon Jun 21 17:25:56 2010 +0300
@@ -25,13 +25,13 @@
// CONSTANTS
const TUint8 KHtiVersionMajor = 2;
-const TUint8 KHtiVersionMinor = 23;
+const TUint8 KHtiVersionMinor = 24;
const TUint8 KHtiVersionBuild = 0;
const TUint16 KHtiVersionYear = 2010;
const TUint8 KHtiVersionMonth = 5;
-const TUint8 KHtiVersionWeek = 19;
-const TUint8 KHtiVersionDay = 14;
+const TUint8 KHtiVersionWeek = 21;
+const TUint8 KHtiVersionDay = 28;
// MACROS
--- a/stif/TestCombiner/inc/TestCase.h Wed Jun 09 11:23:41 2010 +0300
+++ b/stif/TestCombiner/inc/TestCase.h Mon Jun 21 17:25:56 2010 +0300
@@ -207,8 +207,8 @@
TDesC& aModuleName,
TDesC& aTestId,
TInt aExpectedResult,
- TFullTestResult::TCaseExecutionResult
- aCategory,
+ TFullTestResult::TCaseExecutionResult aCategory,
+ const TDesC& aTestCaseArguments,
CTCTestModule* aModule ); //--PYTHON--
/**
@@ -228,6 +228,11 @@
const TDesC& ModuleName(){ return *iModuleName; }
/**
+ * Get test case arguments
+ */
+ const TDesC& TestCaseArguments() const;
+
+ /**
* Get reference to RTestExecution.
*/
RTestExecution& TestExecution(){ return iTestExecution; }
@@ -269,12 +274,13 @@
CTCTestCase( CTestCombiner* testCombiner,
TInt aExpectedResult,
TFullTestResult::TCaseExecutionResult aCategory,
+ const TDesC& aTestCaseArguments,
CTCTestModule* aModule ); //--PYTHON--
/**
* By default Symbian OS constructor is private.
*/
- void ConstructL( TDesC& aModuleName, TDesC& aTestId );
+ void ConstructL( TDesC& aModuleName, TDesC& aTestId, const TDesC& aTestCaseArguments );
/**
* Start complete the testcase(Complete2 make the final complete).
@@ -298,6 +304,9 @@
// Module name
HBufC* iModuleName;
+ // Test case arguments
+ HBufC* iTestCaseArguments;
+
// Handle to test case execution
RTestExecution iTestExecution;
--- a/stif/TestCombiner/inc/TestCombinerUtils.h Wed Jun 09 11:23:41 2010 +0300
+++ b/stif/TestCombiner/inc/TestCombinerUtils.h Mon Jun 21 17:25:56 2010 +0300
@@ -91,6 +91,11 @@
*/
void SetTitleL(TDesC& aTitle);
+ /**
+ * Sets test case arguments.
+ */
+ void SetTestCaseArgumentsL( const TDesC& aTestCaseArguments );
+
private:
/**
* C++ default constructor.
@@ -112,6 +117,7 @@
TFullTestResult::TCaseExecutionResult iCategory;
TInt iTimeout;
TPtrC iTitle;
+ TPtrC iTestCaseArguments;
private:
HBufC* iModuleBuf;
@@ -119,7 +125,7 @@
HBufC* iConfigBuf;
HBufC* iTestIdBuf;
HBufC* iTitleBuf;
-
+ HBufC* iTestCaseArgumentsBuf;
};
// CLASS DECLARATION
--- a/stif/TestCombiner/inc/TestKeywords.h Wed Jun 09 11:23:41 2010 +0300
+++ b/stif/TestCombiner/inc/TestKeywords.h Mon Jun 21 17:25:56 2010 +0300
@@ -82,6 +82,7 @@
ECategory,
ECaseTimeout,
ECaseTitle,
+ EArgs,
};
// pause keyword optional arguments
--- a/stif/TestCombiner/src/TestCase.cpp Wed Jun 09 11:23:41 2010 +0300
+++ b/stif/TestCombiner/src/TestCase.cpp Mon Jun 21 17:25:56 2010 +0300
@@ -336,6 +336,7 @@
CTCTestCase::CTCTestCase( CTestCombiner* testCombiner,
TInt aExpectedResult,
TFullTestResult::TCaseExecutionResult aCategory,
+ const TDesC& aTestCaseArguments,
CTCTestModule* aModule ): //--PYTHON
CTestCase( testCombiner, aExpectedResult, aCategory, ECaseLocal, aModule ), //--PYTHON
iResultPckg( iResult )
@@ -365,12 +366,13 @@
*/
void CTCTestCase::ConstructL( TDesC& aModuleName,
- TDesC& aTestId )
+ TDesC& aTestId,
+ const TDesC& aTestCaseArguments )
{
__ASSERT_ALWAYS( aModuleName.Length() < KMaxFileName, User::Leave( KErrArgument ) );
CTestCase::ConstructL( aTestId );
iModuleName = aModuleName.AllocL();
-
+ iTestCaseArguments = aTestCaseArguments.AllocL();
}
/*
@@ -397,17 +399,18 @@
TDesC& aModuleName,
TDesC& aTestId,
TInt aExpectedResult,
- TFullTestResult::TCaseExecutionResult
- aCategory,
+ TFullTestResult::TCaseExecutionResult aCategory,
+ const TDesC& aTestCaseArguments,
CTCTestModule* aModule ) //--PYTHON
{
CTCTestCase* self = new (ELeave) CTCTestCase( testCombiner,
aExpectedResult,
aCategory,
+ aTestCaseArguments,
aModule ); //--PYTHON
CleanupStack::PushL( self );
- self->ConstructL( aModuleName, aTestId );
+ self->ConstructL( aModuleName, aTestId, aTestCaseArguments );
CleanupStack::Pop();
return self;
@@ -475,6 +478,7 @@
delete iProgress;
delete iModuleName;
+ delete iTestCaseArguments;
delete iCommand;
}
@@ -484,6 +488,34 @@
Class: CTCTestCase
+ Method: TestCaseArguments
+
+ Description: Get test case arguments
+
+ Parameters: None.
+
+ Return Values: Test case arguments.
+
+ Errors/Exceptions: None.
+
+ Status: Proposal
+
+-------------------------------------------------------------------------------
+*/
+const TDesC& CTCTestCase::TestCaseArguments() const
+ {
+ if ( iTestCaseArguments !=NULL )
+ {
+ return *iTestCaseArguments;
+ }
+ return KNullDesC;
+ }
+
+/*
+-------------------------------------------------------------------------------
+
+ Class: CTCTestCase
+
Method: DoCancel
Description: Derived from CActive, handles the Cancel.
--- a/stif/TestCombiner/src/TestCombiner.cpp Wed Jun 09 11:23:41 2010 +0300
+++ b/stif/TestCombiner/src/TestCombiner.cpp Mon Jun 21 17:25:56 2010 +0300
@@ -1652,6 +1652,7 @@
aStartInfo.iTestId,
aStartInfo.iExpectedResult,
aStartInfo.iCategory,
+ aStartInfo.iTestCaseArguments,
module ); //--PYTHON--
CleanupStack::PushL( tc );
@@ -1694,7 +1695,14 @@
&aStartInfo.iTestId, &aStartInfo.iModule, &aStartInfo.iIniFile,
&aStartInfo.iConfig, aStartInfo.iCaseNum, aStartInfo.iExpectedResult );
- tc->TestExecution().RunTestCase( tc->iResultPckg, tc->iStatus );
+ if ( tc->TestCaseArguments().Length() > 0 )
+ {
+ tc->TestExecution().RunTestCase( tc->iResultPckg, tc->TestCaseArguments(), tc->iStatus );
+ }
+ else
+ {
+ tc->TestExecution().RunTestCase( tc->iResultPckg, tc->iStatus );
+ }
iRunningTests++;
@@ -3286,6 +3294,12 @@
aStartInfo.SetTitleL(val);
break;
}
+ case TTCKeywords::EArgs:
+ {
+ __TRACE( KMessage, (_L("case arguments=%S"), &val));
+ aStartInfo.SetTestCaseArgumentsL( val );
+ }
+ break;
default:
{
__TRACE( KError, (_L("Unknown or illegal keyword")));
--- a/stif/TestCombiner/src/TestCombinerUtils.cpp Wed Jun 09 11:23:41 2010 +0300
+++ b/stif/TestCombiner/src/TestCombinerUtils.cpp Mon Jun 21 17:25:56 2010 +0300
@@ -86,7 +86,8 @@
iIniFileBuf(0),
iConfigBuf(0),
iTestIdBuf(0),
- iTitleBuf(0)
+ iTitleBuf(0),
+ iTestCaseArgumentsBuf(0)
{
iCategory = TFullTestResult::ECaseExecuted;
@@ -177,6 +178,7 @@
delete iConfigBuf;
delete iTestIdBuf;
delete iTitleBuf;
+ delete iTestCaseArgumentsBuf;
}
/*
@@ -355,6 +357,34 @@
/*
-------------------------------------------------------------------------------
+ Class: CStartInfo
+
+ Method: SetTestCaseArguments
+
+ Description: Sets test case arguments
+
+ Parameters: const TDesC& aTestCaseArguments: in: test case arguments.
+
+ Return Values: None
+
+ Errors/Exceptions: None
+
+ Status: Proposal
+
+-------------------------------------------------------------------------------
+*/
+void CStartInfo::SetTestCaseArgumentsL( const TDesC& aTestCaseArguments )
+ {
+ delete iTestCaseArgumentsBuf;
+ iTestCaseArgumentsBuf = NULL;
+ iTestCaseArgumentsBuf = aTestCaseArguments.AllocL();
+ iTestCaseArguments.Set( iTestCaseArgumentsBuf->Des() );
+ }
+
+
+/*
+-------------------------------------------------------------------------------
+
DESCRIPTION
This module contains the implementation of CSlaveInfo class
--- a/stif/TestCombiner/src/TestKeywords.cpp Wed Jun 09 11:23:41 2010 +0300
+++ b/stif/TestCombiner/src/TestKeywords.cpp Mon Jun 21 17:25:56 2010 +0300
@@ -139,6 +139,7 @@
(TText*)L"category",
(TText*)L"timeout",
(TText*)L"title",
+ (TText*)L"args",
};
if( aArg >= (TInt)(sizeof( runOptArgs )/sizeof(TText*)) )
--- a/stif/TestEngine/BWINS/STIFTESTENGINEU.DEF Wed Jun 09 11:23:41 2010 +0300
+++ b/stif/TestEngine/BWINS/STIFTESTENGINEU.DEF Mon Jun 21 17:25:56 2010 +0300
@@ -61,4 +61,5 @@
?StoreEngineSettings@RSettingServer@@QAEHAAUTEngineSettings@@@Z @ 60 NONAME ; int RSettingServer::StoreEngineSettings(struct TEngineSettings &)
?GetFormatL@CSTIFTestFrameworkSettings@@QAEHPAVCStifSectionParser@@VTPtrC16@@AAW4TLoggerType@CStifLogger@@AAH@Z @ 61 NONAME ; int CSTIFTestFrameworkSettings::GetFormatL(class CStifSectionParser *, class TPtrC16, enum CStifLogger::TLoggerType &, int &)
?AddTestCaseResultToTestReport@RTestEngine@@QAEHABVTTestInfo@@ABVTFullTestResult@@H@Z @ 62 NONAME ; int RTestEngine::AddTestCaseResultToTestReport(class TTestInfo const &, class TFullTestResult const &, int)
+ ?RunTestCase@RTestCase@@QAEXAAV?$TPckg@VTFullTestResult@@@@ABVTDesC16@@AAVTRequestStatus@@@Z @ 63 NONAME ; void RTestCase::RunTestCase(class TPckg<class TFullTestResult> &, class TDesC16 const &, class TRequestStatus &)
--- a/stif/TestEngine/eabi/StifTestEngineu.def Wed Jun 09 11:23:41 2010 +0300
+++ b/stif/TestEngine/eabi/StifTestEngineu.def Mon Jun 21 17:25:56 2010 +0300
@@ -110,4 +110,5 @@
_ZTV21CTestEngineSubSession @ 109 NONAME ; #<VT>#
_ZN26CSTIFTestFrameworkSettings10GetFormatLEP18CStifSectionParser7TPtrC16RN11CStifLogger11TLoggerTypeERi @ 110 NONAME
_ZN11RTestEngine29AddTestCaseResultToTestReportERK9TTestInfoRK15TFullTestResulti @ 111 NONAME
+ _ZN9RTestCase11RunTestCaseER5TPckgI15TFullTestResultERK7TDesC16R14TRequestStatus @ 112 NONAME
--- a/stif/TestEngine/inc/TestCaseController.h Wed Jun 09 11:23:41 2010 +0300
+++ b/stif/TestEngine/inc/TestCaseController.h Mon Jun 21 17:25:56 2010 +0300
@@ -176,6 +176,9 @@
// Test Info
TTestInfo iTestInfo;
+ // Test case arguments
+ HBufC* iTestCaseArguments;
+
// Internal state
TTestCaseStatus iState;
--- a/stif/TestEngine/src/TestCaseController.cpp Wed Jun 09 11:23:41 2010 +0300
+++ b/stif/TestEngine/src/TestCaseController.cpp Mon Jun 21 17:25:56 2010 +0300
@@ -219,7 +219,7 @@
delete iRDebugLogger;
delete iTimeout;
-
+ delete iTestCaseArguments;
}
/*
@@ -253,10 +253,23 @@
iState = ETestCaseRunning;
+ delete iTestCaseArguments;
+ iTestCaseArguments = NULL;
+
+ TInt testCaseArgumentsLength = iMessage.GetDesLength( 1 );
+ if ( ( testCaseArgumentsLength != KErrArgument ) && ( testCaseArgumentsLength != KErrBadDescriptor ) )
+ {
+ iTestCaseArguments = HBufC::NewL( testCaseArgumentsLength );
+ TPtr testCaseArgumentsPtr( iTestCaseArguments->Des() );
+ User::LeaveIfError( iMessage.Read( 1, testCaseArgumentsPtr ) );
+ iTestExecution.RunTestCase( iResultPckg, *iTestCaseArguments, iStatus );
+ }
+ else
+ {
+ iTestExecution.RunTestCase( iResultPckg, iStatus );
+ }
SetActive();
- iTestExecution.RunTestCase( iResultPckg, iStatus );
-
// If testcase has timeout (handler), then start it
if ( iTimeout )
{
--- a/stif/TestEngine/src/TestEngineClient.cpp Wed Jun 09 11:23:41 2010 +0300
+++ b/stif/TestEngine/src/TestEngineClient.cpp Mon Jun 21 17:25:56 2010 +0300
@@ -661,6 +661,37 @@
Class: RTestCase
+ Method: RunTestCase
+
+ Description: Run a test case asynchronously.
+
+ Parameters: TFullTestResultPckg& aTestResult : TFullTestResult :
+ Test Result package
+ const TDesC& aTestCaseArgs: Test case arguments
+ TRequestStatus& aStatus : Request status
+
+ Return Values: TInt KErrNone : Test case could be run
+ Other error code : Reason the test case couldn't be run
+
+ Errors/Exceptions: None
+
+ Status: Approved
+
+-------------------------------------------------------------------------------
+*/
+EXPORT_C void RTestCase::RunTestCase( TFullTestResultPckg& aTestResult,
+ const TDesC& aTestCaseArgs,
+ TRequestStatus& aStatus )
+ {
+ TIpcArgs args( &aTestResult, &aTestCaseArgs, TIpcArgs::ENothing );
+ SendReceive( ETestCaseRunTestCase, args, aStatus );
+ }
+
+/*
+-------------------------------------------------------------------------------
+
+ Class: RTestCase
+
Method: Pause
Description: Pause suspends the execution of the test case.
--- a/stif/TestInterface/BWINS/STIFTESTINTERFACEU.DEF Wed Jun 09 11:23:41 2010 +0300
+++ b/stif/TestInterface/BWINS/STIFTESTINTERFACEU.DEF Mon Jun 21 17:25:56 2010 +0300
@@ -137,4 +137,5 @@
?GetLocalValue@CScriptBase@@IAEHABVTDesC16@@AAH@Z @ 136 NONAME ; int CScriptBase::GetLocalValue(class TDesC16 const &, int &)
?GetLocalValue@CScriptBase@@IAEHABVTDesC16@@AAN@Z @ 137 NONAME ; int CScriptBase::GetLocalValue(class TDesC16 const &, double &)
?GetLocalValue@CScriptBase@@IAEHABVTDesC16@@AAVTDes16@@@Z @ 138 NONAME ; int CScriptBase::GetLocalValue(class TDesC16 const &, class TDes16 &)
+ ?GetTestCaseArguments@CTestModuleIf@@QBEABVTDesC16@@XZ @ 139 NONAME ; class TDesC16 const & CTestModuleIf::GetTestCaseArguments(void) const
--- a/stif/TestInterface/eabi/StifTestInterfaceu.def Wed Jun 09 11:23:41 2010 +0300
+++ b/stif/TestInterface/eabi/StifTestInterfaceu.def Mon Jun 21 17:25:56 2010 +0300
@@ -183,4 +183,5 @@
_ZN11CScriptBase13SetLocalValueERK7TDesC16S2_ @ 182 NONAME
_ZN11CScriptBase13SetLocalValueERK7TDesC16d @ 183 NONAME
_ZN11CScriptBase13SetLocalValueERK7TDesC16i @ 184 NONAME
+ _ZNK13CTestModuleIf20GetTestCaseArgumentsEv @ 185 NONAME
--- a/stif/TestInterface/src/TestModuleIf.cpp Wed Jun 09 11:23:41 2010 +0300
+++ b/stif/TestInterface/src/TestModuleIf.cpp Mon Jun 21 17:25:56 2010 +0300
@@ -1403,6 +1403,30 @@
Class: CTestModuleIf
+ Method: GetTestCaseArguments
+
+ Description: Returns test case arguments.
+
+ Parameters: none
+
+ Return Values: test case arguments.
+
+ Errors/Exceptions: None
+
+ Status: proposal
+
+-------------------------------------------------------------------------------
+*/
+EXPORT_C const TDesC& CTestModuleIf::GetTestCaseArguments() const
+ {
+ return iTestExecution->GetTestCaseArguments();
+ }
+
+/*
+-------------------------------------------------------------------------------
+
+ Class: CTestModuleIf
+
Method: UITesting
Description: Gets information if it is UI test or not
--- a/stif/TestServer/BWINS/STIFTESTSERVERU.DEF Wed Jun 09 11:23:41 2010 +0300
+++ b/stif/TestServer/BWINS/STIFTESTSERVERU.DEF Mon Jun 21 17:25:56 2010 +0300
@@ -29,4 +29,5 @@
?StartNewServer@@YAHABV?$TBuf@$0BAA@@@AAV1@HVRSemaphore@@HPAVCTestThreadContainerRunnerFactory@@@Z @ 28 NONAME ; int StartNewServer(class TBuf<256> const &, class TBuf<256> &, int, class RSemaphore, int, class CTestThreadContainerRunnerFactory *)
?UITesting@CTestThreadContainer@@QAEHXZ @ 29 NONAME ; int CTestThreadContainer::UITesting(void)
?NotifyCommand2@RTestExecution@@QAEHAAV?$TPckg@W4TCommand@@@@AAVTDes8@@AAVTRequestStatus@@H@Z @ 30 NONAME ; int RTestExecution::NotifyCommand2(class TPckg<enum TCommand> &, class TDes8 &, class TRequestStatus &, int)
+ ?RunTestCase@RTestExecution@@QAEXAAV?$TPckg@VTFullTestResult@@@@ABVTDesC16@@AAVTRequestStatus@@@Z @ 31 NONAME ; void RTestExecution::RunTestCase(class TPckg<class TFullTestResult> &, class TDesC16 const &, class TRequestStatus &)
--- a/stif/TestServer/eabi/StifTestServeru.def Wed Jun 09 11:23:41 2010 +0300
+++ b/stif/TestServer/eabi/StifTestServeru.def Mon Jun 21 17:25:56 2010 +0300
@@ -60,4 +60,5 @@
_ZN14RTestExecution14NotifyCommand2ER5TPckgI8TCommandER5TDes8R14TRequestStatusi @ 59 NONAME
_ZTI11CCommandDef @ 60 NONAME ; #<TI>#
_ZTV11CCommandDef @ 61 NONAME ; #<VT>#
+ _ZN14RTestExecution11RunTestCaseER5TPckgI15TFullTestResultERK7TDesC16R14TRequestStatus @ 62 NONAME
--- a/stif/TestServer/src/TestExecutionThread.cpp Wed Jun 09 11:23:41 2010 +0300
+++ b/stif/TestServer/src/TestExecutionThread.cpp Mon Jun 21 17:25:56 2010 +0300
@@ -2141,7 +2141,7 @@
-------------------------------------------------------------------------------
*/
-void CTestThreadContainer::IsServerAlive()
+void CTestThreadContainer::IsServerAlive() const
{
if( iServerThread.ExitType() != EExitPending )
@@ -2172,7 +2172,7 @@
-------------------------------------------------------------------------------
*/
-CTestExecution& CTestThreadContainer::TestExecution()
+CTestExecution& CTestThreadContainer::TestExecution() const
{
IsServerAlive();
@@ -2184,7 +2184,32 @@
return *execution;
};
+
+/*
+-------------------------------------------------------------------------------
+
+ Class: CTestThreadContainer
+
+ Method: GetTestCaseArguments
+
+ Description: Get test case arguments
+
+ Parameters: None
+ Return Values: test case arguments
+
+ Errors/Exceptions:
+
+ Status: Proposal
+
+-------------------------------------------------------------------------------
+*/
+const TDesC& CTestThreadContainer::GetTestCaseArguments() const
+ {
+ return TestExecution().GetTestCaseArguments();
+ }
+
+
/*
-------------------------------------------------------------------------------
--- a/stif/TestServer/src/TestServerClient.cpp Wed Jun 09 11:23:41 2010 +0300
+++ b/stif/TestServer/src/TestServerClient.cpp Mon Jun 21 17:25:56 2010 +0300
@@ -827,6 +827,36 @@
Class: RTestExecution
+ Method: RunTestCase
+
+ Description: Runs a test case
+
+ Parameters: TFullTestResultPckg& aResult :out: Case result
+ const TDesC& aTestCaseArgs: Test case arguments
+ TRequestStatus& aStatus :out: Request to be completed
+
+ Return Values: None
+
+ Errors/Exceptions: None
+
+ Status: Approved
+
+-------------------------------------------------------------------------------
+*/
+EXPORT_C void RTestExecution::RunTestCase( TFullTestResultPckg& aResult,
+ const TDesC& aTestCaseArgs,
+ TRequestStatus& aStatus
+ )
+ {
+ TIpcArgs args( &aResult, &aTestCaseArgs, TIpcArgs::ENothing );
+ SendReceive( ETestExecutionRunTestCase, args, aStatus );
+ }
+
+/*
+-------------------------------------------------------------------------------
+
+ Class: RTestExecution
+
Method: NotifyProgress
Description: Notify about test case progress, i.e test case prints.
--- a/stif/TestServer/src/Testexecution.cpp Wed Jun 09 11:23:41 2010 +0300
+++ b/stif/TestServer/src/Testexecution.cpp Mon Jun 21 17:25:56 2010 +0300
@@ -191,7 +191,10 @@
// Delete name buffer
delete iConfigNameBuffer;
iConfigNameBuffer = NULL;
-
+
+ delete iTestCaseArgs;
+ iTestCaseArgs = NULL;
+
iStateEvents.ResetAndDestroy();
iStateEvents.Close();
@@ -338,15 +341,51 @@
__TRACE ( KInit, ( _L( "CTestExecution::RunTestCase in" ) ) );
+ TInt ret = KErrNone;
+
// Store message to be completed when case is finished
iTestExeMessage = aMessage;
iFullResult.iStartTime.HomeTime();
+ delete iTestCaseArgs;
+ iTestCaseArgs = NULL;
+
+ TInt testCaseArgsLength = iTestExeMessage.GetDesLength( 1 );
+ if ( ( testCaseArgsLength != KErrArgument ) && ( testCaseArgsLength != KErrBadDescriptor ) )
+ {
+ iTestCaseArgs = HBufC::New( testCaseArgsLength );
+ if ( iTestCaseArgs == NULL )
+ {
+ _LIT(KRunError,"Can't allocate memory for test case arguments");
+ __TRACE ( KError, ( CStifLogger::ERed, KRunError() ) );
+ CompleteTestExecution( KErrNone,
+ TFullTestResult::ECaseException,
+ KErrNoMemory,
+ KErrGeneral,
+ KRunError );
+ return KErrNone;
+ }
+
+ TPtr testCaseArgsPtr( iTestCaseArgs->Des() );
+ TRAP( ret, iTestExeMessage.Read( 1, testCaseArgsPtr ) );
+ if ( ret != KErrNone )
+ {
+ _LIT(KRunError,"Can't read test case arguments");
+ __TRACE ( KError, ( CStifLogger::ERed, KRunError() ) );
+ CompleteTestExecution( KErrNone,
+ TFullTestResult::ECaseException,
+ ret,
+ KErrGeneral,
+ KRunError );
+ return KErrNone;
+ }
+ }
+
// Get a test module, which executes the test case.
// The test module will be freed either when the test case
// completes, or the test case is aborted.
- TInt ret = iModuleSession->GetTestModule( iModuleContainer, iConfig );
+ ret = iModuleSession->GetTestModule( iModuleContainer, iConfig );
if ( ret != KErrNone || iModuleContainer == NULL )
{
_LIT(KRunError,"Can't get test module");
@@ -2117,6 +2156,34 @@
Class: CTestExecution
+ Method: GetTestCaseArguments
+
+ Description: Get test case arguments
+
+ Parameters: None
+
+ Return Values: Test case arguments
+
+ Errors/Exceptions: None
+
+ Status: Proposal
+
+-------------------------------------------------------------------------------
+*/
+const TDesC& CTestExecution::GetTestCaseArguments() const
+ {
+ if ( iTestCaseArgs != NULL )
+ {
+ return *iTestCaseArgs;
+ }
+ return KNullDesC;
+ }
+
+/*
+-------------------------------------------------------------------------------
+
+ Class: CTestExecution
+
Method: CancelTestRequest
Description: Cancel test execution request.
--- a/stif/group/ReleaseNote.txt Wed Jun 09 11:23:41 2010 +0300
+++ b/stif/group/ReleaseNote.txt Mon Jun 21 17:25:56 2010 +0300
@@ -1,5 +1,5 @@
========================================================================
-RELEASE NOTE FOR STIF - STIF_201020 (7.3.33)
+RELEASE NOTE FOR STIF - STIF_201022 (7.3.34)
SUPPORTING SERIES 60 3.0 ->
========================================================================
--- a/stif/inc/TestServerModuleIf.h Wed Jun 09 11:23:41 2010 +0300
+++ b/stif/inc/TestServerModuleIf.h Mon Jun 21 17:25:56 2010 +0300
@@ -415,6 +415,11 @@
*/
TInt CancelCommandRequest();
+ /**
+ * Get test case arguments.
+ */
+ const TDesC& GetTestCaseArguments() const;
+
public: // Functions that are called from test thread
/**
@@ -574,6 +579,8 @@
TInt iCaseNumber; // Case to be executed
TPtr iConfig; // Configuration file name
HBufC* iConfigNameBuffer; // HBuffer for configuration file;
+ HBufC* iTestCaseArgs; // HBuffer for test case arguments
+
RMessage2 iTestExeMessage; // Test execution message
TTestState iThreadState; // Thread state
--- a/stif/inc/TestThreadContainer.h Wed Jun 09 11:23:41 2010 +0300
+++ b/stif/inc/TestThreadContainer.h Mon Jun 21 17:25:56 2010 +0300
@@ -222,9 +222,15 @@
virtual void DoNotifyCommand(TCommand aCommand, const TDesC8& aParamsPckg);
/**
+ * Get test case execution arguments
+ */
+ virtual const TDesC& GetTestCaseArguments() const;
+
+
+ /**
* Obtain title of currently running test case.
*/
- virtual void GetTestCaseTitleL(TDes& aTestCaseTitle);
+ virtual void GetTestCaseTitleL(TDes& aTestCaseTitle);
/**
* Sets thread logger.
@@ -308,7 +314,7 @@
/**
* Check that server is alive.
*/
- void IsServerAlive();
+ void IsServerAlive() const;
/**
* Exception handler
@@ -360,13 +366,17 @@
/**
* C++ default constructor.
*/
- CTestThreadContainer( CTestModuleContainer* aModuleContainer );
-
+ CTestThreadContainer( CTestModuleContainer* aModuleContainer );
+
+ /**
+ * Get module container.
+ */
+ CTestModuleContainer& ModuleContainer();
+
/**
* Handles to parent.
*/
- CTestExecution& TestExecution();
- CTestModuleContainer& ModuleContainer();
+ CTestExecution& TestExecution() const;
public: // Data
--- a/stif/inc/version.h Wed Jun 09 11:23:41 2010 +0300
+++ b/stif/inc/version.h Mon Jun 21 17:25:56 2010 +0300
@@ -20,9 +20,9 @@
#define STIF_MAJOR_VERSION 7
#define STIF_MINOR_VERSION 3
-#define STIF_BUILD_VERSION 33
+#define STIF_BUILD_VERSION 34
-#define STIF_REL_DATE "18th May 2010"
+#define STIF_REL_DATE "1st June 2010"
#define TO_UNICODE(text) _L(text)
Binary file stif/sis/Stif_31.sis has changed
--- a/stif/stif_plat/inc/StifTestModule.h Wed Jun 09 11:23:41 2010 +0300
+++ b/stif/stif_plat/inc/StifTestModule.h Mon Jun 21 17:25:56 2010 +0300
@@ -787,6 +787,11 @@
TInt Command(TCommand aCommand, const TDesC8& aParamsPckg);
/**
+ * Get test case execution arguments
+ */
+ IMPORT_C const TDesC& GetTestCaseArguments() const;
+
+ /**
* GetTestCaseTitleL function is used to obtain test case title.
*/
IMPORT_C void GetTestCaseTitleL(TDes& aTestCaseTitle);
--- a/stif/stif_plat/inc/TestEngineClient.h Wed Jun 09 11:23:41 2010 +0300
+++ b/stif/stif_plat/inc/TestEngineClient.h Mon Jun 21 17:25:56 2010 +0300
@@ -376,6 +376,19 @@
TRequestStatus& aStatus );
/**
+ * RunTestCase is asynchronous method and it is completed when the test
+ * case is completed. Result of the test case is returned to
+ * aTestResult. The aTestResult is TFullTestResultPckg that is a
+ * packaged TFullTestResult.
+ * The aStatus will have the completion result of this function. If the
+ * test case could be run (despite of succesfully or not) the KErrNone
+ * is returned to aStatus.
+ */
+ IMPORT_C void RunTestCase( TFullTestResultPckg& aTestResult,
+ const TDesC& aTestCaseArgs,
+ TRequestStatus& aStatus );
+
+ /**
* Pause suspends the execution of the test case. The subsession where
* the test case is run is suspended and thus the test case execution is
* suspended. Test case execution can be later resumed by calling
--- a/stif/stif_plat/inc/TestServerClient.h Wed Jun 09 11:23:41 2010 +0300
+++ b/stif/stif_plat/inc/TestServerClient.h Mon Jun 21 17:25:56 2010 +0300
@@ -351,6 +351,16 @@
TRequestStatus& aStatus );
/**
+ * RunTestCase is used to execute the test case previously initialized by
+ * Open method. RunTestCase is asynchronous method and it is completed
+ * when the test case is completed.
+ * The result of the test case is returned to aStatus.
+ */
+ IMPORT_C void RunTestCase( TFullTestResultPckg& aResult,
+ const TDesC& aTestCaseArgs,
+ TRequestStatus& aStatus );
+
+ /**
* Pause suspends the execution of the test case. The subsession where
* the test case is run will be suspended and thus the test case
* execution is suspended. The test case execution can be later resumed