test_gen: create a debug flag to print wasm interpreter log

This commit is contained in:
Brian Carroll 2022-12-12 08:51:08 +00:00
parent 6cc270241e
commit b80278fe48
No known key found for this signature in database
GPG key ID: 5C7B2EC4101703C0
2 changed files with 5 additions and 2 deletions

View file

@ -239,7 +239,7 @@ where
let dispatcher = TestDispatcher {
wasi: wasi::WasiDispatcher { args: &[] },
};
let is_debug_mode = false;
let is_debug_mode = roc_debug_flags::dbg_set!(roc_debug_flags::ROC_LOG_WASM_INTERP);
let mut inst = Instance::for_module(&arena, &module, dispatcher, is_debug_mode)?;
let opt_value = inst.call_export(module, test_wrapper_name, [])?;
let addr_value = opt_value.ok_or("No return address from Wasm test")?;
@ -268,7 +268,7 @@ where
let dispatcher = TestDispatcher {
wasi: wasi::WasiDispatcher { args: &[] },
};
let is_debug_mode = false;
let is_debug_mode = roc_debug_flags::dbg_set!(roc_debug_flags::ROC_LOG_WASM_INTERP);
let mut inst = Instance::for_module(&arena, &module, dispatcher, is_debug_mode)?;
// Allocate a vector in the test host that refcounts will be copied into