sl@0: /* sl@0: * Copyright (c) 1998-2009 Nokia Corporation and/or its subsidiary(-ies). sl@0: * All rights reserved. sl@0: * This component and the accompanying materials are made available sl@0: * under the terms of the License "Eclipse Public License v1.0" sl@0: * which accompanies this distribution, and is available sl@0: * at the URL "http://www.eclipse.org/legal/epl-v10.html". sl@0: * sl@0: * Initial Contributors: sl@0: * Nokia Corporation - initial contribution. sl@0: * sl@0: * Contributors: sl@0: * sl@0: * Description: sl@0: * sl@0: */ sl@0: sl@0: sl@0: #include sl@0: #include "t_testhandler.h" sl@0: #include sl@0: #include "tactionvalidate.h" sl@0: #include "taction_build.h" sl@0: #include "tscriptandhardcoded.h" sl@0: sl@0: LOCAL_D void callExampleL() // initialize and call example code under cleanup stack sl@0: { sl@0: START_SCRIPT_LIST sl@0: SCRIPT_ITEM(CTestActionBuild,_L8("Build")), sl@0: SCRIPT_ITEM(CActionValidateWithStore,_L8("ValidateWithStore")), sl@0: SCRIPT_ITEM(CActionValidateWithSuppliedCerts,_L8("ValidateWithSuppliedCerts")) sl@0: END_SCRIPT_LIST sl@0: sl@0: TDriveUnit sysDrive (RFs::GetSystemDrive()); sl@0: TDriveName sysDriveName (sysDrive.Name()); sl@0: TBuf<128> scriptFile (sysDriveName); sl@0: scriptFile.Append(_L("\\tpkixcert\\scripts\\tpkixtest_part1.txt")); sl@0: sl@0: TBuf<64> logFile (sysDriveName); sl@0: logFile.Append(_L("\\TPKIXCERT_log1.txt")); sl@0: sl@0: CTestSetup::CreateAndRunTestsL(theTestTypes, scriptFile, logFile); sl@0: } sl@0: sl@0: GLDEF_C TInt E32Main() // main function called by E32 sl@0: { sl@0: __UHEAP_MARK; sl@0: CTrapCleanup* cleanup = CTrapCleanup::New(); // get clean-up stack sl@0: TRAPD(error, callExampleL()); sl@0: __ASSERT_ALWAYS(!error,User::Panic(_L("CERT"),error)); sl@0: delete cleanup; // destroy clean-up stack sl@0: __UHEAP_MARKEND; sl@0: return 0; sl@0: }