summaryrefslogtreecommitdiff
path: root/rtems-coverage
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2010-05-12 16:39:01 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2010-05-12 16:39:01 +0000
commitd509ff0ff87c97cde77e44bb4ac021ca7cf0cde2 (patch)
treea0340035e9d40426732b3d7d183548975ecae4d8 /rtems-coverage
parent01f2cfc2293b55dc03f2da44f429cafc95e5f750 (diff)
2010-05-12 Joel Sherrill <joel.sherrilL@OARcorp.com>
* ReportsBase.cc, ReportsBase.h, ReportsHtml.cc, ReportsHtml.h: Add index file to reports written.
Diffstat (limited to 'rtems-coverage')
-rw-r--r--rtems-coverage/ChangeLog5
-rw-r--r--rtems-coverage/ReportsBase.cc9
-rw-r--r--rtems-coverage/ReportsBase.h9
-rw-r--r--rtems-coverage/ReportsHtml.cc41
-rw-r--r--rtems-coverage/ReportsHtml.h67
5 files changed, 101 insertions, 30 deletions
diff --git a/rtems-coverage/ChangeLog b/rtems-coverage/ChangeLog
index c05085e..fc6115a 100644
--- a/rtems-coverage/ChangeLog
+++ b/rtems-coverage/ChangeLog
@@ -1,5 +1,10 @@
2010-05-12 Joel Sherrill <joel.sherrilL@OARcorp.com>
+ * ReportsBase.cc, ReportsBase.h, ReportsHtml.cc, ReportsHtml.h: Add
+ index file to reports written.
+
+2010-05-12 Joel Sherrill <joel.sherrilL@OARcorp.com>
+
* ReportsBase.cc, ReportsBase.h, ReportsHtml.cc, ReportsHtml.h,
ReportsText.cc, ReportsText.h: Add initial Symbol Summary report as
copy of Size report.
diff --git a/rtems-coverage/ReportsBase.cc b/rtems-coverage/ReportsBase.cc
index 0017b24..daaaceb 100644
--- a/rtems-coverage/ReportsBase.cc
+++ b/rtems-coverage/ReportsBase.cc
@@ -56,6 +56,12 @@ FILE* ReportsBase::OpenFile(
return aFile;
}
+void ReportsBase::WriteIndex(
+ const char* const fileName
+)
+{
+}
+
FILE* ReportsBase::OpenAnnotatedFile(
const char* const fileName
)
@@ -416,6 +422,9 @@ void GenerateReports()
for (ritr = reportList.begin(); ritr != reportList.end(); ritr++ ) {
reports = *ritr;
+ reportName = "index" + reports->ReportExtension();
+ reports->WriteIndex( reportName.c_str() );
+
reportName = "annotated" + reports->ReportExtension();
reports->WriteAnnotatedReport( reportName.c_str() );
diff --git a/rtems-coverage/ReportsBase.h b/rtems-coverage/ReportsBase.h
index c9e2936..d526f8a 100644
--- a/rtems-coverage/ReportsBase.h
+++ b/rtems-coverage/ReportsBase.h
@@ -27,6 +27,15 @@ class ReportsBase {
~ReportsBase();
/*!
+ * This method produces an index of the reports generated.
+ *
+ * @param[in] fileName identifies the report file name
+ */
+ virtual void WriteIndex(
+ const char* const fileName
+ );
+
+ /*!
* This method produces an annotated assembly listing report containing
* the disassembly of each symbol that was not completely covered.
*
diff --git a/rtems-coverage/ReportsHtml.cc b/rtems-coverage/ReportsHtml.cc
index 6737ae2..e65295a 100644
--- a/rtems-coverage/ReportsHtml.cc
+++ b/rtems-coverage/ReportsHtml.cc
@@ -24,6 +24,46 @@ namespace Coverage {
{
}
+ void ReportsHtml::WriteIndex(
+ const char* const fileName
+ )
+ {
+ #define PRINT_ITEM( _t, _n ) \
+ fprintf( \
+ aFile, \
+ "<li>%s (<a href=\"%s.html\">html</a> or "\
+ "<a href=\"%s.txt\">text</a>)</li>", \
+ _t, _n, _n );
+ #define PRINT_TEXT_ITEM( _t, _n ) \
+ fprintf( \
+ aFile, \
+ "<li>%s (<a href=\"%s\">text</a>)", \
+ _t, _n );
+
+ FILE* aFile;
+
+ // Open the file
+ aFile = OpenFile( fileName );
+
+ fprintf( aFile, "<strong>Reports Available</string>\n" );
+ fprintf( aFile, "<ul>\n" );
+
+ PRINT_ITEM( "Coverage Report", "uncovered" );
+ PRINT_ITEM( "Branch Report", "branch" );
+ PRINT_ITEM( "Annotated Assembly", "annotated" );
+ PRINT_ITEM( "Symbol Summary", "symbolSummary" );
+ PRINT_ITEM( "Size Report", "sizes" );
+
+ PRINT_TEXT_ITEM( "Explanations Not Found", "ExplanationsNotFound.txt" );
+
+ fprintf( aFile, "</li>\n" );
+
+ CloseFile( aFile );
+
+ #undef PRINT_ITEM
+ #undef PRINT_TEXT_ITEM
+ }
+
FILE* ReportsHtml::OpenFile(
const char* const fileName
)
@@ -44,7 +84,6 @@ namespace Coverage {
"<pre class=\"code\">\n"
);
-
return aFile;
}
diff --git a/rtems-coverage/ReportsHtml.h b/rtems-coverage/ReportsHtml.h
index 484407e..8c590e4 100644
--- a/rtems-coverage/ReportsHtml.h
+++ b/rtems-coverage/ReportsHtml.h
@@ -25,35 +25,44 @@ class ReportsHtml: public ReportsBase {
ReportsHtml();
~ReportsHtml();
- /*!
- * This method produces a report that contains information about each
- * uncovered branch statement.
- *
- * @param[in] fileName identifies the branch report file name
- */
- void WriteBranchReport(
- const char* const fileName
- );
-
- /*!
- * This method produces a report that contains information about each
- * uncovered range of bytes.
- *
- * @param[in] fileName identifies the coverage report file name
- */
- void WriteCoverageReport(
- const char* const fileName
- );
-
- /*!
- * This method produces a summary report that lists each uncovered
- * range of bytes.
- *
- * @param[in] fileName identifies the size report file name
- */
- void WriteSizeReport(
- const char* const fileName
- );
+ /*!
+ * This method produces an index file.
+ *
+ * @param[in] fileName identifies the file name.
+ */
+ void WriteIndex(
+ const char* const fileName
+ );
+
+ /*!
+ * This method produces a report that contains information about each
+ * uncovered branch statement.
+ *
+ * @param[in] fileName identifies the branch report file name
+ */
+ void WriteBranchReport(
+ const char* const fileName
+ );
+
+ /*!
+ * This method produces a report that contains information about each
+ * uncovered range of bytes.
+ *
+ * @param[in] fileName identifies the coverage report file name
+ */
+ void WriteCoverageReport(
+ const char* const fileName
+ );
+
+ /*!
+ * This method produces a summary report that lists each uncovered
+ * range of bytes.
+ *
+ * @param[in] fileName identifies the size report file name
+ */
+ void WriteSizeReport(
+ const char* const fileName
+ );
protected: