示例#1
0
func (self *Watcher) includeFolders(path string, info os.FileInfo, err error) error {
	if info.IsDir() {
		log.Println("Including:", path)
		self.watched[path] = contract.NewPackage(path)
	}
	return nil
}
示例#2
0
func extractPackages(folderList messaging.Folders) []*contract.Package {
	packageList := []*contract.Package{}
	for _, folder := range folderList {
		hasImportCycle := testFilesImportTheirOwnPackage(folder.Path)
		packageList = append(packageList, contract.NewPackage(folder, hasImportCycle))
	}
	return packageList
}
示例#3
0
文件: goconvey.go 项目: 40a/ejson
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)
	}
}
示例#4
0
func (self *Watcher) Creation(folder string) {
	log.Println("Detected creation of:", folder)
	self.watched[folder] = contract.NewPackage(folder)
}