os/security/crypto/weakcrypto/test/tpbe/tpbemain.cpp
author sl
Tue, 10 Jun 2014 14:32:02 +0200
changeset 1 260cb5ec6c19
permissions -rw-r--r--
Update contrib.
     1 /*
     2 * Copyright (c) 1998-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 #include <e32base.h>
    20 #include "t_testhandler.h"
    21 #include "t_testsetup.h"
    22 #include "tscripttests.h"
    23 #include "tactionelement.h"
    24 #include "tactionset.h"
    25 #include "tactionsetreadpfs.h"
    26 #include "tactionsetwritepfs.h"
    27 #include "texternpbeparams.h"
    28 
    29 LOCAL_D void callExampleL() // initialize and call example code under cleanup stack
    30     {
    31     START_SCRIPT_LIST
    32 	SCRIPT_ITEM(CActionElement,_L8("Element")),
    33 	SCRIPT_ITEM(CActionSet,_L8("Set")),
    34 	SCRIPT_ITEM(CActionSetReadPFS,_L8("ReadPFS")),
    35 	SCRIPT_ITEM(CActionSetWritePFS,_L8("WritePFS")),
    36 	SCRIPT_ITEM(CExternPbeParams, _L8("ExternPbeParams"))
    37     END_SCRIPT_LIST
    38     
    39     TDriveUnit sysDrive (RFs::GetSystemDrive());
    40 	
    41     TDriveName driveName(sysDrive.Name());
    42     
    43     TBuf<24> scriptFile (driveName);
    44     scriptFile.Append(_L("\\tpbe\\tpbetests_v2.txt"));
    45     
    46     TBuf<24> logFile (driveName);
    47     logFile.Append(_L("\\tpbetestsv2.log"));
    48     
    49 	CTestSetup::CreateAndRunTestsL(theTestTypes, scriptFile, logFile);
    50     }
    51 
    52 GLDEF_C TInt E32Main() // main function called by E32
    53     {
    54 	__UHEAP_MARK;
    55 	CTrapCleanup* cleanup = CTrapCleanup::New(); // get clean-up stack
    56 	TRAPD(error, callExampleL());
    57 	__ASSERT_ALWAYS(!error,User::Panic(_L("tpbe"),error));
    58 	delete cleanup; // destroy clean-up stack
    59 	__UHEAP_MARKEND;
    60 	return 0;
    61     }