From d1e16514d0cf2c28ce946b6102bdb22861cbda99 Mon Sep 17 00:00:00 2001 From: Henri Verbeet Date: Thu, 4 Apr 2024 14:45:59 +0200 Subject: [PATCH] tests/test-driver: Avoid "head" with negative line count. It's not supported on macOS, and not needed here. --- tests/test-driver.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test-driver.sh b/tests/test-driver.sh index 869cc4be..b7104a34 100755 --- a/tests/test-driver.sh +++ b/tests/test-driver.sh @@ -188,7 +188,7 @@ details=$(awk "$awk_program" "$log_file") # In case of SIGABRT or SIGSEGV, add tag and print second to last line, containing the # "(core dumped)" message. -nxt_to_last_line=$(tail -n2 "$log_file" | head -n -1) +nxt_to_last_line=$(tail -n2 "$log_file" | head -n1) if [ "$tweaked_estatus" -eq 134 ]; then details="$details# [SIGABRT] $nxt_to_last_line" elif [ "$tweaked_estatus" -eq 139 ]; then