mirror of
https://github.com/zed-industries/zed.git
synced 2024-10-28 01:07:09 +00:00
Enable logging automatically when passing a SEED env variable
This commit is contained in:
parent
2c72f9c14f
commit
06858c023c
1 changed files with 2 additions and 4 deletions
|
@ -1194,10 +1194,6 @@ mod tests {
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn test_random() {
|
fn test_random() {
|
||||||
if let Ok(true) = env::var("LOG").map(|l| l.parse().unwrap()) {
|
|
||||||
SimpleLogger::init(LevelFilter::Info, Default::default()).unwrap();
|
|
||||||
}
|
|
||||||
|
|
||||||
let iterations = env::var("ITERATIONS")
|
let iterations = env::var("ITERATIONS")
|
||||||
.map(|i| i.parse().unwrap())
|
.map(|i| i.parse().unwrap())
|
||||||
.unwrap_or(100);
|
.unwrap_or(100);
|
||||||
|
@ -1208,6 +1204,8 @@ mod tests {
|
||||||
.map(|o| o.parse().unwrap())
|
.map(|o| o.parse().unwrap())
|
||||||
.unwrap_or(20);
|
.unwrap_or(20);
|
||||||
let seeds = if let Ok(seed) = env::var("SEED").map(|s| s.parse().unwrap()) {
|
let seeds = if let Ok(seed) = env::var("SEED").map(|s| s.parse().unwrap()) {
|
||||||
|
// Init logging so that we can debug the operations for this seed.
|
||||||
|
SimpleLogger::init(LevelFilter::Info, Default::default()).unwrap();
|
||||||
seed..seed + 1
|
seed..seed + 1
|
||||||
} else {
|
} else {
|
||||||
0..iterations
|
0..iterations
|
||||||
|
|
Loading…
Reference in a new issue