|
1 // Copyright (c) 2006-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 /** |
|
17 @file |
|
18 @test |
|
19 @internalComponent - Internal Symbian test code |
|
20 */ |
|
21 |
|
22 #ifndef __TRESTARTSYS_WITHMODE_H__ |
|
23 #define __TRESTARTSYS_WITHMODE_H__ |
|
24 |
|
25 #include <test/testexecutestepbase.h> |
|
26 #include <savenotf.h> |
|
27 |
|
28 _LIT(KRestartSysWithMode, "RestartSysWithMode"); |
|
29 |
|
30 /** |
|
31 Only 4 bits are used to persist a startup mode on the H4 reference hardware, |
|
32 which results in 2^4 = 16 startup modes available in total. |
|
33 |
|
34 from omap_hrp/assp/omap24xx/inc/omap24xxconst.h |
|
35 |
|
36 // Restart startup Mode (bits 19-16) |
|
37 const TUint KmRestartStartupModes = 0x000F0000; // Bits 19 to 16 |
|
38 const TUint KsRestartStartupModes = 16; |
|
39 const TUint KRestartStartupModesSize = 4; // 4 bits |
|
40 */ |
|
41 const TInt KDefaultBootMode = 0; |
|
42 const TInt KNonDefaultBootMode = 15; |
|
43 |
|
44 /** |
|
45 This is the test step class for a restartsys test where a restart actually takes place, |
|
46 and in a different startup-configuration than the default. The test used the last used |
|
47 startup-mode to determine in which phase it is, i.e. before or after the restart. |
|
48 |
|
49 Only one test of this kind can be run by DABS, and it should be the first test listed |
|
50 in autoexec.bat. |
|
51 */ |
|
52 class CRestartSysWithMode : public CTestStep, public MSaveObserver |
|
53 { |
|
54 public: |
|
55 CRestartSysWithMode(const TDesC& aStepName); |
|
56 ~CRestartSysWithMode(); |
|
57 |
|
58 // from CTestStep |
|
59 TVerdict doTestStepPreambleL(); |
|
60 TVerdict doTestStepL(); |
|
61 |
|
62 // from MSaveObserver |
|
63 void SaveL(TSaveType aSaveType); |
|
64 |
|
65 private: |
|
66 void InitRebootL(); |
|
67 void SaveVariablesToFileL(); |
|
68 void AssertExpectationsL(); |
|
69 void AssertRestartIsPreemptiveL(); |
|
70 |
|
71 private: |
|
72 CActiveScheduler* iScheduler; |
|
73 CSaveNotifier* iNotifier; |
|
74 TTime iShutdownInitiated; |
|
75 TTime iShutdownPerformed; |
|
76 TSaveType iSaveType; |
|
77 }; |
|
78 |
|
79 #endif |