tests: Remove skipped tests hack for Cmake < 3.9.0

We require 3.19

This also makes skipped tests visible, which showed that the
print-help test was never run because the REQUIRES line was off.

In sh-mode, bash's `command -v` returns true if *all* commands exist.
This commit is contained in:
Fabian Boehm 2024-06-11 16:54:10 +02:00
parent 32d23a37cb
commit 04da7043a6
2 changed files with 1 additions and 10 deletions

View file

@ -1,6 +1,6 @@
# RUN: %fish %s
# Test redirecting builtin help with a pipe
# REQUIRES: command -v mandoc nroff
# REQUIRES: command -v mandoc || command -v nroff
set -lx __fish_data_dir (mktemp -d)
mkdir -p $__fish_data_dir/man/man1

View file

@ -68,14 +68,5 @@ fish_init_cmd="${fish_init_cmd} && source ${TESTS_ROOT}/test_util.fish";
--init-command "${fish_init_cmd}" "$fish_script" "$script_args")
test_status="$?"
# CMake less than 3.9.0 "fully supports" setting an exit code to denote a skipped test, but then
# it just goes ahead and reports them as failed anyway. Really?
if test -n $CMAKE_SKIPPED_HACK; then
if test $test_status -eq 125; then
echo "Overriding SKIPPED return code from test" 1>&2
test_status=0
fi
fi
rm -rf "$homedir"
exit "$test_status"