Skip to content

Commit

Permalink
Disable log (#49)
Browse files Browse the repository at this point in the history
Add checking to generated binary
  • Loading branch information
XuJiandong authored Apr 8, 2024
1 parent 2a04f15 commit f7e6590
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
6 changes: 4 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,10 @@ CFLAGS := -g -fPIC -O3 -fno-builtin \
-nostdinc -nostdlib -nostartfiles -fvisibility=hidden -fdata-sections -ffunction-sections \
-I deps/secp256k1/src -I deps/secp256k1 -I deps/ckb-c-stdlib -I deps/ckb-c-stdlib/libc \
-I deps/ckb-c-stdlib/molecule -I c -I build -I deps/sparse-merkle-tree/c \
-Wall -Werror -Wno-nonnull -Wno-nonnull-compare -Wno-unused-function -Wno-array-bounds -Wno-stringop-overflow \
-DCKB_C_STDLIB_PRINTF -DCKB_C_STDLIB_PRINTF_BUFFER_SIZE=1024
-Wall -Werror -Wno-nonnull -Wno-nonnull-compare -Wno-unused-function -Wno-array-bounds -Wno-stringop-overflow

# to enable log
# -DCKB_C_STDLIB_PRINTF -DCKB_C_STDLIB_PRINTF_BUFFER_SIZE=1024

LDFLAGS := -nostdlib -nostartfiles -Wl,-static -Wl,--gc-sections

Expand Down
3 changes: 1 addition & 2 deletions tests/omni_lock_rust/tests/test_omni_lock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -683,7 +683,6 @@ fn test_solana_phantom_wallet() {
// this test can fail during development
// TODO: enable it when ready
#[test]
#[ignore]
fn test_binary_unchanged() {
let mut buf = [0u8; 8 * 1024];
// build hash
Expand All @@ -703,7 +702,7 @@ fn test_binary_unchanged() {
blake2b.finalize(&mut hash);

let actual_hash = faster_hex::hex_string(&hash);
assert_eq!("ffc1ed16066f76ac2b9e5634c482aa05e9b34860c53ae79615d2a65679dad06f", &actual_hash);
assert_eq!("3f303aa87238dbc34a81a1c42109e07aad9c8e4ab3e8741d87fffca43851b2d7", &actual_hash);
}

#[test]
Expand Down

0 comments on commit f7e6590

Please sign in to comment.