Skip to content

testing: cgo from within gotest #4030

@gopherbot

Description

@gopherbot

by d.wright.dev:

Not being able to use cgo from within gotest prevents integration of regression testing
on packages that make use of C.

What steps will reproduce the problem?

1. import "C" from a new test file
2. run go test <package> on its package

What is the expected output?

> ok/FAIL <package> 0.020s
> ...

What do you see instead?

> can't load package: package <package>: use of cgo in test
/path/to/file/using/cgo/dlbug_fail_test.go not supported

Which compiler are you using (5g, 6g, 8g, gccgo)?

8g

Which operating system are you using?

OS X 10.8.1 (12B19)

Which version are you using?  (run 'go version')

go version go1.0.2

Please provide any additional information below.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions