Bringup » Historie » Version 6
Maximilian Seesslen, 18.08.2022 16:39
| 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 | <pre><code class="cpp"> |
||
| 16 | |||
| 17 | class CBringup |
||
| 18 | { |
||
| 19 | CList<CResult> results; |
||
| 20 | } |
||
| 21 | |||
| 22 | 4 | Maximilian Seesslen | class CWriter |
| 23 | { |
||
| 24 | CList<CResult> &results; |
||
| 25 | void printSystemInfo(); |
||
| 26 | void printTests(); |
||
| 27 | void printSummary(); |
||
| 28 | void generateProtokol(); |
||
| 29 | } |
||
| 30 | |||
| 31 | 3 | Maximilian Seesslen | int CBringup::testAssert(const char *test) |
| 32 | { |
||
| 33 | CResult &result=( results << CResult(test) ); |
||
| 34 | result.setGroup(getGroup()); |
||
| 35 | } |
||
| 36 | |||
| 37 | int CBringup::testRtc(CRtc &rtc) |
||
| 38 | { |
||
| 39 | setGroup("RTC"); |
||
| 40 | testAssert("plausibility", rtc.getDate() > 2010, rtc.getDate() ); |
||
| 41 | return(sta); |
||
| 42 | } |
||
| 43 | |||
| 44 | 5 | Maximilian Seesslen | </code></pre> |
| 45 | |||
| 46 | 1 | Maximilian Seesslen | h2. Alternative |
| 47 | |||
| 48 | 6 | Maximilian Seesslen | Keeping CBringup more generic and using inheritance for tests. |
| 49 | This will create a lot of overhead for all splitted classes. |
||
| 50 | |||
| 51 | 5 | Maximilian Seesslen | <pre><code class="cpp"> |
| 52 | CBringup |
||
| 53 | { |
||
| 54 | CList <CTest *> tests; |
||
| 55 | } |
||
| 56 | |||
| 57 | CTest |
||
| 58 | { |
||
| 59 | 1 | Maximilian Seesslen | const char *topic; |
| 60 | 5 | Maximilian Seesslen | CList <CResult> results; |
| 61 | 6 | Maximilian Seesslen | run() = 0; |
| 62 | 5 | Maximilian Seesslen | } |
| 63 | |||
| 64 | CResult |
||
| 65 | { |
||
| 66 | const char *issue; |
||
| 67 | EResult result; |
||
| 68 | } |
||
| 69 | |||
| 70 | main() |
||
| 71 | { |
||
| 72 | CPlatform *pPlatform=new CPlatform(); |
||
| 73 | CBringup bringup; |
||
| 74 | bringup.addTest( new CTestRtc() ); |
||
| 75 | |||
| 76 | CWriterMd writer( bringup ); |
||
| 77 | } |
||
| 78 | 3 | Maximilian Seesslen | </code></pre> |