From a899a22c5443ff6939e4db6c14de545f57e60f9e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=AD=90=EF=B8=8FNINIKA=E2=AD=90=EF=B8=8F?= Date: Thu, 20 Mar 2025 02:33:14 +0300 Subject: [PATCH] Use artifact.test to determine if an executable is a test one `artifact.target.test` seems to only tell if the executable _has_ tests, not whether it _is_ a test executable --- src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib.rs b/src/lib.rs index dc571f7..70138bc 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -262,7 +262,7 @@ pub(crate) fn get_artifact_config(package: Package, artifact: Artifact) -> CTRCo // For now, assume a single "kind" per artifact. It seems to be the case // when a single executable is built anyway but maybe not in all cases. let name = match artifact.target.kind[0].as_ref() { - "bin" | "lib" | "rlib" | "dylib" if artifact.target.test => { + "bin" | "lib" | "rlib" | "dylib" if artifact.profile.test => { format!("{} tests", artifact.target.name) } "example" => {