Adaptation/GUID-66E5F769-1156-54CA-94BC-8912159A1240.dita
author Graeme Price <GRAEME.PRICE@NOKIA.COM>
Fri, 15 Oct 2010 14:32:18 +0100
changeset 15 307f4279f433
permissions -rw-r--r--
Initial contribution of the Adaptation Documentation.

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