Giter Club home page Giter Club logo

Comments (14)

davecheney avatar davecheney commented on August 20, 2024

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.

dustin avatar dustin commented on August 20, 2024

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.

davecheney avatar davecheney commented on August 20, 2024

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.

axw avatar axw commented on August 20, 2024

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.

axw avatar axw commented on August 20, 2024

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.

axw avatar axw commented on August 20, 2024

P.S. You can run with "-deps" in the mean time to work around this bug.

from gocov.

axw avatar axw commented on August 20, 2024

Sorry about the delay - fixed now.

from gocov.

dustin avatar dustin commented on August 20, 2024

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.

matrixik avatar matrixik commented on August 20, 2024

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.

dustin avatar dustin commented on August 20, 2024

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.

axw avatar axw commented on August 20, 2024

Aw crap, sorry guys. That's what happens when I code tired. I'll look into it ASAP.

from gocov.

axw avatar axw commented on August 20, 2024

@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.

dustin avatar dustin commented on August 20, 2024

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.

matrixik avatar matrixik commented on August 20, 2024

Working OK now. Thank you.

Best regards,
Dobrosław Żybort

from gocov.

Related Issues (20)

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.