Example #1
0
func runRun(cmd *cobra.Command, args []string) {
	options.Opts = options.TestOptions{
		EtcdRollingVersion:     EtcdRollingVersion,
		EtcdRollingVersion2:    EtcdRollingVersion2,
		EtcdRollingBin:         EtcdRollingBin,
		EtcdRollingBin2:        EtcdRollingBin2,
		EtcdRollingSkipVersion: EtcdRollingSkipVersion,
	}

	if len(args) > 1 {
		fmt.Fprintf(os.Stderr, "Extra arguements specified. Usage: 'kola run [glob pattern]'\n")
		os.Exit(2)
	}
	var pattern string
	if len(args) == 1 {
		pattern = args[0]
	} else {
		pattern = "*" // run all tests by default
	}

	err := kola.RunTests(pattern, kolaPlatform)
	if err != nil {
		fmt.Fprintf(os.Stderr, "%v\n", err)
		os.Exit(1)
	}
}
Example #2
0
func runRun(cmd *cobra.Command, args []string) {
	if len(args) > 1 {
		fmt.Fprintf(os.Stderr, "Extra arguements specified. Usage: 'kola run [glob pattern]'\n")
		os.Exit(2)
	}
	var pattern string
	if len(args) == 1 {
		pattern = args[0]
	} else {
		pattern = "*" // run all tests by default
	}

	err := kola.RunTests(pattern, kolaPlatform)
	if err != nil {
		fmt.Fprintf(os.Stderr, "%v\n", err)
		os.Exit(1)
	}
}