Update contrib.
1 // Copyright (c) 1995-2009 Nokia Corporation and/or its subsidiary(-ies).
2 // All rights reserved.
3 // This component and the accompanying materials are made available
4 // under the terms of the License "Eclipse Public License v1.0"
5 // which accompanies this distribution, and is available
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
14 // f32test\server\clean_prepdc.cpp
15 // This test call all the other datacaging tests so that the relevant configuration and cleanup
16 // for the test may be carried out.
24 #include <e32std_private.h>
29 GLDEF_D RTest test(_L("clean_prepdc"));
31 //_LIT(KResourcePath, "?:\\Resource\\");
33 //_LIT(KSystemPath, "?:\\System\\");
35 //_LIT(KSystemPath, "?:\\Sys\\");
37 //_LIT(KPrivatePath, "?:\\Private\\");
39 //_LIT(Kt_dcroot, "t_dcroot");
40 //_LIT(Kt_dctcb, "t_dctcb");
41 //_LIT(Kt_dcnone, "t_dcnone");
42 //_LIT(Kt_dcallfiles, "t_dcallfiles");
43 //_LIT(Kt_dcdiskadmin, "t_dcdiskadmin");
44 //_LIT(Kt_dcrootallfiles, "t_dcrootallfiles");
45 //_LIT(Kt_dctcballfiles, "t_dctcballfiles");
46 //_LIT(Kt_dcrootdiskadmin, "t_dcrootdiskadmin");
47 //_LIT(Kt_dctcbdiskadmin, "t_dctcbdiskadmin");
48 //_LIT(Kt_dcdiskadminallfiles, "t_dcdiskadminallfiles");
52 GLDEF_C void CleanupL()
54 //Tidy up after each security test
57 CFileMan* fMan=CFileMan::NewL(TheFs);
58 TInt r=fMan->RmDir(_L("\\Resource\\"));
59 test(r==KErrNone || r==KErrPathNotFound);
60 r=fMan->RmDir(_L("\\Sys\\"));
61 test(r==KErrNone || r==KErrPathNotFound);
62 r=fMan->RmDir(_L("\\Private\\"));
63 test(r==KErrNone || r==KErrPathNotFound);
67 GLDEF_C void TestSetup()
69 //creates files for each security test
72 TInt r=TheFs.MkDir(_L("\\Resource\\"));
74 r=TheFs.MkDir(_L("\\Sys\\"));
77 r=f.Create(TheFs,_L("\\Resource\\resourcefile.txt"),EFileWrite);
78 test(r==KErrNone || r==KErrAlreadyExists);
82 GLDEF_C void CallTestsL(/*TChar aDriveLetter*/)
84 // Calls all data caging tests after setting up the file system for them
88 TInt r= TheFs.SessionPath(tmp);
90 RDebug::Print(_L("sessp=%S"),&tmp);