Skip to content

Commit 4c20f5c

Browse files
ColoCarletticlaude
andcommitted
fix: use CARGO_MANIFEST_DIR for test file paths
Relative paths don't work when tests run from a different working directory (e.g., on CI or remote servers). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 340e388 commit 4c20f5c

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

prover/src/tests/prove_elfs_tests.rs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1876,9 +1876,13 @@ fn test_verify_rejects_inflated_table_counts() {
18761876
#[ignore = "Requires ~64GB RAM: proves an empty Ethereum block (11M instructions)"]
18771877
fn test_prove_ethrex_empty_block() {
18781878
let _ = env_logger::builder().is_test(true).try_init();
1879-
let elf_bytes = std::fs::read("../executor/program_artifacts/rust/ethrex.elf")
1879+
let workspace_root = std::path::PathBuf::from(env!("CARGO_MANIFEST_DIR"))
1880+
.parent()
1881+
.expect("Failed to get workspace root")
1882+
.to_path_buf();
1883+
let elf_bytes = std::fs::read(workspace_root.join("executor/program_artifacts/rust/ethrex.elf"))
18801884
.expect("Failed to read ethrex ELF");
1881-
let input = std::fs::read("../executor/tests/ethrex_empty_block.bin")
1885+
let input = std::fs::read(workspace_root.join("executor/tests/ethrex_empty_block.bin"))
18821886
.expect("Failed to read empty block fixture");
18831887
let vm_proof = crate::prove_with_input(&elf_bytes, input).expect("Proving failed");
18841888
assert!(

0 commit comments

Comments
 (0)