Skip to content

Commit

Permalink
Skip current-exe-mismatch on NetBSD
Browse files Browse the repository at this point in the history
  • Loading branch information
workingjubilee committed Jul 27, 2024
1 parent dcd0aaa commit ee3a5c0
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 ee3a5c0

Please sign in to comment.