Ticket #1909: branch_report_2.patch

File branch_report_2.patch, 4.1 KB (added by Pawel, on Sep 10, 2011 at 9:58:21 AM)

branch coverage report will now show Taken / Not Taken info in separate, sortable columns.

  • rtems-testing/covoar/ChangeLog

    RCS file: /usr1/CVS/rtems-testing/covoar/ChangeLog,v
    retrieving revision 1.24
    diff -u -8 -p -r1.24 ChangeLog
     
     12011-09-10      Pawel Zagorski <pzagor@agh.edu.pl>
     2
     3        * covoar/DesiredSymbols.cc, covoar/ReportsHtml.cc:
     4        Fixed Taken / Not taken information to be shown in separate
     5        sortable and filterable collumns in branch report. Minor
     6        code aligment fix in DesiredSymbols.c
     7
    182011-09-01      Pawel Zagorski <pzagor@agh.edu.pl>
    29
    310        PR 1909/testing
    411        * ReportsHtml.cc: Add branch taken and not taken count columns.
    512
    6132011-08-31      Pawel Zagorski <pzagor@agh.edu.pl>
    714
    815        * covoar/CoverageMapBase.cc, covoar/CoverageMapBase.h,
  • rtems-testing/covoar/DesiredSymbols.cc

    RCS file: /usr1/CVS/rtems-testing/covoar/DesiredSymbols.cc,v
    retrieving revision 1.9
    diff -u -8 -p -r1.9 DesiredSymbols.cc
    namespace Coverage { 
    2929  DesiredSymbols::~DesiredSymbols()
    3030  {
    3131  }
    3232
    3333  void DesiredSymbols::load(
    3434    const char* const symbolsFile
    3535  )
    3636  {
    37     int                   cStatus;
     37    int                     cStatus;
    3838    bool                    done = false;
    3939    FILE*                   sFile;
    4040    SymbolInformation*      symInfo;
    4141    int                     line = 1;
    4242    std::string             symbol;
    4343
    4444    // Ensure that symbols file name is given.
    4545    if ( !symbolsFile ) {
  • rtems-testing/covoar/ReportsHtml.cc

    RCS file: /usr1/CVS/rtems-testing/covoar/ReportsHtml.cc,v
    retrieving revision 1.5
    diff -u -8 -p -r1.5 ReportsHtml.cc
    namespace Coverage { 
    198198           TABLE_HEADER_CLASS "\">\n"
    199199        "<thead>\n"
    200200        "<tr>\n"
    201201        "<th class=\"table-sortable:default\" align=\"left\">Symbol</th>\n"
    202202        "<th class=\"table-sortable:default\" align=\"left\">Line</th>\n"
    203203        "<th class=\"table-filterable table-sortable:default\" align=\"left\">File</th>\n"
    204204        "<th class=\"table-sortable:numeric\" align=\"left\">Size </br>Bytes</th>\n"
    205205        "<th class=\"table-sortable:default\" align=\"left\">Reason</th>\n"
    206         "<th class=\"table-sortable:default\" align=\"left\">Taken / Not Taken</th>\n"
     206        "<th class=\"table-filterable table-sortable:default\" align=\"left\">Taken</th>\n"
     207        "<th class=\"table-filterable table-sortable:default\" align=\"left\">Not Taken</th>\n"
    207208        "<th class=\"table-filterable table-sortable:default\" align=\"left\">Classification</th>\n"
    208209        "<th class=\"table-sortable:default\" align=\"left\">Explanation</th>\n"
    209210        "</tr>\n"
    210211        "</thead>\n"
    211212        "<tbody>\n",
    212213        asctime( localtime(&timestamp_m) )
    213214      );
    214215    }
    namespace Coverage { 
    565566      );
    566567
    567568    // Taken / Not taken counts
    568569    lowAddress = rangePtr->lowAddress;
    569570    bAddress = symbolPtr->second.baseAddress;
    570571    theCoverageMap = symbolPtr->second.unifiedCoverageMap;
    571572    fprintf(
    572573      report,
    573       "<td class=\"covoar-td\" align=\"center\">%d / %d</td>\n",
    574       theCoverageMap->getWasTaken( lowAddress - bAddress ),
     574      "<td class=\"covoar-td\" align=\"center\">%d</td>\n",
     575      theCoverageMap->getWasTaken( lowAddress - bAddress )
     576    );
     577        fprintf(
     578      report,
     579      "<td class=\"covoar-td\" align=\"center\">%d</td>\n",
    575580      theCoverageMap->getWasNotTaken( lowAddress - bAddress )
    576581    );
    577582
    578583    // See if an explanation is available and write the Classification and
    579584    // the Explination Columns.
    580585    explanation = AllExplanations->lookupExplanation( rangePtr->lowSourceLine );
    581586    if ( !explanation ) {
    582587      // Write Classificationditr->second.baseAddress