Exemple #1
0
func runTestOnUpdates(queue chan messaging.Folders, executor contract.Executor, server contract.Server) {
	for update := range queue {
		log.Println("Received request from watcher to execute tests...")
		packages := extractPackages(update)
		output := executor.ExecuteTests(packages)
		root := extractRoot(update, packages)
		server.ReceiveUpdate(root, output)
	}
}
Exemple #2
0
func runTestOnUpdates(queue chan messaging.Folders, executor contract.Executor, server contract.Server) {
	for update := range queue {
		log.Println("Received request from watcher to execute tests...")
		root := ""
		packages := []*contract.Package{}
		for _, folder := range update {
			root = folder.Root
			packages = append(packages, contract.NewPackage(folder))
		}
		output := executor.ExecuteTests(packages)
		server.ReceiveUpdate(root, output)
	}
}