Update contrib.
1 // Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
2 // All rights reserved.
3 // This component and the accompanying materials are made available
4 // under the terms of "Eclipse Public License v1.0"
5 // which accompanies this distribution, and is available
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
22 #include "t_wservintegstepdsa.h"
23 #include "t_wservconsts.h"
24 #include "t_inidata.h"
29 _LIT(KWServDsaApp, "z:\\sys\\bin\\t_dsaapp.exe");
30 _LIT(KWServTApp1, "z:\\sys\\bin\\t_app1.exe");
32 _LIT(KDsaAppData, "dsaapp_data%d");
33 _LIT(KDsaAppDataName, "dsaapp_data%d_name");
35 _LIT(KDsaAppResultData, "dsaappresult_data%d");
36 _LIT(KDsaAppResultDataName, "dsaappresult_data%d_name");
38 _LIT(KTApp1Data, "tapp1_data%d");
39 _LIT(KTApp1DataName, "tapp1_data%d_name");
44 CT_WServIntegStepDsa constructor.
47 @post CT_WServIntegStepDsa 1st stage constructor
49 CT_WServIntegStepDsa::CT_WServIntegStepDsa()
51 SetTestStepName(KT_WServIntegStepDsa);
55 enum TVerdict CT_WServIntegStepDsa::doTestStepPostambleL()
61 return TestStepResult();
67 @return TVerdict pass / fail
71 enum TVerdict CT_WServIntegStepDsa::doTestStepL()
75 GetConfigDataL(KDsaAppData(), KDsaAppDataName());
76 PrintConfigDataL(KWServDsaAppConfigFile());
77 TInt err = CreateTestProcessL(KWServDsaApp, EPriorityForeground);
81 // wait for dsa app to create start file, to permit
82 // creation of t_app1 process
83 WaitForTestL(KWServDsaAppStartFile());
85 GetConfigDataL(KTApp1Data(), KTApp1DataName());
86 PrintConfigDataL(KWServTApp1ConfigFile());
87 err = CreateTestProcessL(KWServTApp1, EPriorityForeground);
91 // wait for dsa app to create finish file, to permit
92 // results checking and clean up
93 WaitForTestL(KWServDsaAppFinishFile());
95 TRAP(err,CheckResultsL(KDsaAppResultData(), KDsaAppResultDataName(), KWServDsaAppResultFile()));
98 PrintResultsL(KWServDsaAppResultFile());
100 TInt expFrameRate = 0;
101 READ_INT(KDsaAppMinFrameRate, KWServDsaAppConfigFile, expFrameRate);
105 TInt actFrameRate = 0;
106 READ_INT(KPerfDataFrameRate, KWServDsaAppResultFile, actFrameRate);
108 // There is no need to test the measured frame rate for emulator
109 #if defined __WINS__ || defined __WINSCW__
110 INFO_PRINTF2(_L("Frame Rate: Measured: %d"), actFrameRate);
112 INFO_PRINTF3(_L("Frame Rate: Target: %d, Measured: %d"), expFrameRate, actFrameRate);
113 TEST(actFrameRate>expFrameRate);
118 return TestStepResult();