Bringup » Historie » Version 5
Maximilian Seesslen, 18.08.2022 16:17
1 | 1 | Maximilian Seesslen | h1. Bringup |
---|---|---|---|
2 | |||
3 | There has to be a bringup application which uses the bringup class from campo. |
||
4 | At least the bringup application is able to write the hwinfo via gdb scripts. |
||
5 | |||
6 | * The result is an protocol that should be added to the hw repository. "doc/bringup_0.1.x.txt". |
||
7 | The bringup class shall dump the protocoll after the interactive communication. |
||
8 | |||
9 | * Defects are created |
||
10 | |||
11 | 2 | Maximilian Seesslen | * The readme is enhanced by possible erratas with defect id when the reason is clear. (meanwhile fixed biwak problem) |
12 | 3 | Maximilian Seesslen | |
13 | h2. Architecture |
||
14 | |||
15 | 5 | Maximilian Seesslen | Keeping CBringup more generic and using inheritance for tests. |
16 | |||
17 | 3 | Maximilian Seesslen | <pre><code class="cpp"> |
18 | |||
19 | class CBringup |
||
20 | { |
||
21 | CList<CResult> results; |
||
22 | } |
||
23 | |||
24 | 4 | Maximilian Seesslen | class CWriter |
25 | { |
||
26 | CList<CResult> &results; |
||
27 | void printSystemInfo(); |
||
28 | void printTests(); |
||
29 | void printSummary(); |
||
30 | void generateProtokol(); |
||
31 | } |
||
32 | |||
33 | 3 | Maximilian Seesslen | int CBringup::testAssert(const char *test) |
34 | { |
||
35 | CResult &result=( results << CResult(test) ); |
||
36 | result.setGroup(getGroup()); |
||
37 | } |
||
38 | |||
39 | int CBringup::testRtc(CRtc &rtc) |
||
40 | { |
||
41 | setGroup("RTC"); |
||
42 | testAssert("plausibility", rtc.getDate() > 2010, rtc.getDate() ); |
||
43 | return(sta); |
||
44 | } |
||
45 | |||
46 | 5 | Maximilian Seesslen | </code></pre> |
47 | |||
48 | h2. Alternative |
||
49 | |||
50 | <pre><code class="cpp"> |
||
51 | CBringup |
||
52 | { |
||
53 | CList <CTest *> tests; |
||
54 | } |
||
55 | |||
56 | CTest |
||
57 | { |
||
58 | const char *topic; |
||
59 | CList <CResult> results; |
||
60 | } |
||
61 | |||
62 | CResult |
||
63 | { |
||
64 | const char *issue; |
||
65 | EResult result; |
||
66 | } |
||
67 | |||
68 | main() |
||
69 | { |
||
70 | CPlatform *pPlatform=new CPlatform(); |
||
71 | CBringup bringup; |
||
72 | bringup.addTest( new CTestRtc() ); |
||
73 | |||
74 | CWriterMd writer( bringup ); |
||
75 | } |
||
76 | 3 | Maximilian Seesslen | </code></pre> |