func TestDAGFactoryCreateDAGFromFile(t *testing.T) { _, err := dag.LoadFromFile("examples/wordcount/wordcount.dot") if err != nil { t.Error(err) return } //fmt.Println(d) }
func main() { config.InitFlags() config.Parse() loglevel := 0 if config.Verbose { loglevel = log.LOG_LEVEL_ALL } else { loglevel = log.LOG_LEVEL_TRACE | log.LOG_LEVEL_INFO | log.LOG_LEVEL_WARN | log.LOG_LEVEL_ERROR | log.LOG_LEVEL_FATAL } if config.LessLog { log.StdLogger = log.NewDefaultCleanLogger( os.Stdout, "hpipe", loglevel) } else { log.StdLogger = log.NewDefault( os.Stdout, "hpipe", loglevel) } d, err := dag.LoadFromFile(config.EntryFile) if err != nil { log.Fatal(err) os.Exit(1) } util.LogLines(config.LogoString(), nil) util.LogLines(d.String(), nil) s, err := newSched() if err != nil { log.Fatal(err) os.Exit(1) } if err := s.Run(d); err != nil { os.Exit(1) } }