At some point I guess we could make this concrete entirely but
this will do for now.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
// ==================== core entrypoint, for wdriver too ====================
#[throws(AE)]
-pub fn setup_core<O>(module_paths: &[&str], early_args: EarlyArgPredicate) ->
+pub fn setup_core<O>(module_paths: &[&str]) ->
(O, Instance, SetupCore)
where O: StructOpt + AsRef<Opts>
{
.to_owned();
if !opts.no_bwrap {
- reinvoke_via_bwrap(&opts, ¤t_exe, early_args)
+ reinvoke_via_bwrap(
+ &opts, ¤t_exe,
+ &mut |s: &OsStr| s.to_str().unwrap().starts_with("--test=")
+ )
.context("reinvoke via bwrap")?;
}
{
let (opts, _instance, su) = setup_core(
&[module_path!()],
- &mut |s: &OsStr| s.to_str().unwrap().starts_with("--test=")
)?;
let spec = su.ds.game_spec_data()?;
let mut mc = su.mgmt_conn();
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(&core.cln, &core.ds).did("setup X server")?;