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 of f3a992aa and 369064c6 (minus
reporting, which can be handled later when we make TAP, etc, better).
This commit is contained in:
Zach Loafman
2015-01-19 14:50:15 -08:00
parent eeb712d163
commit 868d2c4336
2 changed files with 60 additions and 24 deletions

View File

@@ -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)
}