1 /* |
|
2 * Copyright (c) 2005-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: |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 /** |
|
21 @file TEFExportConst.h |
|
22 @publishedPartner |
|
23 @test |
|
24 */ |
|
25 |
|
26 #ifndef __TEF_EXPORT_CONST_H__ |
|
27 #define __TEF_EXPORT_CONST_H__ |
|
28 #include <e32def.h> |
|
29 |
|
30 // Logger Macros |
|
31 #define INFO_PRINTF1(p1) Logger().LogExtra(((TText8*)__FILE__), __LINE__, ESevrInfo, (p1)) |
|
32 #define INFO_PRINTF2(p1, p2) Logger().LogExtra(((TText8*)__FILE__), __LINE__, ESevrInfo, (p1), (p2)) |
|
33 #define INFO_PRINTF3(p1, p2, p3) Logger().LogExtra(((TText8*)__FILE__), __LINE__, ESevrInfo, (p1), (p2), (p3)) |
|
34 #define INFO_PRINTF4(p1, p2, p3, p4) Logger().LogExtra(((TText8*)__FILE__), __LINE__, ESevrInfo, (p1), (p2), (p3), (p4)) |
|
35 #define INFO_PRINTF5(p1, p2, p3, p4, p5) Logger().LogExtra(((TText8*)__FILE__), __LINE__, ESevrInfo, (p1), (p2), (p3), (p4), (p5)) |
|
36 #define INFO_PRINTF6(p1, p2, p3, p4, p5, p6) Logger().LogExtra(((TText8*)__FILE__), __LINE__, ESevrInfo, (p1), (p2), (p3), (p4), (p5), (p6)) |
|
37 #define INFO_PRINTF7(p1, p2, p3, p4, p5, p6, p7) Logger().LogExtra(((TText8*)__FILE__), __LINE__, ESevrInfo, (p1), (p2), (p3), (p4), (p5), (p6), (p7)) |
|
38 |
|
39 #define WARN_PRINTF1(p1) Logger().LogExtra(((TText8*)__FILE__), __LINE__, ESevrWarn, (p1)) |
|
40 #define WARN_PRINTF2(p1, p2) Logger().LogExtra(((TText8*)__FILE__), __LINE__, ESevrWarn, (p1), (p2)) |
|
41 #define WARN_PRINTF3(p1, p2, p3) Logger().LogExtra(((TText8*)__FILE__), __LINE__, ESevrWarn, (p1), (p2), (p3)) |
|
42 #define WARN_PRINTF4(p1, p2, p3, p4) Logger().LogExtra(((TText8*)__FILE__), __LINE__, ESevrWarn, (p1), (p2), (p3), (p4)) |
|
43 #define WARN_PRINTF5(p1, p2, p3, p4, p5) Logger().LogExtra(((TText8*)__FILE__), __LINE__, ESevrWarn, (p1), (p2), (p3), (p4), (p5)) |
|
44 #define WARN_PRINTF6(p1, p2, p3, p4, p5, p6) Logger().LogExtra(((TText8*)__FILE__), __LINE__, ESevrWarn, (p1), (p2), (p3), (p4), (p5), (p6)) |
|
45 #define WARN_PRINTF7(p1, p2, p3, p4, p5, p6, p7) Logger().LogExtra(((TText8*)__FILE__), __LINE__, ESevrWarn, (p1), (p2), (p3), (p4), (p5), (p6), (p7)) |
|
46 |
|
47 #define ERR_PRINTF1(p1) Logger().LogExtra(((TText8*)__FILE__), __LINE__, ESevrErr, (p1)) |
|
48 #define ERR_PRINTF2(p1, p2) Logger().LogExtra(((TText8*)__FILE__), __LINE__, ESevrErr, (p1), (p2)) |
|
49 #define ERR_PRINTF3(p1, p2, p3) Logger().LogExtra(((TText8*)__FILE__), __LINE__, ESevrErr, (p1), (p2), (p3)) ; |
|
50 #define ERR_PRINTF4(p1, p2, p3, p4) Logger().LogExtra(((TText8*)__FILE__), __LINE__, ESevrErr, (p1), (p2), (p3), (p4)) |
|
51 #define ERR_PRINTF5(p1, p2, p3, p4, p5) Logger().LogExtra(((TText8*)__FILE__), __LINE__, ESevrErr, (p1), (p2), (p3), (p4), (p5)) |
|
52 #define ERR_PRINTF6(p1, p2, p3, p4, p5, p6) Logger().LogExtra(((TText8*)__FILE__), __LINE__, ESevrErr, (p1), (p2), (p3), (p4), (p5), (p6)) |
|
53 #define ERR_PRINTF7(p1, p2, p3, p4, p5, p6, p7) Logger().LogExtra(((TText8*)__FILE__), __LINE__, ESevrErr, (p1), (p2), (p3), (p4), (p5), (p6), (p7)) |
|
54 |
|
55 // Literals |
|
56 // From TestExecuteLog.h |
|
57 _LIT(KTestExecuteLogServerName,"TestExecuteLogEngine"); |
|
58 _LIT(KTestExecuteLogPath,"?:\\Logs\\TestExecute\\"); |
|
59 _LIT(KTestExecuteScheduleTestLogCompatibilityNameFile,"LogFileName.Txt"); |
|
60 _LIT(KTestExecuteName,"TestExecute"); |
|
61 _LIT8(KTestExecuteName8,"TestExecute"); |
|
62 |
|
63 _LIT(KTestExecutePIPSLogServerName,"testexecutepipslogengine"); |
|
64 |
|
65 // From TestExecuteClient.h |
|
66 _LIT(KTestExecuteCommandLineFlagDebugMode,"-d"); |
|
67 _LIT(KTestExecuteCommandLineFlagSeparateLogFileMode,"-slf"); |
|
68 _LIT(KTestExecuteCommandLineFlagGraphicalWindowServer,"-gws"); |
|
69 _LIT(KTestExecuteCommandLineFlagIncludeSelectiveCases,"-tci"); |
|
70 _LIT(KTestExecuteCommandLineFlagExcludeSelectiveCases,"-tcx"); |
|
71 _LIT(KTestExecuteCommandLineFlagPipe,"-pipe"); |
|
72 |
|
73 // From TestExecuteServerUtils.h |
|
74 _LIT(KNull,""); |
|
75 _LIT(KPanicEquals,"P="); |
|
76 _LIT(KErrorEquals,"E="); |
|
77 |
|
78 // From TEFUnit.h |
|
79 _LIT( KAssertFailedEquals, "AssertEquals Failed"); |
|
80 _LIT( KAssertFailedNull, "AssertNull Failed"); |
|
81 _LIT( KAssertFailedNotNull, "AssertNotNull Failed"); |
|
82 _LIT( KAssertFailedSame, "AssertSame Failed"); |
|
83 _LIT( KAssertFailedNotSame, "AssertNotSame Failed"); |
|
84 _LIT( KAssertFailedTrue, "AssertTrue Failed" ); |
|
85 _LIT( KAssertFailedFalse, "AssertFalse Failed"); |
|
86 |
|
87 // Constants |
|
88 // From TestExecuteLog.h |
|
89 const TInt KMaxTestExecuteLogFilePath = 256; |
|
90 const TInt KMaxTestExecuteLogLineLength = 512; |
|
91 const TInt KTestExecuteLoggerMajorVersion = 1; |
|
92 const TInt KTestExecuteLoggerMinorVersion = 1; |
|
93 const TInt KTestExecuteLoggerBuildVersion = 1; |
|
94 |
|
95 // From TestExecuteStepBase.h |
|
96 // this error number for test server leave a err num which conflict with system wide error. |
|
97 // example: when doteststepL {uesr::leave(KErrServerBusy);} |
|
98 // testexecute will take this as test server is busy; |
|
99 // in fact, this is not because doteststepL() has runned, not busy at all. |
|
100 // we have to make the return value + offset(30000) |
|
101 const TInt KErrTEFBaseErrorZero = -30000; |
|
102 const TInt KErrTestExecuteInUse = KErrTEFBaseErrorZero + KErrInUse; |
|
103 const TInt KErrTestExecuteServerBusy = KErrTEFBaseErrorZero + KErrServerBusy; |
|
104 |
|
105 // From TestExecuteClient.h |
|
106 const TInt KTestExecuteMajorVersionNumber=1; |
|
107 const TInt KTestExecuteMinorVersionNumber=1; |
|
108 const TInt KTestExecuteBuildVersionNumber=1; |
|
109 const TInt KMaxTestExecuteNameLength = 80; |
|
110 const TInt KMaxTestExecuteCommandLength = 256; |
|
111 const TInt KMaxTestStepNameLength = 256; |
|
112 |
|
113 // From TestExecuteServerUtils.h |
|
114 const TInt KErrorStepResult = 0; |
|
115 |
|
116 // From TEFUnit.h |
|
117 const int KErrTEFUnitPass = 0; |
|
118 const int KErrTEFUnitFail = 106; |
|
119 const int KErrTEFUnitInconclusive = 107; |
|
120 const int KErrTEFUnitTestSuiteError = 108; |
|
121 const int KErrTEFUnitAbort = 109; |
|
122 const int KErrTEFUnitIgnore = 110; |
|
123 |
|
124 // Enumerations |
|
125 enum TModeCopy |
|
126 { |
|
127 ESetText = 1, |
|
128 EAppendText = 2 |
|
129 }; |
|
130 |
|
131 enum TVerdict |
|
132 { |
|
133 EPass =0, |
|
134 EFail = 106, |
|
135 EInconclusive, |
|
136 ETestSuiteError, |
|
137 EAbort, |
|
138 EIgnore, |
|
139 ESkippedSelectively |
|
140 }; |
|
141 |
|
142 enum TLoggerOptions |
|
143 { |
|
144 ELogHTMLOnly, |
|
145 ELogXMLOnly, |
|
146 ELogBoth |
|
147 }; |
|
148 |
|
149 enum TLoggerChannels |
|
150 { |
|
151 EFile, |
|
152 ESerial, |
|
153 EBoth |
|
154 }; |
|
155 |
|
156 enum TTestSetupState |
|
157 { |
|
158 ESetupNone = 0, |
|
159 ESetupOomServer = 1, |
|
160 ESetupLast = 100 |
|
161 }; |
|
162 |
|
163 // Logging level |
|
164 enum TLogSeverity{ESevrErr = 1,ESevrHigh, ESevrWarn,ESevrMedium, ESevrInfo, ESevrLow, ESevrAll}; |
|
165 |
|
166 // export as well as non-exported files access |
|
167 const TInt KTEFAsciiExclamation=33; |
|
168 const TInt KTEFMinPanicStringParamLength=13; |
|
169 const TInt KTEFMinPanicCodeParamLength=11; |
|
170 const TInt KTEFMinErrorParamLength=7; |
|
171 const TInt KTEFMinSetupParamLength=7; |
|
172 const TInt KTEFMinResultParamLength=8; |
|
173 const TInt KTEFMinHeapParamLength=6; |
|
174 const TInt KTEFZeroValue=0; |
|
175 const TInt KTEFOneValue=1; |
|
176 const TInt KTEFMaxVerdictLength = 128; |
|
177 const TInt KTEFCommandCountsStructSize = 9; |
|
178 const TInt KTEFCommandsCountPlusOne = KTEFCommandCountsStructSize + 1; |
|
179 const TInt KTEFMaxPanicStringLength = KMaxExitCategoryName; // 16 is Max length for User::Panic() |
|
180 |
|
181 // OS version number |
|
182 const TInt KOsVersionCount = 6; |
|
183 |
|
184 _LIT(KTEFTestExecuteResultSummaryFile,"TestResults.htm"); |
|
185 _LIT(KTEFResultString,"RESULT"); |
|
186 _LIT(KTEFRunTestStepCommand,"RUN_TEST_STEP"); |
|
187 _LIT(KTEFRunErrorStepResultCommand,"RUN_ERROR_STEP_RESULT"); |
|
188 _LIT(KTEFRunPanicStepCommand,"RUN_PANIC_STEP"); |
|
189 _LIT(KTEFRunTestStepResultCommand,"RUN_TEST_STEP_RESULT"); |
|
190 _LIT(KTEFRunPanicStepResultCommand,"RUN_PANIC_STEP_RESULT"); |
|
191 _LIT(KTEFRunProgramCommand,"RUN_PROGRAM"); |
|
192 _LIT(KTEFRunWSProgramCommand,"RUN_WS_PROGRAM"); |
|
193 _LIT(KTEFStartTestCaseCommand, "START_TESTCASE"); |
|
194 _LIT(KTEFEndTestCaseCommand, "END_TESTCASE"); |
|
195 _LIT(KTEFStartSyncTestCaseCommand, "START_SYNCHRONISED_TESTCASE"); |
|
196 _LIT(KTEFEndSyncTestCaseCommand, "END_SYNCHRONISED_TESTCASE"); |
|
197 _LIT(KTEFPanicString,"!PanicString="); |
|
198 _LIT(KTEFPanicCode,"!PanicCode="); |
|
199 _LIT(KTEFError,"!Error="); |
|
200 _LIT(KTEFHeap,"!Heap="); |
|
201 _LIT(KTEFSpace, " "); |
|
202 _LIT(KTEFNull, ""); |
|
203 _LIT(KTEFEquals, "="); |
|
204 _LIT(KTEFScriptExtension,".script"); |
|
205 _LIT(KTEFCfgExtension,".tcs"); |
|
206 _LIT(KTEFHtmlKey, "HTML"); |
|
207 _LIT(KTEFDefaultScriptPath,"DefaultScriptDir"); |
|
208 _LIT(KTEFJustInTimeDebug,"JustInTimeDebug"); |
|
209 _LIT(KTEFSystemStarter, "SystemStarter"); |
|
210 _LIT(KTEFRemotePanicDetection, "RemotePanicDetection"); |
|
211 _LIT(KTEFEnableIniAccessLog, "EnableIniAccessLog"); |
|
212 _LIT(KTEFEnableTestsCountLog, "EnableTestsCountLog"); |
|
213 _LIT(KTEFLogSeverityKey, "LogLevel"); |
|
214 _LIT(KTEFLogMode, "LogMode"); |
|
215 _LIT(KTEFStringFormat,"%S"); |
|
216 _LIT(KTEFSlash, "\\"); |
|
217 _LIT(KTEFLogChannel, "LogChannel"); |
|
218 _LIT(KTEFOutputPort, "output_port"); |
|
219 _LIT(KTEFWaitForLoggingTime, "WaitForLoggingTime"); |
|
220 |
|
221 _LIT(KTEFResultPass,"PASS"); |
|
222 _LIT(KTEFResultSkippedSelectively,"SKIPPED_SELECTIVELY"); |
|
223 _LIT(KTEFResultFail,"FAIL"); |
|
224 _LIT(KTEFResultTag,"***Result"); |
|
225 _LIT(KTEFResult,"!Result="); |
|
226 |
|
227 // export only |
|
228 const TInt KTEFTestExecuteParamLength=30; |
|
229 const TInt KTEFMinPanicStringLength=2; |
|
230 |
|
231 _LIT(KTEFResultPanic,"PANIC"); |
|
232 _LIT(KTEFResultUnexecuted, "UNEXECUTED"); |
|
233 _LIT(KTEFTestCaseResultTag,"***TestCaseResult"); |
|
234 _LIT(KTEFCommentedCommands,"COMMENTED OUT COMMAND'S"); |
|
235 _LIT(KTEFTestCaseSummary, "TEST_CASE_SUMMARY"); |
|
236 _LIT(KTEFTestStepSummary, "TEST_STEP_BLOCK_SUMMARY"); |
|
237 _LIT(KTEFRunProgramSummary, "RUN_PROGRAM_SUMMARY"); |
|
238 _LIT(KTEFRunScriptSummary, "RUN_SCRIPT_SUMMARY:"); |
|
239 _LIT(KTEFScriptExecuted, "EXECUTED_SCRIPTS"); |
|
240 _LIT(KTEFFailedOpen, "FAILED_TO_OPEN"); |
|
241 _LIT(KTEFOpenQuotes,"\""); |
|
242 _LIT(KTEFSpaceEquals," = "); |
|
243 _LIT(KTEFSection, "TestExecute"); |
|
244 _LIT(KTEFXmlKey, "XML"); |
|
245 _LIT(KTEFEqualsInteger," = %d"); |
|
246 _LIT(KTEFIniReadInteger,"INI READ : %S %S %S %d"); |
|
247 _LIT(KTEFIniReadString,"INI READ : %S %S %S %S"); |
|
248 _LIT(KTEFIniWriteInteger,"INI WRITE : %S %S %S %d"); |
|
249 _LIT(KTEFIniWriteString,"INI WRITE : %S %S %S %S"); |
|
250 _LIT(KTEFDefaultPath,"?:\\system\\data\\testexecute.ini"); |
|
251 _LIT(KTEFAlternatePath,"z:\\system\\data\\testexecute.ini"); |
|
252 _LIT(KTEFComma,","); |
|
253 |
|
254 _LIT(KTEFResultInconclusive,"INCONCLUSIVE"); |
|
255 _LIT(KTEFResultAbort,"ABORT"); |
|
256 _LIT(KTEFResultUnknown,"UNKNOWN"); |
|
257 _LIT(KTEFFontLightBlue, "<font size=2 color=00AFFF>"); |
|
258 _LIT(KTEFFontGreen,"<font size=2 color=00AF00>"); |
|
259 _LIT(KTEFFontRed,"<font size=2 color=FF0000>"); |
|
260 _LIT(KTEFFontBlue,"<font size=2 color=0000FF>"); |
|
261 _LIT(KTEFFontGrey,"<font size=2 color=C0C0C0>"); |
|
262 _LIT(KTEFFontEnd,"</font>"); |
|
263 _LIT(KTEFTestCaseDefault, "NOTESTCASE"); |
|
264 |
|
265 _LIT(KTEFDefaultSysDrive, "DefaultSysDrive"); |
|
266 _LIT(KTEFSysDrive, "${SYSDRIVE}"); |
|
267 _LIT(KTEFIniSysDrive, "SYSDRIVE"); |
|
268 _LIT(KTEFLegacySysDrive, "C:"); |
|
269 _LIT(KTEFWrapperPluginDll, "WrapperUtilsPlugin.dll"); |
|
270 _LIT(KTEFTabulator, "\t"); |
|
271 // the simplified summary file. in case of out-of-memory. |
|
272 _LIT(KTEFTestExecuteResultSimplifiedSummaryFile,"TestResults.txt"); |
|
273 _LIT8(KLoggerNotEnoughMemory8, "Not enough memory to perform logging..."); |
|
274 _LIT(KTEFIniReadInt64,"INI READ : %S %S %S %ld"); |
|
275 _LIT(KTEFIniWriteInt64,"INI WRITE : %S %S %S %ld"); |
|
276 _LIT(KTEFPanicStringTooLong,"Expected panic string %S\"%S\" (in script) was TOO LONG."); |
|
277 _LIT(KTEFPanicStringErrorInfo,"Keep the panic string length to 16 characters or less. Please Refer to User::Panic() in SDL for more information."); |
|
278 _LIT(KTEFExpectedPanicString,"Expected panic string was \"%S\" (in script)"); |
|
279 _LIT(KTEFReceivedPanicString,"Received panic string was \"%S\"(in code)"); |
|
280 _LIT(KTEFWarnPanicString,"The actual length of the received panic string is 16 characters, which is possibly truncated. User::Panic will only pass through the first 16 characters of the panic string, the test result may not be reliable. Ensure this is 16 characters or less or it will be truncated."); |
|
281 #endif |
|