コード例 #1
0
ファイル: goconvey.go プロジェクト: FihlaTV/bridge-server
func main() {
	flag.Parse()
	log.Printf(initialConfiguration, host, port, nap, cover)

	working := getWorkDir()
	cover = coverageEnabled(cover, reports)
	shell := system.NewShell(gobin, reports, cover, timeout)

	watcherInput := make(chan messaging.WatcherCommand)
	watcherOutput := make(chan messaging.Folders)
	excludedDirItems := strings.Split(excludedDirs, `,`)
	watcher := watch.NewWatcher(working, depth, nap, watcherInput, watcherOutput, watchedSuffixes, excludedDirItems)

	parser := parser.NewParser(parser.ParsePackageResults)
	tester := executor.NewConcurrentTester(shell)
	tester.SetBatchSize(packages)

	longpollChan := make(chan chan string)
	executor := executor.NewExecutor(tester, parser, longpollChan)
	server := api.NewHTTPServer(working, watcherInput, executor, longpollChan)
	go runTestOnUpdates(watcherOutput, executor, server)
	go watcher.Listen()
	go launchBrowser(host, port)
	serveHTTP(server)
}
コード例 #2
0
ファイル: goconvey.go プロジェクト: nangong92t/go_src
func main() {
	flag.Parse()
	log.Printf(initialConfiguration, host, port, nap, cover)

	working, err := os.Getwd()
	if err != nil {
		log.Fatal(err)
	}

	cover = coverageEnabled(cover, reports)
	shell := system.NewShell(gobin, reports, cover, timeout)

	watcherInput := make(chan messaging.WatcherCommand)
	watcherOutput := make(chan messaging.Folders)
	watcher := watch.NewWatcher(working, depth, nap, watcherInput, watcherOutput, watchedSuffixes)

	parser := parser.NewParser(parser.ParsePackageResults)
	tester := executor.NewConcurrentTester(shell)
	tester.SetBatchSize(packages)

	longpollChan := make(chan chan string)
	executor := executor.NewExecutor(tester, parser, longpollChan)
	server := api.NewHTTPServer(working, watcherInput, executor, longpollChan)

	go runTestOnUpdates(watcherOutput, executor, server)
	go watcher.Listen()
	serveHTTP(server)
}
コード例 #3
0
ファイル: goconvey.go プロジェクト: rubycut/goconvey
func wireup() (*contract.Monitor, contract.Server) {
	log.Println("Constructing components...")
	working, err := os.Getwd()
	if err != nil {
		panic(err)
	}

	fs := system.NewFileSystem()
	shell := system.NewShell(gobin)

	watcher := watch.NewWatcher(fs, shell)
	watcher.Adjust(working)

	parser := parse.NewParser(parse.ParsePackageResults)
	tester := exec.NewConcurrentTester(shell)
	tester.SetBatchSize(packages)

	statusNotif := make(chan bool, 1)
	executor := exec.NewExecutor(tester, parser, statusNotif)
	server := api.NewHTTPServer(watcher, executor, statusNotif)
	scanner := watch.NewScanner(fs, watcher)
	monitor := contract.NewMonitor(scanner, watcher, executor, server, sleeper)

	return monitor, server
}
コード例 #4
0
ファイル: goconvey.go プロジェクト: himanshugpt/evergreen
func wireup() (*contract.Monitor, contract.Server) {
	log.Println("Constructing components...")
	working, err := os.Getwd()
	if err != nil {
		log.Fatal(err)
	}

	shellExecutor := system.NewCommandExecutor()
	cover = coverageEnabled(cover, reports, shellExecutor)

	depthLimit := system.NewDepthLimit(system.NewFileSystem(), depth)
	shell := system.NewShell(shellExecutor, gobin, short, cover, reports)

	watcher := watch.NewWatcher(depthLimit, shell)
	watcher.Adjust(working)

	parser := parser.NewParser(parser.ParsePackageResults)
	tester := executor.NewConcurrentTester(shell)
	tester.SetBatchSize(packages)

	longpollChan, pauseUpdate := make(chan chan string), make(chan bool, 1)
	executor := executor.NewExecutor(tester, parser, longpollChan)
	server := api.NewHTTPServer(watcher, executor, longpollChan, pauseUpdate)
	scanner := watch.NewScanner(depthLimit, watcher)
	monitor := contract.NewMonitor(scanner, watcher, executor, server, pauseUpdate, sleeper)

	return monitor, server
}