From a3eea4325e5eb2748148b2917b1511a124c2da68 Mon Sep 17 00:00:00 2001 From: Fabian Homborg Date: Thu, 24 Jun 2021 20:07:54 +0200 Subject: [PATCH] Skip some tests on OpenBSD sigint2 would hang (probably because of different semantics in signal delivery?) wcstod isn't implemented correctly, so math can't do hex numbers. OpenBSD only passes the filename as argv[0] and doesn't give us another feature I know of, so status fish-path can't work. --- tests/checks/math.fish | 3 +++ tests/checks/sigint2.fish | 2 ++ tests/checks/status-command.fish | 13 +++++++++---- 3 files changed, 14 insertions(+), 4 deletions(-) diff --git a/tests/checks/math.fish b/tests/checks/math.fish index 1d71921a7..b87a643e0 100644 --- a/tests/checks/math.fish +++ b/tests/checks/math.fish @@ -1,4 +1,7 @@ #RUN: %fish %s +# OpenBSD doesn't do hex numbers in str/wcstod (like C99 requires). +# So let's skip this. +#REQUIRES: test "$(uname)" != OpenBSD # Validate basic expressions math 3 / 2 # CHECK: 1.5 diff --git a/tests/checks/sigint2.fish b/tests/checks/sigint2.fish index 7b6c78da3..e925f2d7b 100644 --- a/tests/checks/sigint2.fish +++ b/tests/checks/sigint2.fish @@ -1,4 +1,6 @@ #RUN: %fish -C "set helper %fish_test_helper" %s +# This hangs on OpenBSD +#REQUIRES: test "$(uname)" != OpenBSD # Ensure that if child processes SIGINT, we exit our loops # Test for #3780 diff --git a/tests/checks/status-command.fish b/tests/checks/status-command.fish index 8ed55f7a9..c6105dea2 100644 --- a/tests/checks/status-command.fish +++ b/tests/checks/status-command.fish @@ -5,10 +5,15 @@ status line-number # Check status fish-path # No output expected on success -set status_fish_path (realpath (status fish-path)) -set env_fish_path (realpath $FISH_PATH) -test "$status_fish_path" = "$env_fish_path" -or echo "Fish path disagreement: $status_fish_path vs $env_fish_path" +# +# argv[0] on OpenBSD is just the filename, not the path +# That means fish-path is unsupportable there. +if not contains (uname) OpenBSD + set status_fish_path (realpath (status fish-path)) + set env_fish_path (realpath $FISH_PATH) + test "$status_fish_path" = "$env_fish_path" + or echo "Fish path disagreement: $status_fish_path vs $env_fish_path" +end # Check is-block status is-block