updating github.com/onsi/ginkgo to v1.8.0
This commit is contained in:
14
vendor/github.com/onsi/ginkgo/ginkgo/generate_command.go
generated
vendored
14
vendor/github.com/onsi/ginkgo/ginkgo/generate_command.go
generated
vendored
@@ -108,10 +108,8 @@ func generateSpec(args []string, agouti, noDot, internal bool) {
|
||||
func generateSpecForSubject(subject string, agouti, noDot, internal bool) error {
|
||||
packageName, specFilePrefix, formattedName := getPackageAndFormattedName()
|
||||
if subject != "" {
|
||||
subject = strings.Split(subject, ".go")[0]
|
||||
subject = strings.Split(subject, "_test")[0]
|
||||
specFilePrefix = subject
|
||||
formattedName = prettifyPackageName(subject)
|
||||
specFilePrefix = formatSubject(subject)
|
||||
formattedName = prettifyPackageName(specFilePrefix)
|
||||
}
|
||||
|
||||
data := specData{
|
||||
@@ -152,6 +150,14 @@ func generateSpecForSubject(subject string, agouti, noDot, internal bool) error
|
||||
return nil
|
||||
}
|
||||
|
||||
func formatSubject(name string) string {
|
||||
name = strings.Replace(name, "-", "_", -1)
|
||||
name = strings.Replace(name, " ", "_", -1)
|
||||
name = strings.Split(name, ".go")[0]
|
||||
name = strings.Split(name, "_test")[0]
|
||||
return name
|
||||
}
|
||||
|
||||
func getPackageImportPath() string {
|
||||
workingDir, err := os.Getwd()
|
||||
if err != nil {
|
||||
|
||||
2
vendor/github.com/onsi/ginkgo/ginkgo/run_watch_and_build_command_flags.go
generated
vendored
2
vendor/github.com/onsi/ginkgo/ginkgo/run_watch_and_build_command_flags.go
generated
vendored
@@ -126,6 +126,7 @@ func (c *RunWatchAndBuildCommandFlags) flags(mode int) {
|
||||
c.FlagSet.BoolVar(c.boolSlot("work"), "work", false, "Print the name of the temporary work directory and do not delete it when exiting.")
|
||||
c.FlagSet.StringVar(c.stringSlot("asmflags"), "asmflags", "", "Arguments to pass on each go tool asm invocation.")
|
||||
c.FlagSet.StringVar(c.stringSlot("buildmode"), "buildmode", "", "Build mode to use. See 'go help buildmode' for more.")
|
||||
c.FlagSet.StringVar(c.stringSlot("mod"), "mod", "", "Go module control. See 'go help modules' for more.")
|
||||
c.FlagSet.StringVar(c.stringSlot("compiler"), "compiler", "", "Name of compiler to use, as in runtime.Compiler (gccgo or gc).")
|
||||
c.FlagSet.StringVar(c.stringSlot("gccgoflags"), "gccgoflags", "", "Arguments to pass on each gccgo compiler/linker invocation.")
|
||||
c.FlagSet.StringVar(c.stringSlot("installsuffix"), "installsuffix", "", "A suffix to use in the name of the package installation directory.")
|
||||
@@ -140,6 +141,7 @@ func (c *RunWatchAndBuildCommandFlags) flags(mode int) {
|
||||
c.FlagSet.IntVar(c.intSlot("memprofilerate"), "memprofilerate", 0, "Enable more precise (and expensive) memory profiles by setting runtime.MemProfileRate.")
|
||||
c.FlagSet.StringVar(c.stringSlot("outputdir"), "outputdir", "", "Place output files from profiling in the specified directory.")
|
||||
c.FlagSet.BoolVar(c.boolSlot("requireSuite"), "requireSuite", false, "Fail if there are ginkgo tests in a directory but no test suite (missing RunSpecs)")
|
||||
c.FlagSet.StringVar(c.stringSlot("vet"), "vet", "", "Configure the invocation of 'go vet' to use the comma-separated list of vet checks. If list is 'off', 'go test' does not run 'go vet' at all.")
|
||||
|
||||
if mode == runMode || mode == watchMode {
|
||||
config.Flags(c.FlagSet, "", false)
|
||||
|
||||
2
vendor/github.com/onsi/ginkgo/ginkgo/testrunner/BUILD
generated
vendored
2
vendor/github.com/onsi/ginkgo/ginkgo/testrunner/BUILD
generated
vendored
@@ -3,6 +3,8 @@ load("@io_bazel_rules_go//go:def.bzl", "go_library")
|
||||
go_library(
|
||||
name = "go_default_library",
|
||||
srcs = [
|
||||
"build_args.go",
|
||||
"build_args_old.go",
|
||||
"log_writer.go",
|
||||
"run_result.go",
|
||||
"test_runner.go",
|
||||
|
||||
7
vendor/github.com/onsi/ginkgo/ginkgo/testrunner/build_args.go
generated
vendored
Normal file
7
vendor/github.com/onsi/ginkgo/ginkgo/testrunner/build_args.go
generated
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
// +build go1.10
|
||||
|
||||
package testrunner
|
||||
|
||||
var (
|
||||
buildArgs = []string{"test", "-c"}
|
||||
)
|
||||
7
vendor/github.com/onsi/ginkgo/ginkgo/testrunner/build_args_old.go
generated
vendored
Normal file
7
vendor/github.com/onsi/ginkgo/ginkgo/testrunner/build_args_old.go
generated
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
// +build !go1.10
|
||||
|
||||
package testrunner
|
||||
|
||||
var (
|
||||
buildArgs = []string{"test", "-c", "-i"}
|
||||
)
|
||||
6
vendor/github.com/onsi/ginkgo/ginkgo/testrunner/test_runner.go
generated
vendored
6
vendor/github.com/onsi/ginkgo/ginkgo/testrunner/test_runner.go
generated
vendored
@@ -64,7 +64,9 @@ func (t *TestRunner) Compile() error {
|
||||
}
|
||||
|
||||
func (t *TestRunner) BuildArgs(path string) []string {
|
||||
args := []string{"test", "-c", "-i", "-o", path, t.Suite.Path}
|
||||
args := make([]string, len(buildArgs), len(buildArgs)+3)
|
||||
copy(args, buildArgs)
|
||||
args = append(args, "-o", path, t.Suite.Path)
|
||||
|
||||
if t.getCoverMode() != "" {
|
||||
args = append(args, "-cover", fmt.Sprintf("-covermode=%s", t.getCoverMode()))
|
||||
@@ -117,6 +119,8 @@ func (t *TestRunner) BuildArgs(path string) []string {
|
||||
"coverpkg",
|
||||
"tags",
|
||||
"gcflags",
|
||||
"vet",
|
||||
"mod",
|
||||
}
|
||||
|
||||
for _, opt := range stringOpts {
|
||||
|
||||
Reference in New Issue
Block a user