os/security/cryptoservices/filebasedcertificateandkeystores/test/tcertapps/t_certapps.cpp
author sl@SLION-WIN7.fritz.box
Fri, 15 Jun 2012 03:10:57 +0200
changeset 0 bde4ae8d615e
permissions -rw-r--r--
First public contribution.
     1 /*
     2 * Copyright (c) 2005-2009 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 *
    16 */
    17 
    18 
    19 /**
    20  @file
    21 */
    22 
    23 #include <e32test.h>
    24 #include <e32std.h>
    25 #include "t_testhandler.h"
    26 #include "tscriptandhardcoded.h"
    27 #include "t_certapps_defs.h"
    28 
    29 #include "t_certapps_actions.h"
    30 
    31 
    32 LOCAL_D void DoTests()
    33 	{	
    34 	START_SCRIPT_LIST
    35 	SCRIPT_ITEM(CTestWrapper<CInitManager>, KInitManager),
    36 	SCRIPT_ITEM(CTestWrapper<CDestroyManager>, KDestroyManager),
    37 	SCRIPT_ITEM(CTestWrapper<CClearAllApps>, KClearAllApps),
    38 	SCRIPT_ITEM(CTestWrapper<CAddApp>, KAddApp),
    39 	SCRIPT_ITEM(CTestWrapper<CRemoveApp>, KRemoveApp),
    40 	SCRIPT_ITEM(CTestWrapper<CAppCount>, KAppCount),
    41 	SCRIPT_ITEM(CTestWrapper<CGetApplications>, KGetApplications),
    42 	SCRIPT_ITEM(CTestWrapper<CGetApp>, KGetApp)
    43 	END_SCRIPT_LIST
    44 
    45 	
    46 	TDriveUnit sysDrive (RFs::GetSystemDrive());
    47 	TBuf<64> scriptFile (sysDrive.Name());
    48 	scriptFile.Append(_L("\\tcertapps\\scripts\\script1.txt"));
    49 	
    50 	_LIT(KLog, "tcertapps.log");
    51 	CScriptSetup::CreateAndRunTestsL(theTestTypes, scriptFile, KLog);	
    52 	}
    53 
    54 GLDEF_C TInt E32Main() // main function called by E32
    55     {
    56 	RProcess().DataCaging(RProcess::EDataCagingOn);
    57 	__UHEAP_MARK;
    58 	CTrapCleanup* cleanup=CTrapCleanup::New(); // get clean-up stack
    59 	TRAP_IGNORE(DoTests());
    60 	delete cleanup; // destroy clean-up stack
    61 	__UHEAP_MARKEND;
    62 	return 0; // and return
    63     }