|
1 // Copyright (c) 1997-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 "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". |
|
7 // |
|
8 // Initial Contributors: |
|
9 // Nokia Corporation - initial contribution. |
|
10 // |
|
11 // Contributors: |
|
12 // |
|
13 // Description: |
|
14 // |
|
15 |
|
16 #include <e32test.h> |
|
17 |
|
18 #include "TE_EtelMMTestStepBase.h" |
|
19 #include "TE_mmloaddrv.h" |
|
20 #include "testdef.h" |
|
21 |
|
22 #if defined (__WINS__) |
|
23 #define PDD_NAME _L("ECDRV") |
|
24 #define LDD_NAME _L("ECOMM") |
|
25 #else |
|
26 #define PDD_NAME _L("EUART1") |
|
27 #define LDD_NAME _L("ECOMM") |
|
28 #endif |
|
29 |
|
30 CTestMMLoadDrv::CTestMMLoadDrv() |
|
31 /** Each test step initialises it's own name |
|
32 */ |
|
33 { |
|
34 // store the name of this test case |
|
35 // this is the name that is used by the script file |
|
36 SetTestStepName(_L("TestMMLoadDrv")); |
|
37 } |
|
38 |
|
39 enum TVerdict CTestMMLoadDrv::doTestStepL() |
|
40 { |
|
41 TInt r=User::LoadPhysicalDevice(PDD_NAME); |
|
42 TEST(r==KErrNone || r==KErrAlreadyExists); |
|
43 #if defined PDD2_NAME |
|
44 r=User::LoadPhysicalDevice(PDD2_NAME); |
|
45 TEST(r==KErrNone || r==KErrAlreadyExists); |
|
46 #endif |
|
47 r=User::LoadLogicalDevice(LDD_NAME); |
|
48 TEST(r==KErrNone|| r==KErrAlreadyExists); |
|
49 |
|
50 // When bootstrapping C32 we have to avoid the PhBkSyncServer being started, since |
|
51 // it needs a different CommDB |
|
52 _LIT(KPhbkSyncCMI, "phbsync.cmi"); |
|
53 r = StartC32WithCMISuppressions(KPhbkSyncCMI); |
|
54 if((r!=KErrNone)&&(r!=KErrAlreadyExists)) |
|
55 INFO_PRINTF2(_L("Failed to start C32 %d"),r); |
|
56 |
|
57 TEST(iCommServer.Connect()==KErrNone); |
|
58 TInt res=iCommServer.LoadCommModule(_L("ECUART.CSY")); |
|
59 TEST(res==KErrNone || res==KErrAlreadyExists); |
|
60 INFO_PRINTF1(_L("TE_ETELMM - Testing Multimode Cellular API")); |
|
61 |
|
62 // TInt ret = server.Connect(); |
|
63 // TEST(ret==KErrNone); |
|
64 // ret=server.LoadPhoneModule(DMMTSY_MODULE_NAME); |
|
65 // TEST(ret==KErrNone); |
|
66 |
|
67 return TestStepResult(); |
|
68 } |
|
69 |
|
70 CTestMMUnLoadDrv::CTestMMUnLoadDrv() |
|
71 /** Each test step initialises it's own name |
|
72 */ |
|
73 { |
|
74 // store the name of this test case |
|
75 // this is the name that is used by the script file |
|
76 SetTestStepName(_L("TestMMUnLoadDrv")); |
|
77 } |
|
78 |
|
79 enum TVerdict CTestMMUnLoadDrv::doTestStepL() |
|
80 { |
|
81 // server.UnloadPhoneModule(DMMTSY_MODULE_NAME); |
|
82 // server.Close(); |
|
83 |
|
84 // test.End(); |
|
85 |
|
86 iCommServer.Close(); |
|
87 |
|
88 return TestStepResult(); |
|
89 } |