Skip to content

Commit

Permalink
Merge pull request #645 from workingjubilee/skip-test-on-netbsd
Browse files Browse the repository at this point in the history
Skip current-exe-mismatch on NetBSD
  • Loading branch information
ChrisDenton authored Aug 1, 2024
2 parents 3ad7f66 + ee3a5c0 commit fd0aed5
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions tests/current-exe-mismatch.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,23 @@
// `std::env::current_exe` will return the path of *that* program, and not
// the Rust program itself.

// This behavior is only known to be supported on Linux and FreeBSD, see
// https://mail-index.netbsd.org/tech-toolchain/2024/07/27/msg004469.html

use std::io::{BufRead, BufReader};
use std::path::{Path, PathBuf};
use std::process::Command;

mod common;

fn main() {
if cfg!(target_os = "netbsd") {
// NetBSD doesn't support this silliness, so because this is an fn main test,
// just pass it on there. If we used ui-test or something we'd use
//@ ignore-netbsd
return;
}

if std::env::var(VAR).is_err() {
// the parent waits for the child; then we then handle either printing
// "test result: ok", "test result: ignored", or panicking.
Expand Down

0 comments on commit fd0aed5

Please sign in to comment.