Index: ognibuild/src/session/unshare.rs
===================================================================
--- ognibuild.orig/src/session/unshare.rs
+++ ognibuild/src/session/unshare.rs
@@ -472,242 +472,3 @@ impl Session for UnshareSession {
             .map_err(Error::IoError)
     }
 }
-
-#[cfg(test)]
-mod tests {
-    use super::*;
-
-    lazy_static::lazy_static! {
-        static ref TEST_SESSION: std::sync::Mutex<UnshareSession> = std::sync::Mutex::new(UnshareSession::bootstrap().unwrap());
-    }
-
-    fn test_session() -> Option<std::sync::MutexGuard<'static, UnshareSession>> {
-        // Don't run tests if we're in github actions
-        // TODO: check for ability to run unshare instead
-        if std::env::var("GITHUB_ACTIONS").is_ok() {
-            return None;
-        }
-        Some(TEST_SESSION.lock().unwrap())
-    }
-
-    #[test]
-    fn test_is_temporary() {
-        let session = if let Some(session) = test_session() {
-            session
-        } else {
-            return;
-        };
-        assert!(session.is_temporary());
-    }
-
-    #[test]
-    fn test_chdir() {
-        let mut session = if let Some(session) = test_session() {
-            session
-        } else {
-            return;
-        };
-        session.chdir(std::path::Path::new("/")).unwrap();
-    }
-
-    #[test]
-    fn test_check_output() {
-        let session = if let Some(session) = test_session() {
-            session
-        } else {
-            return;
-        };
-        let output = String::from_utf8(
-            session
-                .check_output(vec!["ls"], Some(std::path::Path::new("/")), None, None)
-                .unwrap(),
-        )
-        .unwrap();
-        let dirs = output.split_whitespace().collect::<Vec<&str>>();
-        assert!(dirs.contains(&"bin"));
-        assert!(dirs.contains(&"dev"));
-        assert!(dirs.contains(&"etc"));
-        assert!(dirs.contains(&"home"));
-        assert!(dirs.contains(&"lib"));
-        assert!(dirs.contains(&"usr"));
-        assert!(dirs.contains(&"proc"));
-
-        assert_eq!(
-            "root",
-            String::from_utf8(
-                session
-                    .check_output(vec!["whoami"], None, Some("root"), None)
-                    .unwrap()
-            )
-            .unwrap()
-            .trim_end()
-        );
-        assert_eq!(
-            // Get current process uid
-            String::from_utf8(
-                session
-                    .check_output(vec!["id", "-u"], None, None, None)
-                    .unwrap()
-            )
-            .unwrap()
-            .trim_end(),
-            String::from_utf8(
-                session
-                    .check_output(vec!["id", "-u"], None, None, None)
-                    .unwrap()
-            )
-            .unwrap()
-            .trim_end()
-        );
-
-        assert_eq!(
-            "nobody",
-            String::from_utf8(
-                session
-                    .check_output(vec!["whoami"], None, Some("nobody"), None)
-                    .unwrap()
-            )
-            .unwrap()
-            .trim_end()
-        );
-    }
-
-    #[test]
-    fn test_check_call() {
-        let session = if let Some(session) = test_session() {
-            session
-        } else {
-            return;
-        };
-        session
-            .check_call(vec!["true"], Some(std::path::Path::new("/")), None, None)
-            .unwrap();
-    }
-
-    #[test]
-    fn test_create_home() {
-        let session = if let Some(session) = test_session() {
-            session
-        } else {
-            return;
-        };
-        session.create_home().unwrap();
-    }
-
-    fn save_and_reuse(name: &str) {
-        let session = if let Some(session) = test_session() {
-            session
-        } else {
-            return;
-        };
-        let tempdir = tempfile::tempdir().unwrap();
-        let path = tempdir.path().join(name);
-        session.save_to_tarball(&path).unwrap();
-        std::mem::drop(session);
-        let session = UnshareSession::from_tarball(&path).unwrap();
-        assert!(session.exists(std::path::Path::new("/bin")));
-        // Verify that the session works
-        let output = String::from_utf8(
-            session
-                .check_output(vec!["ls"], Some(std::path::Path::new("/")), None, None)
-                .unwrap(),
-        )
-        .unwrap();
-        let dirs = output.split_whitespace().collect::<Vec<&str>>();
-        assert!(dirs.contains(&"bin"));
-        assert!(dirs.contains(&"dev"));
-        assert!(dirs.contains(&"etc"));
-        assert!(dirs.contains(&"home"));
-        assert!(dirs.contains(&"lib"));
-    }
-
-    #[test]
-    fn test_save_and_reuse() {
-        save_and_reuse("test.tar");
-    }
-
-    #[test]
-    fn test_save_and_reuse_gz() {
-        save_and_reuse("test.tar.gz");
-    }
-
-    #[test]
-    fn test_mkdir_rmdir() {
-        let session = if let Some(session) = test_session() {
-            session
-        } else {
-            return;
-        };
-        let path = std::path::Path::new("/tmp/test");
-        session.mkdir(path).unwrap();
-        assert!(session.exists(path));
-        session.rmtree(path).unwrap();
-        assert!(!session.exists(path));
-    }
-
-    #[test]
-    fn test_project_from_directory() {
-        let session = if let Some(session) = test_session() {
-            session
-        } else {
-            return;
-        };
-        let tempdir = tempfile::tempdir().unwrap();
-        std::fs::write(tempdir.path().join("test"), "test").unwrap();
-        let project = session
-            .project_from_directory(tempdir.path(), None)
-            .unwrap();
-        assert!(project.external_path().exists());
-        assert!(session.exists(project.internal_path()));
-        session.rmtree(project.internal_path()).unwrap();
-        assert!(!session.exists(project.internal_path()));
-        assert!(!project.external_path().exists());
-    }
-
-    #[test]
-    fn test_popen() {
-        let session = if let Some(session) = test_session() {
-            session
-        } else {
-            return;
-        };
-        let child = session.popen(
-            vec!["ls"],
-            Some(std::path::Path::new("/")),
-            None,
-            Some(std::process::Stdio::piped()),
-            Some(std::process::Stdio::piped()),
-            Some(std::process::Stdio::piped()),
-            None,
-        );
-        let output = String::from_utf8(child.wait_with_output().unwrap().stdout).unwrap();
-        let dirs = output.split_whitespace().collect::<Vec<&str>>();
-        assert!(dirs.contains(&"etc"));
-        assert!(dirs.contains(&"home"));
-        assert!(dirs.contains(&"lib"));
-        assert!(dirs.contains(&"usr"));
-        assert!(dirs.contains(&"proc"));
-    }
-
-    #[test]
-    fn test_external_path() {
-        let mut session = if let Some(session) = test_session() {
-            session
-        } else {
-            return;
-        };
-        // Test absolute path
-        let path = std::path::Path::new("/tmp/test");
-        assert_eq!(
-            session.external_path(path),
-            session.location().join("tmp/test")
-        );
-        // Test relative path
-        session.chdir(std::path::Path::new("/tmp")).unwrap();
-        let path = std::path::Path::new("test");
-        assert_eq!(
-            session.external_path(path),
-            session.location().join("tmp/test")
-        );
-    }
-}
