Comments (14)
I have seen similar recently, can you try with the -v option it should give more information about what the instrumenting code is touching.
On 12/03/2013, at 9:44, Dustin Sallings [email protected] wrote:
I'm not quite sure what's happening here, but I'm trying to run tests in github.com/couchbaselabs/cbgb/cbgb and I get the following:
/var/folders/nt/_3y11_t12szbmgshvz6zgbhh0000gn/T/gocov343768907/src/pkg/github.com/couchbaselabs/cbgb/cbgb/main.go:11:2: no Go source files in /var/folders/nt/_3y11_t12szbmgshvz6zgbhh0000gn/T/gocov343768907/src/pkg/github.com/couchbaselabs/cbgb
go test failed: exit status 1
failed to parse gocov output: stat /var/folders/nt/_3y11_t12szbmgshvz6zgbhh0000gn/T/gocov343768907/gocov.out: no such file or directory
—
Reply to this email directly or view it on GitHub.
from gocov.
Like this?
dhcp-110:~/go/src/github.com/couchbaselabs/cbgb/cbgb 632% gocov test -v
instrumenting package "github.com/couchbaselabs/cbgb/cbgb"
/var/folders/nt/_3y11_t12szbmgshvz6zgbhh0000gn/T/gocov505911182/src/pkg/github.com/couchbaselabs/cbgb/cbgb/main.go:11:2: no Go source files in /var/folders/nt/_3y11_t12szbmgshvz6zgbhh0000gn/T/gocov505911182/src/pkg/github.com/couchbaselabs/cbgb
go test failed: exit status 1
failed to parse gocov output: stat /var/folders/nt/_3y11_t12szbmgshvz6zgbhh0000gn/T/gocov505911182/gocov.out: no such file or directory
from gocov.
Le sigh, that is what I get for doing support from a phone. Ill try to take a look tomorrow unless axw beats me too it.
On 12/03/2013, at 9:48, Dustin Sallings [email protected] wrote:
Like this?
dhcp-110:~/go/src/github.com/couchbaselabs/cbgb/cbgb 632% gocov test -v
instrumenting package "github.com/couchbaselabs/cbgb/cbgb"
/var/folders/nt/_3y11_t12szbmgshvz6zgbhh0000gn/T/gocov505911182/src/pkg/github.com/couchbaselabs/cbgb/cbgb/main.go:11:2: no Go source files in /var/folders/nt/_3y11_t12szbmgshvz6zgbhh0000gn/T/gocov505911182/src/pkg/github.com/couchbaselabs/cbgb
go test failed: exit status 1
failed to parse gocov output: stat /var/folders/nt/_3y11_t12szbmgshvz6zgbhh0000gn/T/gocov505911182/gocov.out: no such file or directory
—
Reply to this email directly or view it on GitHub.
from gocov.
Sorry for the tardy reply - I've been out of the country on vacation.
I will try to get to this later in the week and get back to you.
from gocov.
Just took a look, and figured it out: you've got ".../cbgb/cbgb", which imports ".../cbgb". Since the "-deps" flag isn't passed, gocov isn't copying the source files in ".../cbgb". When "go test" is run, it finds that directory when attempting to resolve the package import (but finds no sources files).
This is a bug; gocov should copy the source files into that directory regardless of whether they're instrumented.
from gocov.
P.S. You can run with "-deps" in the mean time to work around this bug.
from gocov.
Sorry about the delay - fixed now.
from gocov.
NP, the workaround did help. Looking forward to this. Thanks so much for your awesome work.
Andrew Wilkins [email protected] wrote:
Sorry about the delay - fixed now.
—
Reply to this email directly or view it on GitHub.
from gocov.
gocov updated and:
D:\Golibs\my\src\bitbucket.org\gosimple\listdict>gocov test bitbucket.org/gosimple/listdict > coverage.json
failed to instrument package(bitbucket.org/gosimple/listdict): no Go source files in D:\Golibs\my\src\bitbucket.org\gosimple
but if I add /
at the end of package path it's working
D:\Golibs\my\src\bitbucket.org\gosimple\listdict>gocov test bitbucket.org/gosimple/listdict/ > coverage.json
warning: building out-of-date packages:
errors
io
math
syscall
time
os
strconv
reflect
fmt
github.com/axw/gocov
math/rand
strings
bytes
sort
flag
bufio
text/tabwriter
runtime/pprof
testing
regexp/syntax
regexp
installing these packages with 'go test -i bitbucket.org/gosimple/listdict/' will speed future tests.
ok bitbucket.org/gosimple/listdict 0.415s
Best regards,
Dobrosław Żybort
P.S. don't have slightest idea why I have that warning (using golang tip)
from gocov.
I've been having similar issues -- I can test in a subdirectory, but not the toplevel now. I've been switching back and forth between gocov branches to do this. :/
from gocov.
Aw crap, sorry guys. That's what happens when I code tired. I'll look into it ASAP.
from gocov.
@matrixik @dustin Please try again. Sorry about that.
Regarding the warning: this is a known issue. It's because a new GOROOT is created, and source is instrumented, so things really are "out of date". I've opened Issue #39 to address this.
Also, I've opened Issue #38 to add some automated tests for instrumentation. I've been slack, and regressions aren't cool.
from gocov.
Looks good for both cases for me.
Thanks again for this awesome tool.
Andrew Wilkins wrote:
@matrixik https://github.com/matrixik @dustin
https://github.com/dustin Please try again. Sorry about that.Regarding the warning: this is a known issue. It's because a new
GOROOT is created, and source is instrumented, so things really are
"out of date". I've opened Issue #39
#39 to address this.Also, I've opened Issue #38 #38
to add some automated tests for instrumentation. I've been slack, and
regressions aren't cool.—
Reply to this email directly or view it on GitHub
#37 (comment).
from gocov.
Working OK now. Thank you.
Best regards,
Dobrosław Żybort
from gocov.
Related Issues (20)
- [Question] Can i use gocov to get code coverage report for a go application if my tests are written in another framework using python HOT 3
- Does gocov not support generics in Go version 1.20? HOT 1
- Does gocov currently support generics,expected '(', found '[' (and 5 more errors)
- When the file size of coverage is large (420KB), generating json is very slow, taking several hours
- how to confirm the supported GO version of gocov
- gocov's result is different from go test HOT 1
- If a package has no test files, the lines in that package are not added to the total line count. HOT 10
- Pass arguments to go list HOT 4
- please tag a version, to make go modules usage easier HOT 2
- gocov: gocov report print total coverage NaN% when totalReached and totalStatements are zero
- gocov does not pass -tags parameter HOT 1
- What is the difference to the go standard tools?
- gocov failed when trying on file that has a formatting directive
- 按照指示安装不了,有什么国内的镜像地址吗 HOT 1
- go get doesn't install HOT 2
- the code source default is $GOROOT. whether the code source path can be specified by the user when using gocov convert? HOT 3
- Unable to use go install HOT 2
- gocov with go1.18 generics HOT 3
- [question] Is it possible to exclude a method from code coverage? HOT 1
- gocov with coverprofile raise error, the file path contains duplicate parts HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gocov.