author | Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com> |
Mon, 18 Jan 2010 21:31:10 +0200 | |
changeset 8 | 538db54a451d |
parent 4 | 56f325a607ea |
child 14 | 5d2844f35677 |
permissions | -rw-r--r-- |
0 | 1 |
// Copyright (c) 2008-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". |
|
7 |
// |
|
8 |
// Initial Contributors: |
|
9 |
// Nokia Corporation - initial contribution. |
|
10 |
// |
|
11 |
// Contributors: |
|
12 |
// |
|
13 |
// Description: |
|
14 |
// Hardware Configuration Respoitory Test Application |
|
15 |
// |
|
16 |
||
17 |
#define __E32TEST_EXTENSION__ |
|
18 |
#include <e32test.h> |
|
19 |
#include <e32svr.h> |
|
20 |
#include <u32hal.h> |
|
21 |
#include <hal.h> |
|
22 |
#include <hal_data.h> |
|
23 |
#include "d_hcrut.h" |
|
24 |
||
25 |
#define __TRACE_LINE__() test.Printf(_L("%d\n"),__LINE__) |
|
26 |
||
27 |
RTest test(_L("T_HCRUT")); |
|
28 |
||
29 |
_LIT(KTestDriver,"d_hcrut"); |
|
30 |
||
31 |
RHcrTest HcrTest; |
|
32 |
||
33 |
//--------------------------------------------- |
|
34 |
//! @SYMTestCaseID |
|
35 |
//! @SYMTestType |
|
36 |
//! @SYMPREQ |
|
37 |
//! @SYMTestCaseDesc |
|
38 |
//! @SYMTestActions |
|
39 |
//! |
|
40 |
//! @SYMTestExpectedResults |
|
41 |
//! |
|
42 |
//! @SYMTestPriority |
|
43 |
//! @SYMTestStatus |
|
44 |
//--------------------------------------------- |
|
45 |
TInt TestBasics () |
|
46 |
{ |
|
47 |
test.Next(_L("Switch repository test")); |
|
4
56f325a607ea
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
48 |
|
0 | 49 |
test_KErrNone( HcrTest.Test_SwitchRepository()); |
50 |
||
51 |
// Wait for idle + async cleanup (waits for DKernelEventHandler to go away) |
|
52 |
TInt r = UserSvr::HalFunction(EHalGroupKernel, EKernelHalSupervisorBarrier, (TAny*)5000, 0); |
|
53 |
test_KErrNone(r); |
|
54 |
||
4
56f325a607ea
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
55 |
User::After(1000000); |
0 | 56 |
|
57 |
return KErrNone; |
|
58 |
} |
|
59 |
||
60 |
||
61 |
||
62 |
||
63 |
GLDEF_C TInt E32Main() |
|
64 |
{ |
|
65 |
TInt r; |
|
66 |
||
67 |
test.Title(); |
|
68 |
test.Start(_L("=== HCR Test Suite")); |
|
69 |
||
70 |
||
71 |
test.Next(_L("=== Open test LDD")); |
|
72 |
r = User::LoadLogicalDevice(KTestDriver); |
|
73 |
test_Assert((r==KErrNone || r==KErrAlreadyExists),void (0)); |
|
74 |
||
75 |
r = HcrTest.Open(); |
|
76 |
test_KErrNone(r); |
|
77 |
// Do test cases |
|
78 |
// |
|
79 |
TestBasics(); |
|
80 |
||
81 |
test.Next(_L("=== Close LDD")); |
|
82 |
HcrTest.Close(); |
|
83 |
||
84 |
r = User::FreeLogicalDevice(RHcrTest::Name()); |
|
85 |
test_KErrNone(r); |
|
86 |
||
87 |
test.End(); |
|
88 |
||
89 |
return(KErrNone); |
|
90 |
} |
|
91 |