-
Notifications
You must be signed in to change notification settings - Fork 114
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove hard coded Wasm paths in abitest & hello_world #578
Conversation
@@ -440,7 +440,7 @@ fn test_say_hello() { | |||
simple_logger::init().unwrap(); | |||
|
|||
let configuration = oak_tests::test_configuration( | |||
&[(MODULE_CONFIG_NAME, WASM_PATH)], | |||
build_wasm().expect("failed to build wasm modules"), | |||
LOG_CONFIG_NAME, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you also update the text around l.469-470 which is out of sync?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
examples/abitest/tests/src/tests.rs
Outdated
const BACKEND_WASM_NAME: &str = "abitest_1_backend.wasm"; | ||
|
||
fn build_wasm() -> std::io::Result<Vec<(String, Vec<u8>)>> { | ||
let mut frontend = oak_tests::compile_rust_to_wasm(FRONTEND_MANIFEST)?; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe add an extra module_name
parameter to compile_rust_to_wasm
and do the full path creation inside it? (So this would be oak_tests::compile_rust_wasm(FRONTEND_MANIFEST, FRONTEND_WASM_NAME)
with no .push
ing needed)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
Removes hard coded Wasm paths in abitest & hello_world, and builds the Wasm modules during test invocation.
The Wasm files are outputted to a temporary directory and cargo doesn't seem to use artefacts from the host target dir so this does currently cause the tests to do a full rebuild of their Wasm files.
Checklist
cover any TODOs and/or unfinished work.
construction.
#541