douchi0638 2015-06-14 17:40
浏览 24
已采纳

软件包的“执行测试”失败,但单独测试运行正常,并且软件包编译良好

When I execute go test for a whole package the tests fail with:

$ go test github.com/dm03514/go-edu-db/...
# github.com/dm03514/go-edu-db/backends
go1: internal compiler error: in read_type, at go/gofrontend/import.cc:669
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gccgo-4.9/README.Bugs> for instructions.
FAIL    github.com/dm03514/go-edu-db/backends [build failed]
?       github.com/dm03514/go-edu-db/cmd        [no test files]
# github.com/dm03514/go-edu-db/httpd
go1: internal compiler error: in read_type, at go/gofrontend/import.cc:669
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gccgo-4.9/README.Bugs> for instructions.
FAIL    github.com/dm03514/go-edu-db/httpd [build failed]
?       github.com/dm03514/go-edu-db/logging    [no test files]

While the above tests fail go install builds correctly and I can run each of my individual tests correctly:

$ go test github.com/dm03514/go-edu-db/backends/backends_test.go
ok      command-line-arguments  0.025s


go test github.com/dm03514/go-edu-db/httpd/handlers_test.go
ok      command-line-arguments  0.021s

Has anyone ran into this before? I am brand new to Go, and to get around this I have just been executing each one of my test files individually.

The output of go build is nothing

$ go build github.com/dm03514/go-edu-db/...
$

go version is

$ go version
go version xgcc (Ubuntu 4.9-20140406-0ubuntu1) 4.9.0 20140405 (experimental) [trunk revision 209157] linux/amd64
  • 写回答

1条回答 默认 最新

  • douliandan7340 2015-06-15 00:19
    关注

    I installed the ubuntu golang package

    $ go version
    go version go1.2.1 linux/amd64
    

    And now am getting meaningful error messages when running package tests:

    $ go test github.com/dm03514/go-edu-db/..

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 STM32驱动继电器
  • ¥15 Windows server update services
  • ¥15 关于#c语言#的问题:我现在在做一个墨水屏设计,2.9英寸的小屏怎么换4.2英寸大屏
  • ¥15 模糊pid与pid仿真结果几乎一样
  • ¥15 java的GUI的运用
  • ¥15 Web.config连不上数据库
  • ¥15 我想付费需要AKM公司DSP开发资料及相关开发。
  • ¥15 怎么配置广告联盟瀑布流
  • ¥15 Rstudio 保存代码闪退
  • ¥20 win系统的PYQT程序生成的数据如何放入云服务器阿里云window版?