summaryrefslogtreecommitdiffstats
path: root/tester/covoar/covoar.cc
diff options
context:
space:
mode:
authorRyan Long <ryan.long@oarcorp.com>2021-07-27 15:49:02 -0400
committerJoel Sherrill <joel@rtems.org>2021-08-03 15:56:53 -0500
commit0c6f57a25abdff1d75362cb28be2796a333c56aa (patch)
tree1c97e3c14b0a33a590af2c4eb7d8ae414f675fdd /tester/covoar/covoar.cc
parentReportsText.cc: Restore ostream format (diff)
downloadrtems-tools-0c6f57a25abdff1d75362cb28be2796a333c56aa.tar.bz2
Remove AllExplanations global variable
- Replaced AllExplanations in app_common with a local variable in covoar() - Added the allExplanations_m member variable to ReportsBase - Added a parameter to ReportsBase and its derived classes' constructors to initialize allExplanations_m - Added parameter to GenerateReports() to pass the variable from covoar() to the constructors for Reports*
Diffstat (limited to 'tester/covoar/covoar.cc')
-rw-r--r--tester/covoar/covoar.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/tester/covoar/covoar.cc b/tester/covoar/covoar.cc
index 8d63132..9295519 100644
--- a/tester/covoar/covoar.cc
+++ b/tester/covoar/covoar.cc
@@ -174,6 +174,7 @@ int covoar(
std::string symbolSet;
std::string option;
int opt;
+ Coverage::Explanations allExplanations;
//
// Process command line options.
@@ -354,9 +355,8 @@ int covoar(
<< " symbols" << std::endl;
// Create explanations.
- AllExplanations = new Coverage::Explanations();
if ( explanations )
- AllExplanations->load( explanations );
+ allExplanations.load( explanations );
// Create coverage map reader.
coverageFormat = Coverage::CoverageFormatToEnum(format);
@@ -474,7 +474,7 @@ int covoar(
std::cerr << "Generate Reports" << std::endl;
for (const auto& setName : SymbolsToAnalyze->getSetNames()) {
- Coverage::GenerateReports(setName);
+ Coverage::GenerateReports( setName, allExplanations );
}
// Write explanations that were not found.
@@ -488,7 +488,7 @@ int covoar(
if (Verbose)
std::cerr << "Writing Not Found Report (" << notFound<< ')' << std::endl;
- AllExplanations->writeNotFound( notFound.c_str() );
+ allExplanations.writeNotFound( notFound.c_str() );
}
//Leave tempfiles around if debug flag (-d) is enabled.