コード例 #1
0
ファイル: execute.go プロジェクト: andrewmkrug/gauge
func ExecuteSpecs(inParallel bool, args []string) int {
	if checkUpdatesDuringExecution && config.CheckUpdates() {
		i := &install.UpdateFacade{}
		i.BufferUpdateDetails()
		defer i.PrintUpdateBuffer()
	}

	env.LoadEnv(false)
	specsToExecute, conceptsDictionary := parseSpecs(args)
	manifest, err := manifest.ProjectManifest()
	if err != nil {
		logger.Fatal(err.Error())
	}
	runner := startApi()
	errMap := validateSpecs(manifest, specsToExecute, runner, conceptsDictionary)
	pluginHandler := plugin.StartPlugins(manifest)
	parallelInfo := &parallelInfo{inParallel: inParallel, numberOfStreams: NumberOfExecutionStreams}
	if !parallelInfo.isValid() {
		os.Exit(1)
	}
	execution := newExecution(&executionInfo{manifest, specsToExecute, runner, pluginHandler, parallelInfo, reporter.Current(), errMap})
	result := execution.start()
	execution.finish()
	exitCode := printExecutionStatus(result, errMap)
	return exitCode
}
コード例 #2
0
ファイル: execute.go プロジェクト: ranjeet-floyd/gauge
func ExecuteSpecs(inParallel bool, args []string) {
	env.LoadEnv(false)
	conceptsDictionary, conceptParseResult := parser.CreateConceptsDictionary(false)
	parser.HandleParseResult(conceptParseResult)
	specsToExecute, specsSkipped := filter.GetSpecsToExecute(conceptsDictionary, args)
	if len(specsToExecute) == 0 {
		printExecutionStatus(nil, 0)
	}
	parallelInfo := &parallelInfo{inParallel: inParallel, numberOfStreams: NumberOfExecutionStreams}
	if !parallelInfo.isValid() {
		os.Exit(1)
	}
	manifest, err := manifest.ProjectManifest()
	if err != nil {
		execLogger.CriticalError(err)
	}
	runner := startApi()
	validateSpecs(manifest, specsToExecute, runner, conceptsDictionary)
	pluginHandler := plugin.StartPlugins(manifest)
	execution := newExecution(manifest, specsToExecute, runner, pluginHandler, parallelInfo, execLogger.Current())
	result := execution.start()
	execution.finish()
	exitCode := printExecutionStatus(result, specsSkipped)
	os.Exit(exitCode)
}
コード例 #3
0
ファイル: execute.go プロジェクト: krwhitney/gauge
func ExecuteSpecs(inParallel bool, args []string) {
	env.LoadEnv(false)
	specsToExecute, conceptsDictionary := parseSpecs(args)
	manifest, err := manifest.ProjectManifest()
	if err != nil {
		logger.Log.Critical(err.Error())
	}
	runner := startApi()
	errMap := validateSpecs(manifest, specsToExecute, runner, conceptsDictionary)
	pluginHandler := plugin.StartPlugins(manifest)
	parallelInfo := &parallelInfo{inParallel: inParallel, numberOfStreams: NumberOfExecutionStreams}
	if !parallelInfo.isValid() {
		os.Exit(1)
	}
	execution := newExecution(&executionInfo{manifest, specsToExecute, runner, pluginHandler, parallelInfo, &logger.Log, errMap})
	result := execution.start()
	execution.finish()
	exitCode := printExecutionStatus(result, errMap)
	os.Exit(exitCode)
}
コード例 #4
0
ファイル: execute.go プロジェクト: universsky/gauge
func ExecuteSpecs(inParallel bool, args []string) {
	env.LoadEnv(false)
	specsToExecute, conceptsDictionary := parseSpecs(args)
	manifest, err := manifest.ProjectManifest()
	if err != nil {
		logger.Log.Critical(err.Error())
	}
	runner := startApi()
	errMap := validateSpecs(manifest, specsToExecute, runner, conceptsDictionary)
	pluginHandler := plugin.StartPlugins(manifest)
	parallelInfo := &parallelInfo{inParallel: inParallel, numberOfStreams: NumberOfExecutionStreams}
	if !parallelInfo.isValid() {
		os.Exit(1)
	}
	execution := newExecution(&executionInfo{manifest, specsToExecute, runner, pluginHandler, parallelInfo, &logger.Log, errMap})
	result := execution.start()
	// TODO: Remove this logger line below when plugins call tell the difference between their status messages and user-generated sysouts
	logger.Log.Debug("\n")
	execution.finish()
	exitCode := printExecutionStatus(result, errMap)
	os.Exit(exitCode)
}
コード例 #5
0
ファイル: simpleExecution.go プロジェクト: mattdotmatt/gauge
func (e *simpleExecution) start() {
	e.startTime = time.Now()
	e.pluginHandler = plugin.StartPlugins(e.manifest)
}
コード例 #6
0
ファイル: parallelExecution.go プロジェクト: 0-T-0/gauge
func (e *parallelExecution) start() {
	e.pluginHandler = plugin.StartPlugins(e.manifest)
	e.startTime = time.Now()
}