Skip to content

Commit

Permalink
forgot to commit and push test fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
iximeow committed Feb 28, 2020
1 parent b43b4bf commit 17bd739
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
4 changes: 2 additions & 2 deletions crates/test-programs/tests/wasm_tests/runtime.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,12 @@ pub fn instantiate(
PreopenType::OS => {
let preopen_dir = wasi_common::preopen_dir(workspace)
.context(format!("error while preopening {:?}", workspace))?;
builder = builder.preopened_dir(preopen_dir, ".");
builder.preopened_dir(preopen_dir, ".");
}
PreopenType::Virtual => {
// we can ignore the workspace path for virtual preopens because virtual preopens
// don't exist in the filesystem anyway - no name conflict concerns.
builder = builder.preopened_virt(VirtualDirEntry::empty_directory(), ".");
builder.preopened_virt(VirtualDirEntry::empty_directory(), ".");
}
}
}
Expand Down
6 changes: 5 additions & 1 deletion crates/wasi-common/src/ctx.rs
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,11 @@ impl WasiCtxBuilder {
}

/// Add a preopened virtual directory.
pub fn preopened_virt<P: AsRef<Path>>(mut self, dir: VirtualDirEntry, guest_path: P) -> Self {
pub fn preopened_virt<P: AsRef<Path>>(
&mut self,
dir: VirtualDirEntry,
guest_path: P,
) -> &mut Self {
fn populate_directory(virtentry: HashMap<String, VirtualDirEntry>, dir: &mut VirtualDir) {
for (path, entry) in virtentry.into_iter() {
match entry {
Expand Down

0 comments on commit 17bd739

Please sign in to comment.