From 54f9587569f80c5899d1e75482197d87d2406e15 Mon Sep 17 00:00:00 2001 From: bjorn3 <17426603+bjorn3@users.noreply.github.com> Date: Wed, 10 Aug 2022 22:48:15 +0200 Subject: [PATCH] Don't use libtest harness for filetests (#4655) We are using our own test harness for filetests and embedding it in libtest isn't useful. It only hides test output until the end and results in unnecessary noise. --- cranelift/Cargo.toml | 5 +++++ cranelift/tests/filetests.rs | 7 +++---- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/cranelift/Cargo.toml b/cranelift/Cargo.toml index d4b728392f..e01c543718 100644 --- a/cranelift/Cargo.toml +++ b/cranelift/Cargo.toml @@ -13,6 +13,11 @@ edition = "2021" name = "clif-util" path = "src/clif-util.rs" +[[test]] +name = "filetests" +path = "tests/filetests.rs" +harness = false + [dependencies] cfg-if = "1.0" cranelift-codegen = { path = "codegen", version = "0.88.0" } diff --git a/cranelift/tests/filetests.rs b/cranelift/tests/filetests.rs index a633461109..72fbe7494c 100644 --- a/cranelift/tests/filetests.rs +++ b/cranelift/tests/filetests.rs @@ -1,6 +1,5 @@ -#[test] -fn filetests() { +fn main() -> anyhow::Result<()> { // Run all the filetests in the following directories. - cranelift_filetests::run(false, false, &["filetests".into(), "docs".into()]) - .expect("test harness"); + cranelift_filetests::run(false, false, &["filetests".into(), "docs".into()])?; + Ok(()) }