test-programs: learn how to preopen a dir again

This commit is contained in:
Pat Hickey
2020-12-11 16:38:55 -08:00
parent 30d49d122c
commit 759455192b
4 changed files with 51 additions and 42 deletions

View File

@@ -144,7 +144,11 @@ mod wasi_tests {
let workspace = if no_preopens(testsuite, stemstr) {
"None"
} else {
"Some(std::path::Path::new(&bin_name))"
writeln!(
out,
" let workspace = utils::prepare_workspace(&bin_name)?;"
)?;
"Some(workspace.path())"
};
writeln!(
out,