tests: Skip pty-based test except on GNU/Linux.
authorBen Pfaff <blp@cs.stanford.edu>
Thu, 18 May 2023 01:32:12 +0000 (18:32 -0700)
committerBen Pfaff <blp@cs.stanford.edu>
Thu, 18 May 2023 01:32:12 +0000 (18:32 -0700)
It fails on Mac OS but there's no reason to believe the functionality is
really broken there.

Thanks to Friedrich Beckmann for reporting the failure.

tests/ui/terminal/main.at

index e4f4ced3a32b884756c47d7056600f144cdc041a..6680f7f98e5fe4f2a066ee58f3a932ea983a3e9f 100644 (file)
@@ -78,6 +78,14 @@ dnl We have to use squish-pty to make PSPP think that we're running
 dnl interactively.  First make sure that squish-pty works at all.
 SQUISH_PTY="$PYTHON3 $top_srcdir/tests/ui/terminal/squish-pty.py"
 AT_CHECK([$SQUISH_PTY true </dev/null >/dev/null 2>/dev/null || exit 77])
+dnl ptys are pretty system-dependent and it's hard to test them
+dnl everywhere.  For example, on Mac OS the SHOW N and FINISH command
+dnl text doesn't appear in the output.  So we'll just skip them
+dnl other than on the OS we know best.
+AT_CHECK([case $host in #(
+  *-linux*) ;; #(
+  *) exit 77
+esac])
 dnl Then do the real test.  The crucial thing to notice here is
 dnl that the SHOW output must appear before the prompt for FINISH.
 AT_CHECK([echo 'SHOW N.