Code Monkey home page Code Monkey logo

grcov's Issues

Add coveralls format output with function block information

As discussed on IRC, it would be nice to have an output format specifier that outputs coveralls format, but also adds function information to each child (esp. from where to where, line-wise, functions are in the source file).

This information is very useful for automated analysis on a per-function basis.

Add hit counts to ActiveData output

Each covered line is in the covered array as an object (eg {"line": 42}). Please add the coverage count to this object under count property:

Example, Line 42 has been executed 4 times:

{"line": 42, "count": 4}

The count property should not be included if the count is 1. There should be no objects with count of zero.

grcov not cleaning tmp when done?

The ActiveData ETL machines use grcov, but their drives are being filled with files like

/tmp/grcov.nfGLoxvBaMDa

is grcov cleaning up after it is done?

Get grcov working on Mozilla's "build" type one-click loaners

For more context, see https://bugzilla.mozilla.org/show_bug.cgi?id=1350446

I'd like to run grcov on a one-click loaner. The default version of gcc on the loaner is incompatible with grcov. There is no easy way to install a newer version.

  • We could ask to reconfigure the one-click-loaner environment to match what is actually used for the build.
  • Can grcov support earlier versions of gcc?

The default version of gcc available on a one-click loaner from a linux build job (e.g. [1]) is 4.4.7. This is not what is used by the actual build task that generated gcno files (./mach build), which actually uses tooltool to fetch gcc 4.9.4. [2,3]

I can modify the PATH on the loaner to use gcc 4.9.4, but I'm still missing libraries to get grcov working.

./grcov: /lib64/libc.so.6: version `GLIBC_2.14' not found (required by ./grcov)
./grcov: /lib64/libc.so.6: version `GLIBC_2.18' not found (required by ./grcov)

[1] https://treeherder.mozilla.org/#/jobs?repo=try&[email protected]&selectedJob=92502848
[2] https://treeherder.mozilla.org/logviewer.html#?job_id=92502848&repo=try&lineNumber=1095
[3] https://treeherder.mozilla.org/logviewer.html#?job_id=92502848&repo=try&lineNumber=1005

Improve error handling

Currently, we are panicking when a lcov/gcov file is malformed.
We should still terminate grcov, but we should print more information first (which file we are parsing when the error occurs and which line is causing the error).

The parser functions should not panic, they should return an error. The panic should happen in the caller.

gcov_to_es not working

Please update the install script to install grcov so that the ActiveData-ETL can use it. ETL machines are setup by machine, there will be no human to fill in the blanks for scripts that almost work.

Make LLVM C++ parser directly populate the Rust result struct instead of generating gcov files

Right now, the Rust code is calling the C++ code to generate gcov files (in the intermediate format since ). Then, the Rust code parses the gcov files.

We should make this more intelligent, making the Rust code call the C++ code to parse the gcno file and the C++ code call back into Rust to populate the result struct while parsing.

Example of how to use a Rust object from C++: http://jakegoulding.com/rust-ffi-omnibus/objects/.

This 1) avoids I/O (as we wouldn't need to generate the gcov files), 2) avoids parsing the same info twice (once from the gcno and once from the gcov).

Is uncovered lines outside functions legitimate?

This query
{
"from":"coverage",
"where":{"eq":{"_id":"tc.601123:60111463.55"}}
}
https://activedata.allizom.org/tools/query.html#query_id=w+8Nmnkj

Showing source for /home/worker/workspace/build/src/js/src/vm/AsyncFunction.cpp

Shows a orphan record with some lines uncovered:

"method":{
	"total_covered":0,
	"covered":[],
	"total_uncovered":7,
	"uncovered":[223,210,227,216,220,232,230],
	"percentage_covered":0
}

Is that possible? Sorry for the dumb question.

grcov panics when using LLVM flag

Platform: Linux x86-64
Compiler: Clang 5, GCC 7.2.0

This issue may be due to me misunderstanding how to use grcov.

After generating .gcda / .gcno files with cargo-cov, grcov panics when trying to generate coveralls formatted files with:

grcov /dir/with/gcda-gcno-files --llvm -t coveralls --token *** --commit-sha *** > out.info

Here is an example of the errors:

'Failed parsing execution count: function _ZN5alloc5slice8{{impl}}18into_vec<[u8; 20]>E called 0 returned 0% blocks executed 0%: ParseIntError { kind: InvalidDigit }'

Not sure if this is related to #25. Thanks in advance for any help.

Add a deploy script

It would be nice to have ActiveData-ETL use this. We need a deploy script (Ubuntu) to help test it, and to know all the know all the dependencies.

Automatically detect GCC version during tests

running 1 test
rm -f a.out a.exe main.gcno main.gcda default.profraw
g++ -fprofile-arcs -ftest-coverage main.c
12345689test test_integration ... FAILED

failures:

---- test_integration stdout ----

tests/switch
GCC
thread 'test_integration' panicked at 'COMPILER_VER env variable is not defined: NotPresent', /checkout/src/libcore/result.rs:906:4
note: Run with RUST_BACKTRACE=1 for a backtrace.

failures:
test_integration

test result: FAILED. 0 passed; 1 failed; 0 ignored; 0 measured; 0 filtered out

error: test failed, to rerun pass '--test test'

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.