From 38a92d89de625c9926feb47cc42cfc15281923c8 Mon Sep 17 00:00:00 2001 From: Nick Fitzgerald Date: Thu, 21 May 2020 13:24:24 -0700 Subject: [PATCH] Initialize `env_logger` for our `*.wast` tests --- Cargo.lock | 1 + Cargo.toml | 1 + build.rs | 3 ++- 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/Cargo.lock b/Cargo.lock index be772cc0e1..fb823661f8 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2211,6 +2211,7 @@ name = "wasmtime-cli" version = "0.16.0" dependencies = [ "anyhow", + "env_logger 0.7.1", "faerie", "file-per-thread-logger", "filecheck", diff --git a/Cargo.toml b/Cargo.toml index fa5f4cf312..60809ddcec 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -42,6 +42,7 @@ rayon = "1.2.1" humantime = "1.3.0" [dev-dependencies] +env_logger = "0.7.1" filecheck = "0.5.0" more-asserts = "0.2.1" tempfile = "3.1.0" diff --git a/build.rs b/build.rs index 3841b85303..3176abd157 100644 --- a/build.rs +++ b/build.rs @@ -155,9 +155,10 @@ fn write_testsuite_tests( writeln!(out, "#[ignore]")?; } writeln!(out, "fn r#{}() {{", &testname)?; + writeln!(out, " let _ = env_logger::try_init();")?; writeln!( out, - "crate::wast::run_wast(r#\"{}\"#, crate::wast::Strategy::{}).unwrap();", + " crate::wast::run_wast(r#\"{}\"#, crate::wast::Strategy::{}).unwrap();", path.display(), strategy )?;