aboutsummaryrefslogtreecommitdiff
path: root/vendor/github.com/onsi/ginkgo/config
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2021-02-02 08:48:52 -0500
committerGitHub <noreply@github.com>2021-02-02 08:48:52 -0500
commitd66a18cb11688060a3ef737dd05758398279f053 (patch)
tree8e1766e165c5c134d67ba3834e64ed8ee371e5fa /vendor/github.com/onsi/ginkgo/config
parent828279dac2d9d1a19ca2ed05e6ad09730179821a (diff)
parent323ab314ef2623caea7cf51783ec56653781f95d (diff)
downloadpodman-d66a18cb11688060a3ef737dd05758398279f053.tar.gz
podman-d66a18cb11688060a3ef737dd05758398279f053.tar.bz2
podman-d66a18cb11688060a3ef737dd05758398279f053.zip
Merge pull request #9195 from containers/dependabot/go_modules/github.com/onsi/ginkgo-1.15.0
Bump github.com/onsi/ginkgo from 1.14.2 to 1.15.0
Diffstat (limited to 'vendor/github.com/onsi/ginkgo/config')
-rw-r--r--vendor/github.com/onsi/ginkgo/config/config.go33
1 files changed, 24 insertions, 9 deletions
diff --git a/vendor/github.com/onsi/ginkgo/config/config.go b/vendor/github.com/onsi/ginkgo/config/config.go
index 3220c095c..8c177811e 100644
--- a/vendor/github.com/onsi/ginkgo/config/config.go
+++ b/vendor/github.com/onsi/ginkgo/config/config.go
@@ -20,14 +20,14 @@ import (
"fmt"
)
-const VERSION = "1.14.2"
+const VERSION = "1.15.0"
type GinkgoConfigType struct {
RandomSeed int64
RandomizeAllSpecs bool
RegexScansFilePath bool
- FocusString string
- SkipString string
+ FocusStrings []string
+ SkipStrings []string
SkipMeasurements bool
FailOnPending bool
FailFast bool
@@ -65,6 +65,11 @@ func processPrefix(prefix string) string {
return prefix
}
+type flagFunc func(string)
+
+func (f flagFunc) String() string { return "" }
+func (f flagFunc) Set(s string) error { f(s); return nil }
+
func Flags(flagSet *flag.FlagSet, prefix string, includeParallelFlags bool) {
prefix = processPrefix(prefix)
flagSet.Int64Var(&(GinkgoConfig.RandomSeed), prefix+"seed", time.Now().Unix(), "The seed used to randomize the spec suite.")
@@ -75,8 +80,8 @@ func Flags(flagSet *flag.FlagSet, prefix string, includeParallelFlags bool) {
flagSet.BoolVar(&(GinkgoConfig.DryRun), prefix+"dryRun", false, "If set, ginkgo will walk the test hierarchy without actually running anything. Best paired with -v.")
- flagSet.StringVar(&(GinkgoConfig.FocusString), prefix+"focus", "", "If set, ginkgo will only run specs that match this regular expression.")
- flagSet.StringVar(&(GinkgoConfig.SkipString), prefix+"skip", "", "If set, ginkgo will only run specs that do not match this regular expression.")
+ flagSet.Var(flagFunc(flagFocus), prefix+"focus", "If set, ginkgo will only run specs that match this regular expression. Can be specified multiple times, values are ORed.")
+ flagSet.Var(flagFunc(flagSkip), prefix+"skip", "If set, ginkgo will only run specs that do not match this regular expression. Can be specified multiple times, values are ORed.")
flagSet.BoolVar(&(GinkgoConfig.RegexScansFilePath), prefix+"regexScansFilePath", false, "If set, ginkgo regex matching also will look at the file path (code location).")
@@ -133,12 +138,12 @@ func BuildFlagArgs(prefix string, ginkgo GinkgoConfigType, reporter DefaultRepor
result = append(result, fmt.Sprintf("--%sdryRun", prefix))
}
- if ginkgo.FocusString != "" {
- result = append(result, fmt.Sprintf("--%sfocus=%s", prefix, ginkgo.FocusString))
+ for _, s := range ginkgo.FocusStrings {
+ result = append(result, fmt.Sprintf("--%sfocus=%s", prefix, s))
}
- if ginkgo.SkipString != "" {
- result = append(result, fmt.Sprintf("--%sskip=%s", prefix, ginkgo.SkipString))
+ for _, s := range ginkgo.SkipStrings {
+ result = append(result, fmt.Sprintf("--%sskip=%s", prefix, s))
}
if ginkgo.FlakeAttempts > 1 {
@@ -211,3 +216,13 @@ func BuildFlagArgs(prefix string, ginkgo GinkgoConfigType, reporter DefaultRepor
return result
}
+
+// flagFocus implements the -focus flag.
+func flagFocus(arg string) {
+ GinkgoConfig.FocusStrings = append(GinkgoConfig.FocusStrings, arg)
+}
+
+// flagSkip implements the -skip flag.
+func flagSkip(arg string) {
+ GinkgoConfig.SkipStrings = append(GinkgoConfig.SkipStrings, arg)
+}