Skip to content

Commit

Permalink
Support Debug contract with native
Browse files Browse the repository at this point in the history
  • Loading branch information
joii2020 committed Jul 15, 2024
1 parent c8d11b6 commit 7039ee9
Show file tree
Hide file tree
Showing 12 changed files with 1,428 additions and 3 deletions.
12 changes: 12 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions crates/tests/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ edition = "2021"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[features]
simulator = [ "ckb-testtool/simulator" ]

[dependencies]
anyhow = "1.0"
ckb-testtool = { path = "../testtool" }
Expand Down
8 changes: 7 additions & 1 deletion crates/tests/src/testtool.rs
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ fn test_load_header() {
.build(),
CellOutput::new_builder()
.capacity(500u64.pack())
.lock(lock_script)
.lock(lock_script.clone())
.build(),
];

Expand Down Expand Up @@ -214,6 +214,12 @@ fn test_load_header() {
.build();
let tx = context.complete_tx(tx);

#[cfg(feature = "simulator")]
let context = context.set_simulator(
lock_script.code_hash(),
"crates/tests/test-contract/build/debug/libtest_contract_dbg.so",
);

// run
context
.verify_tx(&tx, MAX_CYCLES)
Expand Down
Loading

0 comments on commit 7039ee9

Please sign in to comment.