File tree Expand file tree Collapse file tree 5 files changed +17
-4
lines changed
Expand file tree Collapse file tree 5 files changed +17
-4
lines changed Original file line number Diff line number Diff line change 3737 RUSTFLAGS : " -C linker=clang -C link-arg=-fuse-ld=lld"
3838 FOREST_F3_SIDECAR_FFI_BUILD_OPT_OUT : 1
3939 FIL_PROOFS_PARAMETER_CACHE : /var/tmp/filecoin-proof-parameters
40+ RUST_LOG : warn
4041
4142jobs :
4243 codecov :
Original file line number Diff line number Diff line change 3434 CC : " sccache clang"
3535 CXX : " sccache clang++"
3636 FIL_PROOFS_PARAMETER_CACHE : /var/tmp/filecoin-proof-parameters
37+ RUST_LOG : warn
3738
3839jobs :
3940 tests-release :
Original file line number Diff line number Diff line change @@ -884,13 +884,18 @@ mod tests {
884884 use num_bigint:: BigInt ;
885885 use num_traits:: ToPrimitive ;
886886 use std:: sync:: Arc ;
887+ use tracing:: level_filters:: LevelFilter ;
888+ use tracing_subscriber:: EnvFilter ;
887889
888890 fn setup ( ) -> ( Arc < ChainStore < MemoryDB > > , Chain4U < Arc < MemoryDB > > ) {
889891 // Initialize test logger
890892 let _ = tracing_subscriber:: fmt ( )
893+ . without_time ( )
891894 . with_env_filter (
892- tracing_subscriber:: EnvFilter :: from_default_env ( )
893- . add_directive ( tracing:: Level :: DEBUG . into ( ) ) ,
895+ EnvFilter :: builder ( )
896+ . with_default_directive ( LevelFilter :: DEBUG . into ( ) )
897+ . from_env ( )
898+ . unwrap ( ) ,
894899 )
895900 . try_init ( ) ;
896901
Original file line number Diff line number Diff line change @@ -35,6 +35,7 @@ fn forest_rng_internal(mode: ForestRngMode) -> impl Rng + CryptoRng {
3535 const ENV : & str = FIXED_RNG_SEED_ENV ;
3636 if let Ok ( v) = std:: env:: var ( ENV ) {
3737 if let Ok ( seed) = v. parse ( ) {
38+ #[ cfg( not( test) ) ]
3839 tracing:: warn!( "[security] using test RNG with fixed seed {seed} set by {ENV}" ) ;
3940 return Either :: Left ( rand_chacha:: ChaChaRng :: seed_from_u64 ( seed) ) ;
4041 } else {
Original file line number Diff line number Diff line change @@ -45,13 +45,18 @@ use lints::{Lint, Violation};
4545use proc_macro2:: { LineColumn , Span } ;
4646use syn:: visit:: Visit ;
4747use tracing:: { debug, info, level_filters:: LevelFilter } ;
48- use tracing_subscriber:: util:: SubscriberInitExt as _;
48+ use tracing_subscriber:: { EnvFilter , util:: SubscriberInitExt as _} ;
4949
5050#[ test]
5151fn lint ( ) {
5252 let _guard = tracing_subscriber:: fmt ( )
5353 . without_time ( )
54- . with_max_level ( LevelFilter :: DEBUG )
54+ . with_env_filter (
55+ EnvFilter :: builder ( )
56+ . with_default_directive ( LevelFilter :: DEBUG . into ( ) )
57+ . from_env ( )
58+ . unwrap ( ) ,
59+ )
5560 . set_default ( ) ;
5661 LintRunner :: new ( )
5762 . run :: < lints:: NoTestsWithReturn > ( )
You can’t perform that action at this time.
0 commit comments