2018-02-07 19:02:18 +01:00
|
|
|
package run
|
|
|
|
|
|
|
|
import (
|
|
|
|
"github.com/alecthomas/kingpin"
|
2018-02-12 16:45:13 +01:00
|
|
|
"github.com/apex/log"
|
2018-02-07 19:02:18 +01:00
|
|
|
"github.com/openobservatory/gooni/internal/cli/root"
|
|
|
|
"github.com/openobservatory/gooni/internal/util"
|
|
|
|
)
|
|
|
|
|
|
|
|
func init() {
|
|
|
|
cmd := root.Command("run", "Run a test group or OONI Run link")
|
|
|
|
|
|
|
|
nettestGroup := cmd.Arg("name", "the nettest group to run").Required().String()
|
|
|
|
|
|
|
|
cmd.Action(func(_ *kingpin.ParseContext) error {
|
2018-02-12 16:45:13 +01:00
|
|
|
util.Log("Starting %s", *nettestGroup)
|
|
|
|
config, ooni, err := root.Init()
|
|
|
|
if err != nil {
|
|
|
|
log.Errorf("%s", err)
|
|
|
|
return err
|
|
|
|
}
|
|
|
|
log.Infof("%s", config)
|
|
|
|
log.Infof("%s", ooni)
|
2018-02-07 19:02:18 +01:00
|
|
|
return nil
|
|
|
|
})
|
|
|
|
}
|