Skip to content

Commit

Permalink
Merge pull request #241 from near/stable_path_to_node
Browse files Browse the repository at this point in the history
Use stable path to node module
  • Loading branch information
aborg-dev authored Mar 5, 2024
2 parents ba69743 + 9147824 commit 3e35ac4
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion cranelift/filetests/src/zkasm_runner.rs
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,18 @@ pub fn run_zkasm_path(input_path: &Path) -> anyhow::Result<Vec<ExecutionResult>>
include_str!("../../zkasm_data/generated/helpers/2-exp.zkasm"),
)?;

// The node module necessary to execute zkAsm lives in `wasmtime/tests/zkasm/package.json`.
// We are trying to create a path to it that would work regardless of the current working
// directory that the caller is using.
let node_module_path = Path::new(env!("CARGO_MANIFEST_DIR"))
.join("../../tests/zkasm/")
.display()
.to_string();

let mut output_file = NamedTempFile::new()?;
let common_args = [
"--prefix",
"../../tests/zkasm",
&node_module_path,
"test",
input_path.to_str().unwrap(),
output_file.path().to_str().unwrap(),
Expand Down

0 comments on commit 3e35ac4

Please sign in to comment.