feat(ooniprobe): add vanilla_tor to experimental (#745)
While there make vanilla_tor only run in unattended mode. While there also make torsf unattended-mode only. See https://github.com/ooni/probe/issues/2101 See https://github.com/ooni/probe/issues/2057
This commit is contained in:
parent
733ce44292
commit
f626a015c9
|
@ -57,6 +57,7 @@ var All = map[string]Group{
|
||||||
DNSCheck{},
|
DNSCheck{},
|
||||||
STUNReachability{},
|
STUNReachability{},
|
||||||
TorSf{},
|
TorSf{},
|
||||||
|
VanillaTor{},
|
||||||
},
|
},
|
||||||
UnattendedOK: true,
|
UnattendedOK: true,
|
||||||
},
|
},
|
||||||
|
|
|
@ -103,6 +103,12 @@ func RunGroup(config RunGroupConfig) error {
|
||||||
log.Debugf("context is terminated, stopping group.Nettests early")
|
log.Debugf("context is terminated, stopping group.Nettests early")
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
if config.RunType != model.RunTypeTimed {
|
||||||
|
if _, background := nt.(onlyBackground); background {
|
||||||
|
log.Debug("we only run this nettest in background mode")
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
}
|
||||||
log.Debugf("Running test %T", nt)
|
log.Debugf("Running test %T", nt)
|
||||||
ctl := NewController(nt, config.Probe, result, sess)
|
ctl := NewController(nt, config.Probe, result, sess)
|
||||||
ctl.InputFiles = config.InputFiles
|
ctl.InputFiles = config.InputFiles
|
||||||
|
@ -131,3 +137,15 @@ func RunGroup(config RunGroupConfig) error {
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// onlyBackground is the interface implements by nettests that we don't
|
||||||
|
// want to run in manual mode because they take too much runtime
|
||||||
|
//
|
||||||
|
// See:
|
||||||
|
//
|
||||||
|
// - https://github.com/ooni/probe/issues/2101
|
||||||
|
//
|
||||||
|
// - https://github.com/ooni/probe/issues/2057
|
||||||
|
type onlyBackground interface {
|
||||||
|
onlyBackground()
|
||||||
|
}
|
||||||
|
|
|
@ -12,3 +12,5 @@ func (h TorSf) Run(ctl *Controller) error {
|
||||||
}
|
}
|
||||||
return ctl.Run(builder, []string{""})
|
return ctl.Run(builder, []string{""})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (h TorSf) onlyBackground() {}
|
||||||
|
|
16
cmd/ooniprobe/internal/nettests/vanillator.go
Normal file
16
cmd/ooniprobe/internal/nettests/vanillator.go
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
package nettests
|
||||||
|
|
||||||
|
// VanillaTor test implementation
|
||||||
|
type VanillaTor struct {
|
||||||
|
}
|
||||||
|
|
||||||
|
// Run starts the test
|
||||||
|
func (h VanillaTor) Run(ctl *Controller) error {
|
||||||
|
builder, err := ctl.Session.NewExperimentBuilder("vanilla_tor")
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
return ctl.Run(builder, []string{""})
|
||||||
|
}
|
||||||
|
|
||||||
|
func (h VanillaTor) onlyBackground() {}
|
Loading…
Reference in New Issue
Block a user