traceservices/tracefw/ost_trace_api/unit_test/te_ost/src/te_check_record_content_step.cpp
equal
deleted
inserted
replaced
50 // framework uses the test step name immediately following construction to set |
50 // framework uses the test step name immediately following construction to set |
51 // up the step's unique logging ID. |
51 // up the step's unique logging ID. |
52 SetTestStepName(KCheckRecordContentStep); |
52 SetTestStepName(KCheckRecordContentStep); |
53 |
53 |
54 SetLogFilename(KLogFilename); |
54 SetLogFilename(KLogFilename); |
55 DeleteLogFile(); |
|
56 } |
55 } |
57 |
56 |
58 TVerdict CCheckRecordContentStep::doTestStepPreambleL() |
57 TVerdict CCheckRecordContentStep::doTestStepPreambleL() |
59 { |
58 { |
|
59 DeleteLogFileL(); |
|
60 |
60 if(TestStepResult()==EPass) |
61 if(TestStepResult()==EPass) |
61 { |
62 { |
62 //SetTestStepResult(EFail); |
63 //SetTestStepResult(EFail); |
63 } |
64 } |
64 return TestStepResult(); |
65 return TestStepResult(); |
77 if (TestStepResult()==EPass) |
78 if (TestStepResult()==EPass) |
78 { |
79 { |
79 TInt error = KErrNone; |
80 TInt error = KErrNone; |
80 |
81 |
81 INFO_PRINTF1(_L("-------- Writing traces --------")); |
82 INFO_PRINTF1(_L("-------- Writing traces --------")); |
82 error = WriteTraces(); |
83 error = WriteTracesL(); |
83 if(error) |
84 if(error) |
84 { |
85 { |
85 INFO_PRINTF2(_L("ERROR: Error when writing traces, error %i"), error); |
86 INFO_PRINTF2(_L("ERROR: Error when writing traces, error %i"), error); |
86 SetTestStepResult(EFail); |
87 SetTestStepResult(EFail); |
87 } |
88 } |
274 if(trace && setThreadId) |
275 if(trace && setThreadId) |
275 trace->iContextId = RThread().BTraceId() + 704; //704 is the offset into the RThread and DThread object until we get to the NThread |
276 trace->iContextId = RThread().BTraceId() + 704; //704 is the offset into the RThread and DThread object until we get to the NThread |
276 return trace; |
277 return trace; |
277 } |
278 } |
278 |
279 |
279 TInt CCheckRecordContentStep::WriteTraces() |
280 TInt CCheckRecordContentStep::WriteTracesL() |
280 { |
281 { |
281 TInt error = KErrNone; |
282 TInt error = KErrNone; |
282 TInt lastError = KErrNone; |
283 TInt lastError = KErrNone; |
283 for(TInt i = 0; i < KAPIMaxNumberOfTraceApis; i++) |
284 for(TInt i = 0; i < KAPIMaxNumberOfTraceApis; i++) |
284 { |
285 { |