Skip to content

Unable to find gcov files in /tmp folder. #54

Description

@citypilgrim

To Replicate

  1. Write a hello world program main.C
  2. Build with coverage activated
CC=g++ -g -01 -ftest-coverage -fprofile-arcs
$CC -c main.C
$CC main.o -o main.exe
  1. Generate coverage files
./main.exe
gcov -b main.exe
  1. Move coverage files to /tmp
  2. Configure cov-coverage-file-paths
(add-to-list 'cov-coverage-file-paths "/tmp")
(add-to-list 'cov-coverage-file-paths
    #’(lambda (file-dir file-name)
        (let ((try (format "%s/%s%s"
                           "/tmp" file-name
                           ".gcov")))
          (and (file-exists-p try)
               (cons (file-truename try) ’gcov)))))
  1. Activate cov-mode inside of main.C

Output

In messages buffer

No coverage data found for /path/to/main.C

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions