projects
/
rust-lightning
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7e94d3a
)
Avoid writing to stdout during fuzz tests
2018-12-fuzz-fix-no-witness
author
Matt Corallo
<git@bluematt.me>
Mon, 3 Dec 2018 18:58:11 +0000
(13:58 -0500)
committer
Matt Corallo
<git@bluematt.me>
Mon, 3 Dec 2018 18:58:50 +0000
(13:58 -0500)
fuzz/fuzz_targets/utils/test_logger.rs
patch
|
blob
|
history
diff --git
a/fuzz/fuzz_targets/utils/test_logger.rs
b/fuzz/fuzz_targets/utils/test_logger.rs
index 2ef1196b586af79c82cde6b787098302997de38e..f828d0638f17726690c2c9b83807866c634287bd 100644
(file)
--- a/
fuzz/fuzz_targets/utils/test_logger.rs
+++ b/
fuzz/fuzz_targets/utils/test_logger.rs
@@
-4,7
+4,9
@@
pub struct TestLogger {}
impl Logger for TestLogger {
fn log(&self, record: &Record) {
- #[cfg(
any(test, not(feature = "fuzztarget"))
)]
+ #[cfg(
test
)]
println!("{:<5} [{} : {}, {}] {}", record.level.to_string(), record.module_path, record.file, record.line, record.args);
+ #[cfg(not(test))]
+ let _ = format!("{}", record.args);
}
}