func main() { flag.Parse() if err := writeFlagsToConfig(); err != nil { glog.Fatalf("Problem with configuration: %v", err) } if !*skipGeneration { glog.Infof("Starting generator with configuration %#v", config.Generator) //TODO(kjlubick): Start AFL-fuzz } if err := setupOAuth(); err != nil { glog.Fatalf("Problem with OAuth: %s", err) } glog.Infof("Starting aggregator with configuration %#v", config.Aggregator) glog.Fatal(aggregator.StartBinaryAggregator(storageService)) }
func main() { defer common.LogPanic() // Calls flag.Parse() common.InitWithMetrics("fuzzer-be", graphiteServer) if err := writeFlagsToConfig(); err != nil { glog.Fatalf("Problem with configuration: %v", err) } if err := setupOAuth(); err != nil { glog.Fatalf("Problem with OAuth: %s", err) } if err := fcommon.DownloadSkiaVersionForFuzzing(storageClient, config.Generator.SkiaRoot, &config.Generator); err != nil { glog.Fatalf("Problem downloading Skia: %s", err) } if err := generator.DownloadBinarySeedFiles(storageClient); err != nil { glog.Fatalf("Problem downloading binary seed files: %s", err) } glog.Infof("Starting generator with configuration %#v", config.Generator) if err := generator.StartBinaryGenerator(); err != nil { glog.Fatalf("Problem starting binary generator: %s", err) } glog.Infof("Starting aggregator with configuration %#v", config.Aggregator) agg, err := aggregator.StartBinaryAggregator(storageClient) if err != nil { glog.Fatalf("Could not start aggregator: %s", err) } glog.Info("Starting version watcher") updater := generator.NewVersionUpdater(storageClient, agg) watcher := fcommon.NewVersionWatcher(storageClient, config.Generator.VersionCheckPeriod, updater.UpdateToNewSkiaVersion, nil) watcher.Start() err = <-watcher.Status glog.Fatal(err) }