2
|
1 |
/*
|
|
2 |
* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
|
|
3 |
* All rights reserved.
|
|
4 |
* This component and the accompanying materials are made available
|
|
5 |
* under the terms of "Eclipse Public License v1.0"
|
|
6 |
* which accompanies this distribution, and is available
|
|
7 |
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
|
|
8 |
*
|
|
9 |
* Initial Contributors:
|
|
10 |
* Nokia Corporation - initial contribution.
|
|
11 |
*
|
|
12 |
* Contributors:
|
|
13 |
*
|
|
14 |
* Description: CExecutor is used to execute the testing via STIF engine.
|
|
15 |
*
|
|
16 |
*/
|
|
17 |
|
|
18 |
#ifndef EXECUTOR_H_
|
|
19 |
#define EXECUTOR_H_
|
|
20 |
|
|
21 |
#include <e32std.h>
|
|
22 |
#include <e32base.h>
|
|
23 |
#include <e32cons.h>
|
|
24 |
#include <e32svr.h>
|
|
25 |
#include "activetimer.h"
|
|
26 |
#include <TestEngineClient.h>
|
|
27 |
#include "TestModuleInfo.h"
|
|
28 |
#include <StifTestInterface.h>
|
|
29 |
#include "cmdparser.h"
|
|
30 |
|
|
31 |
class CCaseRunner;
|
|
32 |
|
|
33 |
class CExecutor : public CBase
|
|
34 |
{
|
|
35 |
public:
|
|
36 |
static CExecutor* NewL(CCmdParser* aParser,CConsoleBase* aConsole);
|
|
37 |
~CExecutor();
|
|
38 |
|
|
39 |
public:
|
|
40 |
void RunTestsL();
|
|
41 |
void TestCompleted(TInt aError);
|
|
42 |
RTestEngine& TestEngine();
|
|
43 |
|
|
44 |
private:
|
|
45 |
void ConstructL();
|
|
46 |
CExecutor(CCmdParser* aParser,CConsoleBase* aConsole);
|
|
47 |
void RunAllTestCasesL();
|
|
48 |
void RunTestCaseL(TTestInfo& aTestInfo);
|
|
49 |
TInt RunATestCaseL(CCaseRunner* aCaseRunner);
|
|
50 |
void LogErrorAndLeaveL(const TDesC& aFunction, const TDesC& aDescription, const TInt aError);
|
|
51 |
void ParseTestModulesL(CStifParser* aParser, CTestModuleList* aModuleList, const TDesC& aSectionStart, const TDesC& aSectionEnd);
|
|
52 |
|
|
53 |
private:
|
|
54 |
CConsoleBase* iConsole;
|
|
55 |
RTestEngine iTestEngine;
|
|
56 |
TInt iTestCompletedError;
|
|
57 |
CTestModuleList* iModuleList;
|
|
58 |
CCmdParser* iParser;
|
|
59 |
CFixedFlatArray<TTestInfo>* iTestCasesList;
|
|
60 |
|
|
61 |
|
|
62 |
};
|
|
63 |
|
|
64 |
#endif /* EXECUTOR_H_ */
|