[PATCH v2] covoar: fix the extension mismatch in trace file

thelunatic vijaykumar9597 at gmail.com
Sun May 13 03:38:19 UTC 2018


- read the trace files with .exe.cov extention
---
 tester/covoar/covoar.cc | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/tester/covoar/covoar.cc b/tester/covoar/covoar.cc
index 5bed98f..f03edc7 100644
--- a/tester/covoar/covoar.cc
+++ b/tester/covoar/covoar.cc
@@ -317,11 +317,7 @@ int main(
         std::cerr << "warning: Unable to read executable: " << argv[i] << std::endl;
       } else {
         coverageFileName = argv[i];
-        coverageFileName.replace(
-          coverageFileName.length() - executableExtension.size(),
-          executableExtension.size(),
-          coverageExtension
-        );
+	coverageFileName.append('.'+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