SlideShare a Scribd company logo
3
Most read
4
Most read
5
Most read
Using gcov and lcovMagus Chenmaguschen@hotmail.comhttp://magustest.com/blog/
AgendagcovlcovHow to apply gcov on adsUsing lcov generate reportExample2
Introduction to gcovA test coverage programWorks only on code compiled with GCCCollect code coverage data and generate plain text coverage report3
Introduction to lcovLCOV is a graphical front-end for GCC's coverage testing tool gcov. It collects gcov data for multiple source files and creates HTML pages containing the source code annotated with coverage information. It also adds overview pages for easy navigation within the file structure. LCOV supports statement, function and branch coverage measurement.4
How to apply gcov on adsBuild adserver with option “--coverage”This option is used to compile and link code instrumented for coverage analysis. The option is a synonym for -fprofile-arcs-ftest-coverage (when compiling) and -lgcov (when linking).5
How to apply gcov on adsCopy ads binary to your own environment Export two envGCOV_PREFIX and GCOV_PREFIX_STRIP Run adsSend requestTo generate code coverage data, exit the program normally (using kill, not kill -9)Some .gcda file is generated6
How to generate html reportCopy all source files and .gcno files from build server to your own environmentCopy all .gcda file to your own environmentlcov -t 'Adserver regression' -o ads_test.info -c -d .-t title-o output file name-c capture coverage data-d use data files in DIR7
How to generate html reportgenhtml -o result ads_test.info -o output folder of the all html contentsads_test.info INFO FILE name8
How to view the HTML reportApache httpd/etc/init.d/httpd startCopy or link the result folder under /var/www/html/Lighttpd/usr/local/sbin/lighttpd -f lighttpd_jchen.confCopy or link the result folder under server.document-root9
Example10
Q & A11
Thank you

More Related Content

PPT
Aspect Oriented Software Development
PPTX
REVIEW TECHNIQUES.pptx
PPTX
Static Testing
PDF
Center loss for Face Recognition
PDF
Clouds and Tools: Cheat Sheets & Infographics
PDF
Image segmentation
PPTX
Computer Graphics - Hidden Line Removal Algorithm
PPT
Chapter 15 software product metrics
Aspect Oriented Software Development
REVIEW TECHNIQUES.pptx
Static Testing
Center loss for Face Recognition
Clouds and Tools: Cheat Sheets & Infographics
Image segmentation
Computer Graphics - Hidden Line Removal Algorithm
Chapter 15 software product metrics

What's hot (20)

PPTX
WORKFLOW OF THE PROCESS IN SPM
PPTX
OpenCV 에서 OpenCL 살짝 써보기
PPTX
Digital Image restoration
PPTX
Unit3 dip
PPTX
Software Architecture
PPT
Google Megastore
PDF
Qt for Python
 
PPTX
Frame buffer
PPT
Polygon Fill
PPTX
Otsu binarization
PPT
Liang barsky Line Clipping Algorithm
DOC
Computer Graphics HAND BOOK 2013
PPTX
Color image processing
PPT
debugging - system software
PPTX
3D Graphics : Computer Graphics Fundamentals
PDF
Golang
PDF
Aspect oriented software development
PDF
WebAssembly
PDF
Feature detection and matching
WORKFLOW OF THE PROCESS IN SPM
OpenCV 에서 OpenCL 살짝 써보기
Digital Image restoration
Unit3 dip
Software Architecture
Google Megastore
Qt for Python
 
Frame buffer
Polygon Fill
Otsu binarization
Liang barsky Line Clipping Algorithm
Computer Graphics HAND BOOK 2013
Color image processing
debugging - system software
3D Graphics : Computer Graphics Fundamentals
Golang
Aspect oriented software development
WebAssembly
Feature detection and matching
Ad

Viewers also liked (10)

KEY
Prepare for PHP Test Fest 2009
PDF
Code coverage & tools
PDF
Static Code Analysis and Cppcheck
PDF
Code Coverage
ODP
An Introduction to PC-Lint
PDF
Code Coverage Revised : EclEmma on JaCoCo
PPTX
Code coverage analysis in testing
 
PDF
Code coverage
PPT
Code coverage
PDF
Linux Profiling at Netflix
Prepare for PHP Test Fest 2009
Code coverage & tools
Static Code Analysis and Cppcheck
Code Coverage
An Introduction to PC-Lint
Code Coverage Revised : EclEmma on JaCoCo
Code coverage analysis in testing
 
Code coverage
Code coverage
Linux Profiling at Netflix
Ad

Similar to Using gcov and lcov (20)

PPT
MyMobileWeb Certification Part IV
PDF
Bertrandt | Automotive Best Practice: How to Design, Review, Approve, and Eff...
PDF
TRESOR: The modular cloud - Building a domain specific cloud platform with OS...
PPT
IBM Hybrid Cloud Integration UCC Talk, 21st November 2018
PDF
Working with the Cognos BI Server Using the Greenplum Database -- Interoperab...
 
