tests: macos-specific behavior

This commit is contained in:
Pat Hickey
2021-02-01 18:30:58 -08:00
parent d83dba47a3
commit c77a11bd5c
4 changed files with 26 additions and 2 deletions

View File

@@ -37,10 +37,16 @@ pub fn instantiate(data: &[u8], bin_name: &str, workspace: Option<&Path>) -> any
.env("NO_RENAME_DIR_TO_EMPTY_DIR", "1")?
.env("NO_DANGLING_DIRECTORY", "1")?;
}
#[cfg(unix)]
#[cfg(all(unix, not(target_os = "macos")))]
{
builder = builder.env("ERRNO_MODE_UNIX", "1")?;
}
#[cfg(target_os = "macos")]
{
builder = builder
.env("ERRNO_MODE_MACOS", "1")?
.env("NO_FD_ALLOCATE", "1")?;
}
// cap-std-sync does not yet support the sync family of fdflags
builder = builder.env("NO_FDFLAGS_SYNC_SUPPORT", "1")?;