[PATCH] covoar: fixing the extension mismatch in trace file

thelunatic vijaykumar9597 at gmail.com
Sat May 12 19:42:23 UTC 2018


---
 tester/covoar/covoar.cc | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/tester/covoar/covoar.cc b/tester/covoar/covoar.cc
index 5bed98f..95dc990 100644
--- a/tester/covoar/covoar.cc
+++ b/tester/covoar/covoar.cc
@@ -185,7 +185,7 @@ int main(
   Executables                   executablesToAnalyze;
   Coverage::ExecutableInfo*     executableInfo = NULL;
   std::string                   executableExtension = "exe";
-  std::string                   coverageExtension = "cov";
+  std::string                   coverageExtension = ".cov";
   Coverage::CoverageFormats_t   coverageFormat = Coverage::COVERAGE_FORMAT_QEMU;
   Coverage::CoverageReaderBase* coverageReader = NULL;
   char*                         executable = NULL;
@@ -317,11 +317,12 @@ int main(
         std::cerr << "warning: Unable to read executable: " << argv[i] << std::endl;
       } else {
         coverageFileName = argv[i];
-        coverageFileName.replace(
+	coverageFileName.append(coverageExtension);
+     /* coverageFileName.replace(
           coverageFileName.length() - executableExtension.size(),
           executableExtension.size(),
           coverageExtension
-        );
+        ); */
 
         if (!FileIsReadable( coverageFileName.c_str() )) {
           std::cerr << "warning: Unable to read coverage file: " << coverageFileName
-- 
2.14.3



More information about the devel mailing list