pub mgmt_conn: RefCell<MgmtChannelForGame>,
server_child: Child,
pub wanted_tests: TrackWantedTests,
+ pub cln: cleanup_notify::Handle,
}
#[derive(Clone,Debug)]
use std::panic::catch_unwind;
use std::process::Command;
+ #[derive(Debug)]
pub struct Handle(RawFd);
#[throws(io::Error)]
#[throws(AE)]
pub fn setup_core<O>(module_paths: &[&str], early_args: EarlyArgPredicate) ->
- (O, cleanup_notify::Handle, Instance, SetupCore)
+ (O, Instance, SetupCore)
where O: StructOpt + AsRef<Opts>
{
let mut builder = env_logger::Builder::new();
let wanted_tests = opts.tests.track();
(caller_opts,
- cln,
Instance(
instance_name
),
SetupCore {
- ds,
+ ds, cln,
mgmt_conn: mgmt_conn.into(),
server_child,
wanted_tests,
#[throws(Explode)]
fn main() {
{
- let (opts, _cln, _instance, su) = setup_core(
+ let (opts, _instance, su) = setup_core(
&[module_path!()],
&mut |_|false
)?;
#[throws(AE)]
pub fn setup(exe_module_path: &str) -> (Setup, Instance) {
- let (opts, cln, instance, core) =
+ let (opts, instance, core) =
apitest::setup_core(
&[exe_module_path, "otter_webdriver_tests"],
&mut |s: &OsStr| s.to_str().unwrap().starts_with("--test=")
)?;
- prepare_xserver(&cln, &core.ds).did("setup X server")?;
+ prepare_xserver(&core.cln, &core.ds).did("setup X server")?;
let final_hook = FinalInfoCollection;
- prepare_geckodriver(&opts, &cln).did("setup webdriver server")?;
+ prepare_geckodriver(&opts, &core.cln).did("setup webdriver server")?;
let (driver, screenshot_count, windows_squirreled) =
prepare_thirtyfour(&core.ds).did("prepare web session")?;