执行接受测试时出现Go错误导致失败。

huangapple go评论86阅读模式
英文:

Execution failing with go error for acceptance tests

问题

我正在尝试执行验收测试(AATs),但是当我尝试使用ginkgo命令或make aat时,它会失败,并显示以下Go错误:

lisha@admin-bld-box:$ ginkgo
Failed to compile topology-middleware:

go: unknown flag -i cannot be used with -c
usage: go test [build/test flags] [packages] [build/test flags & test binary flags]
Run 'go help test' and 'go help testflag' for details.

Ginkgo ran 1 suite in 36.754007ms
Test Suite Failed
lisha@admin-bld-box:$ ^C

在我的makefile中,ginko命令如下所示:

GINKGO_SKIP  ?= SLOW
GINKGO_FLAGS ?= --progress --trace --v --slowSpecThreshold=15 --focus="$(GINKGO_FOCUS)" --skip="$(GINKGO_SKIP)"

请帮我找出根本原因。

我尝试使用"go test -v ./"来执行它,这个命令可以工作,但是我想知道错误中"go: unknown flag -i cannot be used with -c"这一行的根本原因。

英文:

I am trying to execute acceptance testing (AATs), But when eveni try to use ginkgo command or make aat, it fails with below go error :

lisha@admin-bld-box:$ ginkgo
Failed to compile topology-middleware:

go: unknown flag -i cannot be used with -c
usage: go test [build/test flags] [packages] [build/test flags & test binary flags]
Run 'go help test' and 'go help testflag' for details.

Ginkgo ran 1 suite in 36.754007ms
Test Suite Failed
lisha@admin-bld-box:$ ^C

in makefile my ginko commnads are specified as below

GINKGO_SKIP  ?= SLOW
GINKGO_FLAGS ?= --progress --trace --v --slowSpecThreshold=15 --focus="$(GINKGO_FOCUS)" --skip="$(GINKGO_SKIP)"

kindly help me find the root cause

I have tried executing it via go test -v ./ which works, however i want to know the root cause for this line "go: unknown flag -i cannot be used with -c" in the error

答案1

得分: 2

在旧版本的Go中,使用-i标志来指定go install命令应安装指定包的依赖项。然而,在Go 1.17及更高版本中,已经移除了-i标志。

英文:

The -i flag was used in older versions of Go to specify that the go install command should install the dependencies of the specified packages. However, in Go 1.17 and later, the -i flag has been removed.

huangapple
  • 本文由 发表于 2023年7月25日 14:29:27
  • 转载请务必保留本文链接:https://go.coder-hub.com/76759975.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定