sl@0: // Copyright (c) 2006-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: // f32test\bench\t_fsrcreatefiles.cpp sl@0: // sl@0: // sl@0: sl@0: sl@0: #include sl@0: #include sl@0: #include "t_benchmain.h" sl@0: sl@0: GLDEF_D RTest test(_L("File Server Benchmarks, create files")); sl@0: LOCAL_D TDriveList gDriveList; sl@0: sl@0: /** Creates files sl@0: sl@0: @param aSelector Configuration in case of manual execution sl@0: */ sl@0: LOCAL_C TInt TestAll(TAny* aSelector) sl@0: { sl@0: TInt r = 0; sl@0: TTime startTime; sl@0: TTime endTime; sl@0: TTimeIntervalSeconds timeTaken; sl@0: sl@0: Validate(aSelector); sl@0: sl@0: gFormat = EFalse; // The card won't be formatted after this test execution sl@0: sl@0: startTime.HomeTime(); sl@0: sl@0: TestFileCreate(aSelector); sl@0: sl@0: endTime.HomeTime(); sl@0: r = endTime.SecondsFrom(startTime, timeTaken); sl@0: FailIfError(r); sl@0: test.Printf(_L("#~TS_Timing_%d,%d=%d\n"), gTestHarness, gTestCase, timeTaken.Int()); sl@0: sl@0: return KErrNone; sl@0: } sl@0: sl@0: /** Call all tests sl@0: sl@0: */ sl@0: GLDEF_C void CallTestsL() sl@0: { sl@0: sl@0: CSelectionBox* TheSelector = CSelectionBox::NewL(test.Console()); sl@0: // Each test case of the suite has an identifyer for parsing purposes of the results sl@0: gTestHarness = 0; sl@0: sl@0: sl@0: if(gMode == 0) sl@0: { // Manual sl@0: gSessionPath=_L("?:\\"); sl@0: TCallBack createFiles(TestFileCreate,TheSelector); sl@0: TheSelector->AddDriveSelectorL(TheFs); sl@0: TheSelector->AddLineL(_L("Create all files"),createFiles); sl@0: TheSelector->Run(); sl@0: } sl@0: else sl@0: { // Automatic sl@0: TestAll(TheSelector); sl@0: } sl@0: sl@0: delete TheSelector; sl@0: }