Make it possible to disable uploading of results

This commit is contained in:
Arturo Filastò
2018-09-17 11:51:54 +02:00
parent 867204adfb
commit 5cae6b0b83
2 changed files with 7 additions and 1 deletions
+6
View File
@@ -26,6 +26,8 @@ func init() {
fmt.Sprintf("the nettest group to run. Supported tests are: %s",
strings.Join(nettestGroupNames, ", "))).Required().String()
noCollector := cmd.Flag("no-collector", "Disable uploading measurements to a collector").Bool()
cmd.Action(func(_ *kingpin.ParseContext) error {
log.Infof("Starting %s", *nettestGroup)
ctx, err := root.Init()
@@ -39,6 +41,10 @@ func init() {
return err
}
if *noCollector == true {
ctx.Config.Sharing.UploadResults = false
}
group, ok := groups.NettestGroups[*nettestGroup]
if !ok {
log.Errorf("No test group named %s", *nettestGroup)