chiark / gitweb /
apitest: at-bundles: Use UsualCtx
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Mon, 17 May 2021 17:22:50 +0000 (18:22 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Mon, 17 May 2021 18:21:46 +0000 (19:21 +0100)
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
apitest/at-bundles.rs

index 516ab88bb7ece8fcda6faae8c199662cb7038e67..3fd377860ec5bc92d568f169b48ea927b7d23a06 100644 (file)
@@ -4,13 +4,7 @@
 
 use crate::*;
 
-type Setup = Rc<RefCell<SetupCore>>;
-
-#[allow(dead_code)]
-struct Ctx {
-  opts: Opts,
-  su_rc: Setup,
-}
+type Ctx = UsualCtx;
 
 impl Ctx {
 }
@@ -21,10 +15,5 @@ fn tests(_c: Ctx) {
 
 #[throws(Explode)]
 pub fn main() {
-  let (opts, _instance, su) = setup_core(
-    &[module_path!()],
-  )?;
-
-  let su_rc = Rc::new(RefCell::new(su));
-  tests(Ctx { opts, su_rc })?;
+  tests(Ctx::setup()?)?;
 }