author | Maciej Seroka <maciejs@symbian.org> |
Tue, 03 Aug 2010 14:51:01 +0100 | |
branch | Symbian3 |
changeset 58 | 7a02f8565ef5 |
parent 57 | b8d18c84f71c |
permissions | -rw-r--r-- |
57
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
1 |
/* |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
2 |
* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
3 |
* All rights reserved. |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
4 |
* This component and the accompanying materials are made available |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
5 |
* under the terms of "Eclipse Public License v1.0" |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
6 |
* which accompanies this distribution, and is available |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
7 |
* at the URL "http://www.eclipse.org/legal/epl-v10.html". |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
8 |
* |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
9 |
* Initial Contributors: |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
10 |
* Nokia Corporation - initial contribution. |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
11 |
* |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
12 |
* Contributors: |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
13 |
* |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
14 |
* Description: |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
15 |
* |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
16 |
*/ |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
17 |
|
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
18 |
|
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
19 |
/** |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
20 |
@file |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
21 |
@test |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
22 |
@internalComponent |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
23 |
*/ |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
24 |
|
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
25 |
#include <bautils.h> |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
26 |
#include <test/appfwk_tmsteststep.h> |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
27 |
#include "f32file.h" |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
28 |
#include <e32std.h> |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
29 |
|
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
30 |
|
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
31 |
_LIT(KLogLocation,"c:\\logs\\testexecute\\TMS_Log.txt"); |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
32 |
_LIT8(KLogPass," PASS"); |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
33 |
_LIT8(KLogFail," FAIL"); |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
34 |
_LIT8(KRet, "\n"); |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
35 |
_LIT8 (KBlankSpace," "); |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
36 |
|
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
37 |
// Special notes about using this class |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
38 |
// |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
39 |
// In any derived CTxxxxStep class after the __CONSTRUCT_STEP__(xxxx) macro (generally at the end of the file) |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
40 |
// if the methods void CTxxxxxStep::TestSetupL() and void CTxxxxStep::TestClose() do not exist |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
41 |
// they should be added as follows :- |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
42 |
// |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
43 |
// void CTxxxxStep::TestSetupL() |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
44 |
// { |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
45 |
// MultipleResultsForSameID(ETrue); // true or false set on test requirements |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
46 |
// } |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
47 |
// |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
48 |
// void CTxxxxStep::TestClose() |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
49 |
// { |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
50 |
// iTestStepNames.Close(); |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
51 |
// } |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
52 |
// |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
53 |
// if the methods do already exist add the MultipleResultsForSameID and iTestStepNames.Close lines to them respectivly |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
54 |
// |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
55 |
|
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
56 |
TInt CTmsTestStep::ReadNextLineL( RFile &aFile, TDes8 &aLine ) |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
57 |
// read a cr/lf limiited line from the file, assumes file is a valid file |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
58 |
// and that aLine is of sufficient length to hold the data |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
59 |
{ |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
60 |
aLine.Zero(); |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
61 |
TBuf8<1> chr; |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
62 |
for (;;) |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
63 |
{ |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
64 |
aFile.Read(chr); |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
65 |
if ( chr.Length() == 0 ) |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
66 |
{ |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
67 |
break; |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
68 |
} |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
69 |
if (chr.CompareF(KRet) == 0) |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
70 |
{ |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
71 |
// got a line, exctract newline as well |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
72 |
aFile.Read(chr); |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
73 |
break; |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
74 |
} |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
75 |
else |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
76 |
{ |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
77 |
aLine.Append(chr); |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
78 |
} |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
79 |
} |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
80 |
|
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
81 |
return aLine.Length(); |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
82 |
} |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
83 |
|
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
84 |
void CTmsTestStep::CleanUpAndWriteResults() |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
85 |
{ |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
86 |
RFs fs; |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
87 |
fs.Connect(); |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
88 |
CleanupClosePushL(fs); |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
89 |
|
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
90 |
iTestStepPositions.Close(); |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
91 |
if (iTestStepNames != NULL) |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
92 |
{ |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
93 |
iTestStepNames->Reset(); |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
94 |
delete iTestStepNames; |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
95 |
iTestStepNames = NULL; |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
96 |
|
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
97 |
if (BaflUtils::FolderExists(fs, KLogLocation)) |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
98 |
{ |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
99 |
RFile file; |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
100 |
if (BaflUtils::FileExists( fs, KLogLocation )) |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
101 |
{ |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
102 |
// open the temporary tms log |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
103 |
TInt err = file.Open( fs, KLogLocation, EFileRead|EFileShareAny); |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
104 |
if(err == KErrInUse) |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
105 |
{ |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
106 |
CleanupStack::PopAndDestroy(); |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
107 |
return; |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
108 |
} |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
109 |
if (err == KErrNone) |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
110 |
{ |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
111 |
CleanupClosePushL(file); |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
112 |
TBuf8<256> line; |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
113 |
TBuf<250> testID; |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
114 |
TBuf<6> testResult; |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
115 |
// get a line from the temporary tms log |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
116 |
while (CTmsTestStep::ReadNextLineL(file,line)) |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
117 |
{ |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
118 |
TInt blankPos = line.Find(KBlankSpace); |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
119 |
|
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
120 |
// get the ID from the line |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
121 |
testID.Copy(line.Left(blankPos)); |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
122 |
|
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
123 |
//get the pass or fail result from the line |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
124 |
testResult.Copy(line.Mid(blankPos+1,4)); |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
125 |
|
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
126 |
// print into the standard tef log the id and the result in the correct format |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
127 |
// so that they are correctly parsed into the TMS csv file |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
128 |
INFO_PRINTF2(_L("START_TESTCASE %S"),&testID); |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
129 |
INFO_PRINTF2(_L("Line = 1 Command = START_TESTCASE %S"),&testID); |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
130 |
INFO_PRINTF2(_L("END_TESTCASE %S"),&testID); |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
131 |
INFO_PRINTF3(_L("Line = 1 Command = END_TESTCASE %S ***TestCaseResult = %S"),&testID,&testResult); |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
132 |
} |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
133 |
CleanupStack::PopAndDestroy(); |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
134 |
} |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
135 |
// remove the temporary tms log |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
136 |
fs.Delete(KLogLocation); |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
137 |
} |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
138 |
} |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
139 |
} |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
140 |
CleanupStack::PopAndDestroy(); |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
141 |
} |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
142 |
|
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
143 |
EXPORT_C CTmsTestStep::CTmsTestStep() : iStepPassFail(ETrue), iShowMultipleResults(EFalse) |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
144 |
{ |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
145 |
iCurrentTestStepName.Copy(KUnknownSYMTestCaseIDName); |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
146 |
iTestStepNames=new CDesCArrayFlat(1); |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
147 |
RFs fs; |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
148 |
fs.Connect(); |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
149 |
CleanupClosePushL(fs); |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
150 |
if (BaflUtils::FolderExists(fs, KLogLocation)) |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
151 |
{ |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
152 |
if (BaflUtils::FileExists( fs, KLogLocation )) |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
153 |
{ |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
154 |
// remove the temporary tms log |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
155 |
fs.Delete(KLogLocation); |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
156 |
} |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
157 |
} |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
158 |
CleanupStack::PopAndDestroy(); |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
159 |
} |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
160 |
|
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
161 |
EXPORT_C void CTmsTestStep::CloseTMSGraphicsStep() |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
162 |
{ |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
163 |
CTmsTestStep::CleanUpAndWriteResults(); |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
164 |
|
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
165 |
} |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
166 |
|
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
167 |
EXPORT_C CTmsTestStep::~CTmsTestStep() |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
168 |
{ |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
169 |
CTmsTestStep::CleanUpAndWriteResults(); |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
170 |
} |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
171 |
|
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
172 |
// writes out the results of a test that has just been executed to the log file(s) |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
173 |
// the first time a test result is written it is also added to the iTestStepNames array. |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
174 |
// This array is then checked on subsequent tests to see if the test has already been written to log |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
175 |
// if it has and multiple test results are not wanted further logging of this test is omitted. |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
176 |
|
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
177 |
|
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
178 |
void CTmsTestStep::DebugLogL(const TDesC8& aTestCaseID, const TDesC8& aResult, TInt aPos = -1) |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
179 |
{ |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
180 |
TInt pos = 0; |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
181 |
RFs fs; |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
182 |
fs.Connect(); |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
183 |
CleanupClosePushL(fs); |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
184 |
|
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
185 |
if (BaflUtils::FolderExists(fs, KLogLocation)) |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
186 |
{ |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
187 |
RFile file; |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
188 |
if (!BaflUtils::FileExists( fs, KLogLocation )) |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
189 |
{ |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
190 |
User::LeaveIfError( file.Create( fs, KLogLocation, EFileWrite|EFileShareAny)); |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
191 |
} |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
192 |
else |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
193 |
{ |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
194 |
TInt err = file.Open( fs, KLogLocation, EFileWrite|EFileShareAny); |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
195 |
if(err == KErrInUse) |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
196 |
{ |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
197 |
CleanupStack::PopAndDestroy(); |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
198 |
return; |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
199 |
} |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
200 |
if (aPos == -1) |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
201 |
file.Seek(ESeekEnd, pos); |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
202 |
else |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
203 |
file.Seek(ESeekCurrent, aPos); |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
204 |
} |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
205 |
file.Write(aTestCaseID); |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
206 |
file.Write(aResult); |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
207 |
file.Write(_L8("\r\n ")); |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
208 |
file.Flush(); |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
209 |
file.Close(); |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
210 |
} |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
211 |
CleanupStack::PopAndDestroy(); |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
212 |
} |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
213 |
|
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
214 |
TInt CTmsTestStep::DebugLogPosL() |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
215 |
{ |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
216 |
TInt pos = 0; |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
217 |
TInt pos1 = 0; |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
218 |
RFs fs; |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
219 |
fs.Connect(); |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
220 |
CleanupClosePushL(fs); |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
221 |
|
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
222 |
if (BaflUtils::FolderExists(fs, KLogLocation)) |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
223 |
{ |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
224 |
RFile file; |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
225 |
if (!BaflUtils::FileExists( fs, KLogLocation )) |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
226 |
{ |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
227 |
User::LeaveIfError( file.Create( fs, KLogLocation, EFileWrite|EFileShareAny)); |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
228 |
} |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
229 |
else |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
230 |
{ |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
231 |
TInt err = file.Open( fs, KLogLocation, EFileWrite|EFileShareAny); |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
232 |
if(err == KErrInUse) |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
233 |
{ |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
234 |
CleanupStack::PopAndDestroy(); |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
235 |
return KErrGeneral; |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
236 |
} |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
237 |
file.Seek(ESeekEnd, pos); |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
238 |
file.Seek(ESeekCurrent, pos1); |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
239 |
file.Close(); |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
240 |
} |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
241 |
|
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
242 |
|
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
243 |
} |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
244 |
CleanupStack::PopAndDestroy(); |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
245 |
return pos1; |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
246 |
} |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
247 |
|
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
248 |
EXPORT_C void CTmsTestStep::RecordTestResultL() |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
249 |
{ |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
250 |
TBuf<64> unknownTMSID(KUnknownSYMTestCaseIDName); |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
251 |
TBuf8<64> unknownID8; |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
252 |
unknownID8.Copy(unknownTMSID); |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
253 |
|
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
254 |
TBuf<64> undefinedTMSID(KUndefinedSYMTestCaseIDName); |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
255 |
TBuf8<64> undefinedID8; |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
256 |
undefinedID8.Copy(undefinedTMSID); |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
257 |
|
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
258 |
TBuf<64> notaTMSID(KNotATestSYMTestCaseIDName); |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
259 |
TBuf8<64> notaID8; |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
260 |
notaID8.Copy(notaTMSID); |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
261 |
|
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
262 |
TBuf<128> currentTSName; |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
263 |
currentTSName.Copy(iCurrentTestStepName); |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
264 |
|
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
265 |
if (iCurrentTestStepName.Compare(unknownID8) == 0) // unknown tests logged to warning file |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
266 |
{ |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
267 |
INFO_PRINTF1(_L("ID NOT SET")); |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
268 |
} |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
269 |
else if (iCurrentTestStepName.Compare(undefinedID8) == 0) // undefined tests logged to warning file |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
270 |
{ |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
271 |
INFO_PRINTF1(_L("ID UNDEFINED")); |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
272 |
} |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
273 |
else if (iCurrentTestStepName.Compare(notaID8) == 0) |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
274 |
{ |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
275 |
} |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
276 |
else if(iShowMultipleResults) // multiple results for same test should be logged |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
277 |
{ |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
278 |
if( iStepPassFail == EFalse) |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
279 |
{ |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
280 |
INFO_PRINTF2(_L("%S FAILED"), ¤tTSName ); |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
281 |
DebugLogL(iCurrentTestStepName, KLogFail); |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
282 |
} |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
283 |
else |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
284 |
{ |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
285 |
INFO_PRINTF2(_L("%S PASSED"), ¤tTSName ); |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
286 |
DebugLogL(iCurrentTestStepName, KLogPass); |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
287 |
} |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
288 |
} |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
289 |
else if (!iShowMultipleResults) |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
290 |
{ |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
291 |
TInt existsInArray; |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
292 |
if (iTestStepNames == NULL) |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
293 |
iTestStepNames=new CDesCArrayFlat(1); |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
294 |
|
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
295 |
if( iTestStepNames->Find(currentTSName,existsInArray) == 0) |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
296 |
{ |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
297 |
if( iStepPassFail == EFalse) |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
298 |
{ |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
299 |
INFO_PRINTF2(_L("%S FAILED"), ¤tTSName ); |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
300 |
DebugLogL(iCurrentTestStepName, KLogFail, iTestStepPositions[existsInArray] ); |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
301 |
} |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
302 |
} |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
303 |
else |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
304 |
{ |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
305 |
iTestStepPositions.AppendL(DebugLogPosL()); |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
306 |
iTestStepNames->AppendL(currentTSName); |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
307 |
|
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
308 |
if( iStepPassFail == EFalse) |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
309 |
{ |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
310 |
INFO_PRINTF2(_L("%S FAILED"), ¤tTSName ); |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
311 |
DebugLogL(iCurrentTestStepName, KLogFail ); |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
312 |
} |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
313 |
else |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
314 |
{ |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
315 |
INFO_PRINTF2(_L("%S PASSED"), ¤tTSName ); |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
316 |
DebugLogL(iCurrentTestStepName, KLogPass); |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
317 |
} |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
318 |
} |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
319 |
} |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
320 |
} |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
321 |
|
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
322 |
// sets the name and pass/fail state of the individual test that is about to be executed |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
323 |
EXPORT_C void CTmsTestStep::SetTestStepID(const TDesC& aStepName) |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
324 |
{ |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
325 |
iCurrentTestStepName.Copy(aStepName); |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
326 |
iStepPassFail = ETrue; |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
327 |
} |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
328 |
|
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
329 |
EXPORT_C void CTmsTestStep::SetOverallTestStepID(const TDesC& aStepName) |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
330 |
{ |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
331 |
iCurrentTestStepName.Copy(aStepName); |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
332 |
iStepPassFail = ETrue; |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
333 |
if (!TestStepResult() == EPass) |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
334 |
TEST(EFalse); |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
335 |
} |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
336 |
|
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
337 |
// needed for the overide of CTGraphicsBase::testBooleanTrue to allow us to set |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
338 |
// whether an individual test has passed or failed |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
339 |
EXPORT_C void CTmsTestStep::MQCTest(TBool aCondition, const TText8* aFile, TInt aLine) |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
340 |
{ |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
341 |
if(!aCondition) |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
342 |
{ |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
343 |
iStepPassFail = EFalse; |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
344 |
} |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
345 |
testBooleanTrue( aCondition, aFile, aLine, ETrue); |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
346 |
} |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
347 |
|
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
348 |
// needed for the overide of CTGraphicsBase::testBooleanTrue to allow us to set |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
349 |
// whether an individual test has passed or failed |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
350 |
EXPORT_C void CTmsTestStep::MQCTestL(TBool aCondition, const TText8* aFile, TInt aLine) |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
351 |
{ |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
352 |
if(!aCondition) |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
353 |
{ |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
354 |
iStepPassFail = EFalse; |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
355 |
} |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
356 |
testBooleanTrueL( aCondition, aFile, aLine, ETrue); |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
357 |
} |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
358 |
|
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
359 |
// sets whether tests with the same @SYMTestCaseID xxxxxx name are printed multiple times in the log files |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
360 |
EXPORT_C void CTmsTestStep::MultipleResultsForSameID(TBool aShowMultipleResults) |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
361 |
{ |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
362 |
iShowMultipleResults = aShowMultipleResults; |
b8d18c84f71c
Re-enabled smoke test for Language-setting
Maciej Seroka <maciejs@symbian.org>
parents:
diff
changeset
|
363 |
} |