Skip to content

Commit fd0aed5

Browse files
authored
Merge pull request #645 from workingjubilee/skip-test-on-netbsd
Skip current-exe-mismatch on NetBSD
2 parents 3ad7f66 + ee3a5c0 commit fd0aed5

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

tests/current-exe-mismatch.rs

+10
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,23 @@
22
// `std::env::current_exe` will return the path of *that* program, and not
33
// the Rust program itself.
44

5+
// This behavior is only known to be supported on Linux and FreeBSD, see
6+
// https://mail-index.netbsd.org/tech-toolchain/2024/07/27/msg004469.html
7+
58
use std::io::{BufRead, BufReader};
69
use std::path::{Path, PathBuf};
710
use std::process::Command;
811

912
mod common;
1013

1114
fn main() {
15+
if cfg!(target_os = "netbsd") {
16+
// NetBSD doesn't support this silliness, so because this is an fn main test,
17+
// just pass it on there. If we used ui-test or something we'd use
18+
//@ ignore-netbsd
19+
return;
20+
}
21+
1222
if std::env::var(VAR).is_err() {
1323
// the parent waits for the child; then we then handle either printing
1424
// "test result: ok", "test result: ignored", or panicking.

0 commit comments

Comments
 (0)