PDF
gRPC Microservices in Go (MEAP V08) Hüseyin Babal
PDF
A New Paradigm In Linux Debug From Viosoft
PPTX
Simplifying and accelerating converged media with Open Visual Cloud
PDF
이제는 말할 수 있다: KBS, beNX의 AWS 활용법 – 선영진 KBS 부장, 강진우 beNX 팀장, 강호성 beNX 엔지니어:: AW...
PDF
Embedding Chromium into AGL demo platform with WAM
PPTX
Using Deep Learning for Computer Vision Applications
DOC
A New Paradigm In Linux Debug From Viosoft Corporation
PDF
What do you need to know about g rpc on .net
PPT
2008.12.23 CompoWeb
PPT
COMPRO- WEB ALBUM & MOTION ANALYZER
PPTX
CODE IGNITER
PDF
Baha Majid WCA4Z IBM Z Customer Council Boston June 2024.pdf
PPTX
CI, CD, CT, Deploy, IaaS, DevOps, Stage
PPTX
Preparing_for_PCA_Workbook.pptx
DOCX
Overview & Downloading the Baseline using Global Configuration Managemen tand...
MyMobileWeb Certification Part IV
Bertrandt | Automotive Best Practice: How to Design, Review, Approve, and Eff...
TRESOR: The modular cloud - Building a domain specific cloud platform with OS...
IBM Hybrid Cloud Integration UCC Talk, 21st November 2018
Working with the Cognos BI Server Using the Greenplum Database -- Interoperab...
 
gRPC Microservices in Go (MEAP V08) Hüseyin Babal
A New Paradigm In Linux Debug From Viosoft
Simplifying and accelerating converged media with Open Visual Cloud
이제는 말할 수 있다: KBS, beNX의 AWS 활용법 – 선영진 KBS 부장, 강진우 beNX 팀장, 강호성 beNX 엔지니어:: AW...
Embedding Chromium into AGL demo platform with WAM
Using Deep Learning for Computer Vision Applications
A New Paradigm In Linux Debug From Viosoft Corporation
What do you need to know about g rpc on .net
2008.12.23 CompoWeb
COMPRO- WEB ALBUM & MOTION ANALYZER
CODE IGNITER
Baha Majid WCA4Z IBM Z Customer Council Boston June 2024.pdf
CI, CD, CT, Deploy, IaaS, DevOps, Stage
Preparing_for_PCA_Workbook.pptx
Overview & Downloading the Baseline using Global Configuration Managemen tand...

Recently uploaded (20)

PDF
Advanced IT Governance
PDF
solutions_manual_-_materials___processing_in_manufacturing__demargo_.pdf
PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PPTX
Comunidade Salesforce São Paulo - Desmistificando o Omnistudio (Vlocity)
PDF
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
PDF
Advanced Soft Computing BINUS July 2025.pdf
PPTX
Cloud computing and distributed systems.
PDF
Modernizing your data center with Dell and AMD
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PDF
Sensors and Actuators in IoT Systems using pdf
PPTX
Big Data Technologies - Introduction.pptx
PPTX
Telecom Fraud Prevention Guide | Hyperlink InfoSystem
PDF
NewMind AI Weekly Chronicles - August'25 Week I
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PPTX
Understanding_Digital_Forensics_Presentation.pptx
PPTX
MYSQL Presentation for SQL database connectivity
Advanced IT Governance
solutions_manual_-_materials___processing_in_manufacturing__demargo_.pdf
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
Diabetes mellitus diagnosis method based random forest with bat algorithm
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
Comunidade Salesforce São Paulo - Desmistificando o Omnistudio (Vlocity)
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
Advanced Soft Computing BINUS July 2025.pdf
Cloud computing and distributed systems.
Modernizing your data center with Dell and AMD
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
Sensors and Actuators in IoT Systems using pdf
Big Data Technologies - Introduction.pptx
Telecom Fraud Prevention Guide | Hyperlink InfoSystem
NewMind AI Weekly Chronicles - August'25 Week I
Reach Out and Touch Someone: Haptics and Empathic Computing
Understanding_Digital_Forensics_Presentation.pptx
MYSQL Presentation for SQL database connectivity

Using gcov and lcov

  • 1. Using gcov and lcovMagus [email protected]://magustest.com/blog/
  • 2. AgendagcovlcovHow to apply gcov on adsUsing lcov generate reportExample2
  • 3. Introduction to gcovA test coverage programWorks only on code compiled with GCCCollect code coverage data and generate plain text coverage report3
  • 4. Introduction to lcovLCOV is a graphical front-end for GCC's coverage testing tool gcov. It collects gcov data for multiple source files and creates HTML pages containing the source code annotated with coverage information. It also adds overview pages for easy navigation within the file structure. LCOV supports statement, function and branch coverage measurement.4
  • 5. How to apply gcov on adsBuild adserver with option “--coverage”This option is used to compile and link code instrumented for coverage analysis. The option is a synonym for -fprofile-arcs-ftest-coverage (when compiling) and -lgcov (when linking).5
  • 6. How to apply gcov on adsCopy ads binary to your own environment Export two envGCOV_PREFIX and GCOV_PREFIX_STRIP Run adsSend requestTo generate code coverage data, exit the program normally (using kill, not kill -9)Some .gcda file is generated6
  • 7. How to generate html reportCopy all source files and .gcno files from build server to your own environmentCopy all .gcda file to your own environmentlcov -t 'Adserver regression' -o ads_test.info -c -d .-t title-o output file name-c capture coverage data-d use data files in DIR7
  • 8. How to generate html reportgenhtml -o result ads_test.info -o output folder of the all html contentsads_test.info INFO FILE name8
  • 9. How to view the HTML reportApache httpd/etc/init.d/httpd startCopy or link the result folder under /var/www/html/Lighttpd/usr/local/sbin/lighttpd -f lighttpd_jchen.confCopy or link the result folder under server.document-root9