kerneltest/e32test/rpmb/t_rpmb.cpp
changeset 287 ddfd5aa0d58f
equal deleted inserted replaced
286:48e57fb1237e 287:ddfd5aa0d58f
       
     1 
       
     2 // Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
       
     3 // All rights reserved.
       
     4 // This component and the accompanying materials are made available
       
     5 // under the terms of the License "Eclipse Public License v1.0"
       
     6 // which accompanies this distribution, and is available
       
     7 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 //
       
     9 // Initial Contributors:
       
    10 // Nokia Corporation - initial contribution.
       
    11 //
       
    12 // Contributors:
       
    13 //
       
    14 // Description:
       
    15 // e32test/rpmb/t_rpmb.cpp
       
    16 // LDD for testing RPMB kernel extension
       
    17 // 
       
    18 //
       
    19 
       
    20 /**
       
    21  @file
       
    22  @internalComponent
       
    23  @prototype
       
    24 */
       
    25 
       
    26 #define	__E32TEST_EXTENSION__
       
    27 #include <e32test.h>
       
    28 #include "t_rpmb.h"
       
    29 
       
    30 RTest test(_L("t_rpmb"));
       
    31 RTestRpmb	RpmbTestDeviceDriver;
       
    32 
       
    33 /******************************************************************************
       
    34  * Main
       
    35  ******************************************************************************/
       
    36 TInt E32Main()
       
    37 	{
       
    38 #if !defined(__WINS__)
       
    39 	test.Title();
       
    40 	test.Start(_L("Opening device driver"));
       
    41 	TInt r;
       
    42 	r = User::LoadLogicalDevice(KRpmbTestLddName);
       
    43 	test_Value(r,r==KErrNone||r==KErrAlreadyExists);
       
    44 	r = RpmbTestDeviceDriver.Open();
       
    45 	test_KErrNone(r);
       
    46 	test.Next(_L("Execute RPMB tests"));	
       
    47 	r = RpmbTestDeviceDriver.RunTests();
       
    48 	test_KErrNone(r);
       
    49 	RpmbTestDeviceDriver.Close();
       
    50 	r = User::FreeLogicalDevice(KRpmbTestLddName);
       
    51 	test_KErrNone(r);
       
    52 	test.End();
       
    53 #else
       
    54 test.Printf(_L("This test does not run on emulator. \n"));
       
    55 #endif
       
    56 	return 0;
       
    57 	}
       
    58