Skip to content

Commit a899a22

Browse files
committed
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
1 parent 83788af commit a899a22

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,7 @@ pub(crate) fn get_artifact_config(package: Package, artifact: Artifact) -> CTRCo
262262
// For now, assume a single "kind" per artifact. It seems to be the case
263263
// when a single executable is built anyway but maybe not in all cases.
264264
let name = match artifact.target.kind[0].as_ref() {
265-
"bin" | "lib" | "rlib" | "dylib" if artifact.target.test => {
265+
"bin" | "lib" | "rlib" | "dylib" if artifact.profile.test => {
266266
format!("{} tests", artifact.target.name)
267267
}
268268
"example" => {

0 commit comments

Comments
 (0)