mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-16 06:32:32 +00:00
cmd/e2e: Port --orderseed and --times to cmd/e2e from hack/e2e
* Add --orderseed, shuffle order every time, report order for repeatability * Add --times, acts like a multi-deck shoe * Remove fixed numbering in TAP output (this is actually not needed; TAP output is just done by outputting what assertion count you're on.) This is essentially just a port off3a992aa
and369064c6
(minus reporting, which can be handled later when we make TAP, etc, better).
This commit is contained in:
@@ -32,6 +32,8 @@ var (
|
||||
host = flag.String("host", "", "The host to connect to")
|
||||
repoRoot = flag.String("repo_root", "./", "Root directory of kubernetes repository, for finding test files. Default assumes working directory is repository root")
|
||||
provider = flag.String("provider", "", "The name of the Kubernetes provider")
|
||||
orderseed = flag.Int64("orderseed", 0, "If non-zero, seed of random test shuffle order. (Otherwise random.)")
|
||||
times = flag.Int("times", 1, "Number of times each test is eligible to be run. Individual order is determined by shuffling --times instances of each test using --orderseed (like a multi-deck shoe of cards).")
|
||||
testList util.StringList
|
||||
)
|
||||
|
||||
@@ -46,5 +48,9 @@ func main() {
|
||||
glog.Error("e2e needs the have the --provider flag set")
|
||||
os.Exit(1)
|
||||
}
|
||||
e2e.RunE2ETests(*authConfig, *certDir, *host, *repoRoot, *provider, testList)
|
||||
if *times <= 0 {
|
||||
glog.Error("Invalid --times (negative or no testing requested)!")
|
||||
os.Exit(1)
|
||||
}
|
||||
e2e.RunE2ETests(*authConfig, *certDir, *host, *repoRoot, *provider, *orderseed, *times, testList)
|
||||
}
|
||||
|
Reference in New Issue
Block a user