|
1 <?xml version="1.0" encoding="utf-8"?> |
|
2 <!-- Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies) All rights reserved. --> |
|
3 <!-- This component and the accompanying materials are made available under the terms of the License |
|
4 "Eclipse Public License v1.0" which accompanies this distribution, |
|
5 and is available at the URL "http://www.eclipse.org/legal/epl-v10.html". --> |
|
6 <!-- Initial Contributors: |
|
7 Nokia Corporation - initial contribution. |
|
8 Contributors: |
|
9 --> |
|
10 <!DOCTYPE concept |
|
11 PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd"> |
|
12 <concept id="GUID-66E5F769-1156-54CA-94BC-8912159A1240" xml:lang="en"><title>Testing |
|
13 the PRM PSL</title><shortdesc>This document describes using the test suite for the PRM. </shortdesc><prolog><metadata><keywords/></metadata></prolog><conbody> |
|
14 <section id="GUID-A009D3D3-BD1B-40B8-B39D-8F35AD5FCF1E"><title>Purpose</title> <p>Use this test suite to ensure that your |
|
15 Power Resource Manager implementation runs correctly. </p> <p><b>Introduction</b> </p> <p> <codeph>T_PRMACCTST</codeph> is |
|
16 a test application that verifies the resources registered with the PSL of |
|
17 the PRM. For more information refer to the description of individual test |
|
18 cases in <filepath>e32test/resourceman/acctst/t_prmacctst.cpp</filepath>. </p> <p>The |
|
19 following tasks are preformed by the test suite: </p> <ul> |
|
20 <li id="GUID-86D22263-7F34-5F98-A673-909C64F1B929"><p>enumerate all registered |
|
21 resources, </p> </li> |
|
22 <li id="GUID-82F19722-C930-55CA-B7DF-B10F23660F5E"><p>check that resources |
|
23 behave consistently with their properties, </p> </li> |
|
24 <li id="GUID-37BA8D2B-E226-55EE-99DE-B0DA34D2CD1C"><p>ensure that resources |
|
25 are reset to their default level when not in use, </p> </li> |
|
26 <li id="GUID-6A399DB5-996B-503D-AE5B-F89797FB6722"><p>ensure all actual resources |
|
27 dependencies have been declared (only the extended version of the PRM allows |
|
28 dependencies). </p> </li> |
|
29 </ul> <p>To ensure that single-user resources are available to the test application, <codeph>T_PRMACCTST</codeph> is |
|
30 coupled with a kernel extension, <codeph>D_PRMACCTST</codeph> that takes control |
|
31 of such resources immediately after the PRM has been initialised. It then |
|
32 releases the resources when the test application ends. </p> </section> |
|
33 <section id="GUID-99C0A3AE-5C14-4B6E-9623-FE536E259D08"><title>Using the test suite</title> <p>The instructions to run the |
|
34 PRM acceptance test suite are as follows: </p> <ol id="GUID-2C3603D2-1CFD-55AF-B2D1-9532A09FA6A3"> |
|
35 <li id="GUID-90FBCCDF-C195-5007-AB19-C2910D7CD1AB"><p>build the test code |
|
36 in <filepath>e32test/resourceman/acctst</filepath>, </p> </li> |
|
37 <li id="GUID-5DA609A8-64D1-5533-820D-2115B0412D8A"><p>build a rom for H4HRP |
|
38 of type <codeph>prmacctst</codeph> in <filepath>e32/rombuild</filepath>: </p> <p><userinput>rom |
|
39 -v=h4hrp -I=armv5 -b=urel -t=prmacctst</userinput> </p> <p>This command generates |
|
40 a self-starting ROM. The test output is captured from the default debug port |
|
41 of the device. </p> </li> |
|
42 </ol> <p>To build a manual test ROM (so the test application does not run |
|
43 automatically), use the <codeph>-d=MANUALROM</codeph> option. The usual ESHELL |
|
44 command prompt will be displayed and the test application can be run by calling <codeph>T_PRMACCTST</codeph>. </p> <p> <b>Note</b>: |
|
45 This test must be run with minimal required components because the test driver |
|
46 is a kernel extension and takes control of all single-user resources during |
|
47 its entry point. This test randomly changes the state of all the resources |
|
48 between a minimum and maximum value. If there are any restrictions on a resources |
|
49 state change (i.e. the resource state can be only be changed to a certain |
|
50 value) then that resource should not be registered while running this test. </p> </section> |
|
51 </conbody><related-links> |
|
52 <link href="GUID-2ECF13A1-9D56-5740-A09F-8267E6A45DD9.dita"><linktext>Porting the |
|
53 Power Resource Manager</linktext></link> |
|
54 <link href="GUID-B1CE51BC-B452-5FC9-9C00-35447AF40671.dita"><linktext>Implement |
|
55 the controllable power resources</linktext></link> |
|
56 <link href="GUID-66FD040B-133E-57CF-80DD-9369F62709C6.dita"><linktext>Implement |
|
57 the PSL for the target</linktext></link> |
|
58 <link href="GUID-E7F91A65-235D-589C-9A8C-0B207D19A24B.dita"><linktext>Port client |
|
59 drivers to use the PRM</linktext></link> |
|
60 <link href="GUID-C8DF0CB0-92F4-5F9E-A8F1-7DE50954C4F1.dita"><linktext>Debugging |
|
61 the PRM</linktext></link> |
|
62 </related-links></concept> |