Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Skip current-exe-mismatch on NetBSD #645

Merged
merged 1 commit into from
Aug 1, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading