os/security/cryptoservices/certificateandkeymgmt/tpkixcert/tpkixcertmain.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 <f32file.h>
    22 #include "tactionvalidate.h"
    23 #include "taction_build.h"
    24 #include "tscriptandhardcoded.h"
    25 
    26 LOCAL_D void callExampleL() // initialize and call example code under cleanup stack
    27     {
    28 	START_SCRIPT_LIST
    29 	SCRIPT_ITEM(CTestActionBuild,_L8("Build")),
    30 	SCRIPT_ITEM(CActionValidateWithStore,_L8("ValidateWithStore")),
    31 	SCRIPT_ITEM(CActionValidateWithSuppliedCerts,_L8("ValidateWithSuppliedCerts"))
    32 	END_SCRIPT_LIST
    33 	
    34 	TDriveUnit sysDrive (RFs::GetSystemDrive());
    35 	TDriveName sysDriveName (sysDrive.Name());
    36 	TBuf<128> scriptFile (sysDriveName);
    37 	scriptFile.Append(_L("\\tpkixcert\\scripts\\tpkixtest_part1.txt"));
    38 	
    39 	TBuf<64> logFile (sysDriveName);
    40 	logFile.Append(_L("\\TPKIXCERT_log1.txt"));
    41 	
    42 	CTestSetup::CreateAndRunTestsL(theTestTypes, scriptFile, logFile);
    43     }
    44 
    45 GLDEF_C TInt E32Main() // main function called by E32
    46     {
    47 	__UHEAP_MARK;
    48 	CTrapCleanup* cleanup = CTrapCleanup::New(); // get clean-up stack
    49 	TRAPD(error, callExampleL());
    50 	__ASSERT_ALWAYS(!error,User::Panic(_L("CERT"),error));
    51 	delete cleanup; // destroy clean-up stack
    52 	__UHEAP_MARKEND;
    53 	return 0;
    54     }