Skip to content

beanduan22/Visual-Comparison

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Run the tool

OpenCV-Testing is a tool of fuzzing Opencv-python, you can run main.py directly.

standarized API info

you can find in

OpenCV-Testing/API_info.py

Docker and OpenCV Coverage Setup

Follow these steps to build and run a Docker container for OpenCV code coverage testing, and generate a coverage report.

  1. Build Dockerfile

    docker build -t opencv-coverage .
  2. Run Docker Container

    docker run -it --rm -v "Your_Location\cover_opencv\new_cov\opencv_docker_code_coverages\OpenCV-Testing:/app" --name opencv_coverage_container_1 opencv-coverage
  3. Check the Files

    ls -l
  4. Run Python Script

    python3 main.py
  5. Navigate to OpenCV Build Directory

    cd /usr/local/src/opencv/build/
  6. Install gcovr

    pip install gcovr
  7. Generate Coverage Report

    gcovr -r /usr/local/src/opencv --html --html-details -o coverage_report.html
  8. Find Container ID

    docker ps
  9. Copy Coverage Report to Host

    docker cp <container_id>:/usr/local/src/opencv/build/coverage_report.html <path_on_host>

    Example:

    docker cp c4f9932f08ee:/usr/local/src/opencv/build/coverage_report.html .
  10. Open Coverage Report

    • macOS:
      open <path_on_host>/coverage_report.html
    • Windows:
      start <path_on_host>\coverage_report.html
    • Linux:
      xdg-open <path_on_host>/coverage_report.html

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors