Skip to content

Commit 42e06d4

Browse files
committed
Fix QNX/nto support of 7.1
1 parent adb6da3 commit 42e06d4

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

ctest/src/lib.rs

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1123,15 +1123,17 @@ fn default_cfg(target: &str) -> Vec<(String, Option<String>)> {
11231123
("vxworks", "unix", "")
11241124
} else if target.contains("haiku") {
11251125
("haiku", "unix", "")
1126-
} else if target.contains("qnx") {
1127-
// Set an environment string if provided, empty str otherwise
1128-
let before_env = "-qnx-";
1129-
let env = target
1126+
} else if target.contains("nto-qnx") {
1127+
let before_env = "nto-qnx";
1128+
let version = target
11301129
.rfind(before_env)
11311130
.map(|i| &target[i + before_env.len()..])
1132-
.or(Some(""))
11331131
.unwrap();
1134-
("qnx", "unix", env)
1132+
let env = match version {
1133+
"7.1.0" => "nto71",
1134+
_ => panic!("Uknown version"),
1135+
};
1136+
("nto", "unix", env)
11351137
} else {
11361138
panic!("unknown os/family: {}", target)
11371139
};

0 commit comments

Comments
 (0)