}
pub use imports::*;
+pub use otter::prelude::*;
-pub use anyhow::{anyhow, ensure, Context};
-
-pub use arrayvec::ArrayVec;
-pub use boolinator::Boolinator;
-pub use fehler::{throw, throws};
-pub use if_chain::if_chain;
-pub use itertools::izip;
-pub use log::{debug, error, info, trace, warn};
-pub use log::{log, log_enabled};
-pub use nix::unistd::LinkatFlags;
pub use num_traits::NumCast;
-pub use num_derive::FromPrimitive;
-pub use parking_lot::{Mutex, MutexGuard};
-pub use regex::{Captures, Regex};
-pub use serde::{Serialize, Deserialize};
pub use serde_json::json;
pub use structopt::StructOpt;
-pub use strum::{EnumIter, EnumProperty, IntoEnumIterator, IntoStaticStr};
-pub use thiserror::Error;
-pub use void::Void;
-
-pub use std::env;
-pub use std::fmt::{self, Debug};
-pub use std::collections::hash_map::HashMap;
-pub use std::collections::btree_set::BTreeSet;
-pub use std::convert::{Infallible, TryInto};
-pub use std::fs;
-pub use std::io::{self, BufRead, BufReader, ErrorKind, Read, Write};
-pub use std::iter;
-pub use std::mem;
-pub use std::net::TcpStream;
-pub use std::ops::{Deref, DerefMut};
-pub use std::os::unix::net::UnixStream;
-pub use std::os::unix::process::CommandExt;
-pub use std::os::unix::fs::DirBuilderExt;
-pub use std::os::linux::fs::MetadataExt; // todo why linux for st_mode??
-pub use std::path;
-pub use std::process::{self, Command, Stdio};
-pub use std::sync::mpsc;
-pub use std::thread::{self, sleep};
-pub use std::time::{self, Duration};
-
-pub use otter_base::misc::default;
-
-pub use otter::ensure_eq;
-pub use otter::commands::{MgmtCommand, MgmtResponse};
-pub use otter::commands::{MgmtGameInstruction, MgmtGameResponse};
-pub use otter::commands::{MgmtGameUpdateMode};
-pub use otter::config::*;
-pub use otter::{deref_to_field, deref_to_field_mut};
-pub use otter::gamestate::{self, Generation, PieceId, PlayerId};
-pub use otter::global::InstanceName;
-pub use otter::mgmtchannel::MgmtChannel;
-pub use otter::slotmap_slot_idx::KeyDataExt;
-pub use otter::spec::{Coord, GameSpec, Pos, PosC, RawToken};
-pub use otter::toml_de;
-pub use otter::ui::{AbbrevPresentationLayout, PresentationLayout};
-pub use otter::ui::player_num_dasharray;
-pub use otter::updates::RawClientSequence;
-pub use otter::utils::*;
-
-pub const MS: time::Duration = time::Duration::from_millis(1);
-pub type AE = anyhow::Error;
// -------------------- private imports ----------
pub struct SetupCore {
pub ds: DirSubst,
pub mgmt_conn: MgmtChannel,
- pub server_child: process::Child,
+ pub server_child: Child,
pub wanted_tests: TrackWantedTests,
}
pub fn fork_something_which_prints(mut cmd: Command,
cln: &cleanup_notify::Handle,
what: &str)
- -> (String, process::Child)
+ -> (String, Child)
{
(||{
cmd.stdout(Stdio::piped());
#[throws(AE)]
pub fn prepare_gameserver(cln: &cleanup_notify::Handle, ds: &DirSubst)
- -> (MgmtChannel, process::Child) {
+ -> (MgmtChannel, Child) {
let subst = ds.also(&[
("command_socket", "command.socket"),
]);
mod scraper_ext {
use super::*;
use scraper::*;
- use scraper::html::*;
+ use scraper::html::{*, Html};
pub trait HtmlExt {
fn select<'a,'b>(&'a self, selector: &'b Selector) -> Select<'a, 'b>;
pub use std::mem;
pub use std::num::{NonZeroUsize, TryFromIntError, Wrapping};
pub use std::ops::{Deref, DerefMut, Index};
+pub use std::os::linux::fs::MetadataExt; // todo why linux for st_mode??
pub use std::os::unix;
pub use std::os::unix::ffi::OsStrExt;
pub use std::os::unix::io::IntoRawFd;
pub use std::os::unix::net::UnixStream;
pub use std::os::unix::process::CommandExt;
pub use std::path::PathBuf;
-pub use std::process::{exit, Command};
+pub use std::process::{exit, Child, Command, Stdio};
pub use std::str;
pub use std::str::FromStr;
pub use std::string::ParseError;
pub use std::sync::{Arc, Condvar, Mutex, MutexGuard};
pub use std::sync::{RwLock, RwLockReadGuard, RwLockWriteGuard};
+pub use std::sync::mpsc;
pub use std::thread::{self, sleep};
-pub use std::time::Duration;
-pub use std::time::Instant;
+pub use std::time::{self, Duration, Instant};
-pub use anyhow::{anyhow, Context};
+pub use anyhow::{anyhow, ensure, Context};
pub use arrayvec::ArrayVec;
pub use boolinator::Boolinator as _;
pub use delegate::delegate;
pub use lazy_static::lazy_static;
pub use log::{debug, error, info, trace, warn};
pub use log::{log, log_enabled};
-pub use nix::unistd::Uid;
+pub use nix::unistd::{self, Uid};
+pub use num_derive::FromPrimitive;
pub use num_traits::{Bounded, FromPrimitive, ToPrimitive};
pub use ordered_float::OrderedFloat;
pub use percent_encoding::percent_decode_str;
pub use serde_with::DeserializeFromStr;
pub use serde_with::SerializeDisplay;
pub use slotmap::{dense::DenseSlotMap, Key as _};
-pub use strum::EnumString;
+pub use strum::{EnumString, EnumIter, EnumProperty};
+pub use strum::{IntoEnumIterator, IntoStaticStr};
pub use thiserror::Error;
pub use url::Url;
pub use vecdeque_stableix::Deque as StableIndexVecDeque;
pub use base_misc::default;
pub use crate::{deref_to_field, deref_to_field_mut};
+pub use crate::ensure_eq;
pub use crate::from_instance_lock_error;
pub use crate::accounts::loaded_acl::{self, EffectiveACL, LoadedAcl, PermSet};
pub use crate::authproofs::{self, Authorisation, Unauthorised};
pub use crate::authproofs::AuthorisationSuperuser;
pub use crate::commands::{AccessTokenInfo, AccessTokenReport, MgmtError};
+pub use crate::commands::{MgmtCommand, MgmtResponse};
+pub use crate::commands::{MgmtGameInstruction, MgmtGameResponse};
+pub use crate::commands::{MgmtGameUpdateMode};
pub use crate::config::*;
pub use crate::debugreader::DebugReader;
pub use crate::error::*;
pub type SvgData = Vec<u8>;
pub type Colour = Html;
+pub const MS: time::Duration = time::Duration::from_millis(1);
+
// ---------- type abbreviations ----------
pub type AE = anyhow::Error;
}
let path = format!("{:03}{}.png", count, slug);
*count += 1;
- driver.screenshot(&path::PathBuf::from(&path))
+ driver.screenshot(&PathBuf::from(&path))
.with_context(|| path.clone())
.context("take screenshot")?;
debug!("screenshot {}", &path);
fn drop(&mut self) {
nix::unistd::linkat(None, "Xvfb_screen0",
None, "Xvfb_keep.xwd",
- LinkatFlags::NoSymlinkFollow)
+ unistd::LinkatFlags::NoSymlinkFollow)
.context("preserve Xvfb screen")
.just_warn();
}