pub fn shared_env_variables(&self) -> Result<HashMap<&'static OsStr, OsString>, Error> {
        let synapse_root = self.synapse_root();
        let script_tmpdir = synapse_root.join("scripts");
        std::fs::create_dir_all(&script_tmpdir)
            .with_context(|| format!("Could not create directory {:#?}", script_tmpdir,))?;
        let curdir = std::env::current_dir()?;
        let env: HashMap<&'static OsStr, OsString> = std::iter::IntoIterator::into_iter([
            (
                MX_TEST_SYNAPSE_DIR.as_os_str(),
                synapse_root.as_os_str().into(),
            ),
            (
                MX_TEST_SCRIPT_TMPDIR.as_os_str(),
                script_tmpdir.as_os_str().into(),
            ),
            (MX_TEST_CWD.as_os_str(), curdir.as_os_str().into()),
            (MX_TEST_NETWORK_NAME.as_os_str(), self.network().into()),
            (
                MX_TEST_SETUP_CONTAINER_NAME.as_os_str(),
                self.setup_container_name().into(),
            ),
            (
                MX_TEST_UP_RUN_DOWN_CONTAINER_NAME.as_os_str(),
                self.run_container_name().into(),
            ),
        ])
        .chain(
            if self.workers.enabled {
                Some((MX_TEST_WORKERS_ENABLED.as_os_str(), "true".into()))
            } else {
                None
            }
            .into_iter(),
        )
        .collect();
        Ok(env)
    }
/// Create a map containing the environment variables that are common
/// to all scripts.
///
/// Callers may add additional variables that are specific to a given
/// script step.
Create a map containing the environment variables that are common
to all scripts.

Callers may add additional variables that are specific to a given
script step.
Create a map containing the environment variables that are common to all scripts . Callers may add additional variables that are specific to a given script step .
pub fn shared_env_variables(&self) -> Result<HashMap<&'static OsStr, OsString>, Error> {
        let synapse_root = self.synapse_root();
        let script_tmpdir = synapse_root.join("scripts");
        std::fs::create_dir_all(&script_tmpdir)
            .with_context(|| format!("Could not create directory {:#?}", script_tmpdir,))?;
        let curdir = std::env::current_dir()?;
        let env: HashMap<&'static OsStr, OsString> = std::iter::IntoIterator::into_iter([
            (
                MX_TEST_SYNAPSE_DIR.as_os_str(),
                synapse_root.as_os_str().into(),
            ),
            (
                MX_TEST_SCRIPT_TMPDIR.as_os_str(),
                script_tmpdir.as_os_str().into(),
            ),
            (MX_TEST_CWD.as_os_str(), curdir.as_os_str().into()),
            (MX_TEST_NETWORK_NAME.as_os_str(), self.network().into()),
            (
                MX_TEST_SETUP_CONTAINER_NAME.as_os_str(),
                self.setup_container_name().into(),
            ),
            (
                MX_TEST_UP_RUN_DOWN_CONTAINER_NAME.as_os_str(),
                self.run_container_name().into(),
            ),
        ])
        .chain(
            if self.workers.enabled {
                Some((MX_TEST_WORKERS_ENABLED.as_os_str(), "true".into()))
            } else {
                None
            }
            .into_iter(),
        )
        .collect();
        Ok(env)
    }
pub fn shared_env_variables ( & self ) -> Result < HashMap < & ' static OsStr , OsString > , Error > { let synapse_root = self . synapse_root ( ) ; let script_tmpdir = synapse_root . join ( " " ) ; std :: fs :: create_dir_all ( & script_tmpdir ) . with_context ( | | format ! ( " " script_tmpdir ) ) ? ; let curdir = std :: env :: current_dir ( ) ? ; let env : HashMap < & ' static OsStr , OsString > = std :: iter :: IntoIterator :: into_iter ( [ ( MX_TEST_SYNAPSE_DIR . as_os_str ( ) , synapse_root . as_os_str ( ) . into ( ) , ) , ( MX_TEST_SCRIPT_TMPDIR . as_os_str ( ) , script_tmpdir . as_os_str ( ) . into ( ) , ) , ( MX_TEST_CWD . as_os_str ( ) , curdir . as_os_str ( ) . into ( ) ) , ( MX_TEST_NETWORK_NAME . as_os_str ( ) , self . network ( ) . into ( ) ) , ( MX_TEST_SETUP_CONTAINER_NAME . as_os_str ( ) , self . setup_container_name ( ) . into ( ) , ) , ( MX_TEST_UP_RUN_DOWN_CONTAINER_NAME . as_os_str ( ) , self . run_container_name ( ) . into ( ) , ) , ] ) . chain ( if self . workers . enabled { Some ( ( MX_TEST_WORKERS_ENABLED . as_os_str ( ) , " " . into ( ) ) ) } else { None } . into_iter ( ) , ) . collect ( ) ; Ok ( env ) }
Create a map containing the environment variables that are common
to all scripts.
Create a map containing the environment variables that are common to all scripts .
&self
&self