[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[6079] skip test if read -t failed
From: |
Gavin D. Smith |
Subject: |
[6079] skip test if read -t failed |
Date: |
Fri, 30 Jan 2015 01:58:12 +0000 |
Revision: 6079
http://svn.sv.gnu.org/viewvc/?view=rev&root=texinfo&revision=6079
Author: gavin
Date: 2015-01-30 01:58:10 +0000 (Fri, 30 Jan 2015)
Log Message:
-----------
skip test if read -t failed
Modified Paths:
--------------
trunk/ChangeLog
trunk/info/t/Init-test.inc
trunk/info/t/Timeout-test.inc
trunk/info/t/adjust-anchors.sh
trunk/info/t/all-only.sh
trunk/info/t/anchor-positions.sh
trunk/info/t/body-start.sh
trunk/info/t/c-u-m-x-scroll-forward.sh
trunk/info/t/cr-tag-table.sh
trunk/info/t/dir-dangling-entry.sh
trunk/info/t/end-of-line.sh
trunk/info/t/file-nodes.sh
trunk/info/t/file.sh
trunk/info/t/gc-split.sh
trunk/info/t/goal-column.sh
trunk/info/t/goto-quoted.sh
trunk/info/t/inc-sea-forward-nonregex.sh
trunk/info/t/inc-sea-forward.sh
trunk/info/t/inc-sea-history.sh
trunk/info/t/inc-sea-insensitive.sh
trunk/info/t/index-apropos.sh
trunk/info/t/index-completing.sh
trunk/info/t/index-long-nodeline.sh
trunk/info/t/index-search.sh
trunk/info/t/index.sh
trunk/info/t/last-no-history.sh
trunk/info/t/last-node-not-top-level.sh
trunk/info/t/menu-sequence.sh
trunk/info/t/next-quoted.sh
trunk/info/t/no-index.sh
trunk/info/t/quoted-label-and-target.sh
trunk/info/t/quoted-label-as-target.sh
trunk/info/t/quoted-target.sh
trunk/info/t/relative-reference.sh
trunk/info/t/resize-in-completions.sh
trunk/info/t/search-after-tag.sh
trunk/info/t/search-empty.sh
trunk/info/t/search-skip-screen.sh
trunk/info/t/split-file-menu.sh
trunk/info/t/split-footnotes.sh
trunk/info/t/split-index.sh
trunk/info/t/star-note-non-whitespace.sh
trunk/info/t/tab-argument.sh
trunk/info/t/tab.sh
trunk/info/t/window-split-dir.sh
Removed Paths:
-------------
trunk/info/t/Cleanup.inc
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2015-01-30 01:30:23 UTC (rev 6078)
+++ trunk/ChangeLog 2015-01-30 01:58:10 UTC (rev 6079)
@@ -1,3 +1,14 @@
+2015-01-30 Gavin Smith <address@hidden>
+
+ * info/t/Cleanup.inc: File removed.
+ * info/t/Init-test.inc (cleanup) Add contents of Cleanup.inc as
+ a function.
+ * info/t: All *.sh files: use cleanup function instead of
+ sourcing Cleanup.inc.
+ * info/t/Timeout-test.inc: If exit status of 'read' builtin
+ could indicate that '-t' option is not supported, skip the test.
+ Test failures reported by Nathan Royce.
+
2015-01-29 Vitezslav Crhonek <address@hidden> (tiny change)
* info/info.c (main): Call info_error with "%s" just in case the
Deleted: trunk/info/t/Cleanup.inc
===================================================================
--- trunk/info/t/Cleanup.inc 2015-01-30 01:30:23 UTC (rev 6078)
+++ trunk/info/t/Cleanup.inc 2015-01-30 01:58:10 UTC (rev 6079)
@@ -1,26 +0,0 @@
-# Copyright (C) 2014, 2015 Free Software Foundation, Inc.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-# Cleanup and exit for tests
-
-# Delete created files and kill spawned processes if any.
-rm -f $GINFO_OUTPUT
-rm -f $PIPEIN $PIPEOUT
-test $PTY_PID -ne 0 && kill $PTY_PID
-
-if test -n "$TIMED_OUT"; then
- return 1
-fi
-exit $RETVAL
Modified: trunk/info/t/Init-test.inc
===================================================================
--- trunk/info/t/Init-test.inc 2015-01-30 01:30:23 UTC (rev 6078)
+++ trunk/info/t/Init-test.inc 2015-01-30 01:58:10 UTC (rev 6079)
@@ -53,3 +53,17 @@
# Make sure that non-interactive operation works even if terminal is dumb
TERM=dumb; export TERM
+
+# Cleanup and exit
+cleanup ()
+{
+ # Delete created files and kill spawned processes if any.
+ rm -f $GINFO_OUTPUT
+ rm -f $PIPEIN $PIPEOUT
+ test $PTY_PID -ne 0 && kill $PTY_PID
+
+ if test -n "$TIMED_OUT"; then
+ return 1
+ fi
+ exit $RETVAL
+}
Modified: trunk/info/t/Timeout-test.inc
===================================================================
--- trunk/info/t/Timeout-test.inc 2015-01-30 01:30:23 UTC (rev 6078)
+++ trunk/info/t/Timeout-test.inc 2015-01-30 01:58:10 UTC (rev 6079)
@@ -19,9 +19,14 @@
TIMED_OUT=
read -t 3 FINISHED <>$FINISHEDFIFO
-rm -f $FINISHEDFIFO
-
-if test "$FINISHED" = failure; then
+if test $? != 0 -a $? -le 128 ; then
+ # Exit status of 'read' should be 0 on a successful read, or
+ # greater than 128 if it timed out.
+ rm -f $FINISHEDFIFO
+ echo 'read -t not supported - test skipped' >&2
+ RETVAL=77
+ cleanup
+elif test "$FINISHED" = failure; then
echo 'Program exited unsuccessfully' >&2
RETVAL=1
@@ -33,3 +38,6 @@
echo 'Program timed out after 3 seconds' >&2
TIMED_OUT=1
fi
+
+rm -f $FINISHEDFIFO
+
Modified: trunk/info/t/adjust-anchors.sh
===================================================================
--- trunk/info/t/adjust-anchors.sh 2015-01-30 01:30:23 UTC (rev 6078)
+++ trunk/info/t/adjust-anchors.sh 2015-01-30 01:58:10 UTC (rev 6079)
@@ -36,5 +36,5 @@
RETVAL=$?
fi
-. $t/Cleanup.inc
+cleanup
Modified: trunk/info/t/all-only.sh
===================================================================
--- trunk/info/t/all-only.sh 2015-01-30 01:30:23 UTC (rev 6078)
+++ trunk/info/t/all-only.sh 2015-01-30 01:58:10 UTC (rev 6079)
@@ -31,5 +31,5 @@
grep '^File: intera.info, Node: Top' $GINFO_OUTPUT
RETVAL=$?
-. $t/Cleanup.inc
+cleanup
Modified: trunk/info/t/anchor-positions.sh
===================================================================
--- trunk/info/t/anchor-positions.sh 2015-01-30 01:30:23 UTC (rev 6078)
+++ trunk/info/t/anchor-positions.sh 2015-01-30 01:58:10 UTC (rev 6079)
@@ -25,5 +25,5 @@
printf q >$PTY_TYPE
. $t/Timeout-test.inc
-. $t/Cleanup.inc
+cleanup
Modified: trunk/info/t/body-start.sh
===================================================================
--- trunk/info/t/body-start.sh 2015-01-30 01:30:23 UTC (rev 6078)
+++ trunk/info/t/body-start.sh 2015-01-30 01:58:10 UTC (rev 6079)
@@ -32,5 +32,5 @@
RETVAL=$?
fi
-. $t/Cleanup.inc
+cleanup
Modified: trunk/info/t/c-u-m-x-scroll-forward.sh
===================================================================
--- trunk/info/t/c-u-m-x-scroll-forward.sh 2015-01-30 01:30:23 UTC (rev
6078)
+++ trunk/info/t/c-u-m-x-scroll-forward.sh 2015-01-30 01:58:10 UTC (rev
6079)
@@ -38,5 +38,5 @@
diff $GINFO_OUTPUT $t/node-target
RETVAL=$?
-. $t/Cleanup.inc
+cleanup
Modified: trunk/info/t/cr-tag-table.sh
===================================================================
--- trunk/info/t/cr-tag-table.sh 2015-01-30 01:30:23 UTC (rev 6078)
+++ trunk/info/t/cr-tag-table.sh 2015-01-30 01:58:10 UTC (rev 6079)
@@ -29,5 +29,5 @@
grep 'Node: Second' $GINFO_OUTPUT
RETVAL=$?
-. $t/Cleanup.inc
+cleanup
Modified: trunk/info/t/dir-dangling-entry.sh
===================================================================
--- trunk/info/t/dir-dangling-entry.sh 2015-01-30 01:30:23 UTC (rev 6078)
+++ trunk/info/t/dir-dangling-entry.sh 2015-01-30 01:58:10 UTC (rev 6079)
@@ -29,4 +29,4 @@
grep 'File: dir' $GINFO_OUTPUT
RETVAL=$?
-. $t/Cleanup.inc
+cleanup
Modified: trunk/info/t/end-of-line.sh
===================================================================
--- trunk/info/t/end-of-line.sh 2015-01-30 01:30:23 UTC (rev 6078)
+++ trunk/info/t/end-of-line.sh 2015-01-30 01:58:10 UTC (rev 6079)
@@ -32,5 +32,5 @@
RETVAL=$?
fi
-. $t/Cleanup.inc
+cleanup
Modified: trunk/info/t/file-nodes.sh
===================================================================
--- trunk/info/t/file-nodes.sh 2015-01-30 01:30:23 UTC (rev 6078)
+++ trunk/info/t/file-nodes.sh 2015-01-30 01:58:10 UTC (rev 6079)
@@ -25,4 +25,4 @@
grep 'Arrived at Node 1' $GINFO_OUTPUT || RETVAL=1
grep 'Arrived at Node 2' $GINFO_OUTPUT || RETVAL=1
-. $t/Cleanup.inc
+cleanup
Modified: trunk/info/t/file.sh
===================================================================
--- trunk/info/t/file.sh 2015-01-30 01:30:23 UTC (rev 6078)
+++ trunk/info/t/file.sh 2015-01-30 01:58:10 UTC (rev 6079)
@@ -30,5 +30,5 @@
RETVAL=$?
-. $t/Cleanup.inc
+cleanup
Modified: trunk/info/t/gc-split.sh
===================================================================
--- trunk/info/t/gc-split.sh 2015-01-30 01:30:23 UTC (rev 6078)
+++ trunk/info/t/gc-split.sh 2015-01-30 01:58:10 UTC (rev 6079)
@@ -25,5 +25,5 @@
printf '\023aa\033[B\014q' >$PTY_TYPE
. $t/Timeout-test.inc
-. $t/Cleanup.inc
+cleanup
Modified: trunk/info/t/goal-column.sh
===================================================================
--- trunk/info/t/goal-column.sh 2015-01-30 01:30:23 UTC (rev 6078)
+++ trunk/info/t/goal-column.sh 2015-01-30 01:58:10 UTC (rev 6079)
@@ -28,5 +28,5 @@
diff $GINFO_OUTPUT $t/node-target
RETVAL=$?
-. $t/Cleanup.inc
+cleanup
Modified: trunk/info/t/goto-quoted.sh
===================================================================
--- trunk/info/t/goto-quoted.sh 2015-01-30 01:30:23 UTC (rev 6078)
+++ trunk/info/t/goto-quoted.sh 2015-01-30 01:58:10 UTC (rev 6079)
@@ -32,5 +32,5 @@
RETVAL=$?
fi
-. $t/Cleanup.inc
+cleanup
Modified: trunk/info/t/inc-sea-forward-nonregex.sh
===================================================================
--- trunk/info/t/inc-sea-forward-nonregex.sh 2015-01-30 01:30:23 UTC (rev
6078)
+++ trunk/info/t/inc-sea-forward-nonregex.sh 2015-01-30 01:58:10 UTC (rev
6079)
@@ -33,5 +33,5 @@
diff $GINFO_OUTPUT $t/node-target
RETVAL=$?
-. $t/Cleanup.inc
+cleanup
Modified: trunk/info/t/inc-sea-forward.sh
===================================================================
--- trunk/info/t/inc-sea-forward.sh 2015-01-30 01:30:23 UTC (rev 6078)
+++ trunk/info/t/inc-sea-forward.sh 2015-01-30 01:58:10 UTC (rev 6079)
@@ -33,5 +33,5 @@
diff $GINFO_OUTPUT $t/node-target
RETVAL=$?
-. $t/Cleanup.inc
+cleanup
Modified: trunk/info/t/inc-sea-history.sh
===================================================================
--- trunk/info/t/inc-sea-history.sh 2015-01-30 01:30:23 UTC (rev 6078)
+++ trunk/info/t/inc-sea-history.sh 2015-01-30 01:58:10 UTC (rev 6079)
@@ -36,5 +36,5 @@
RETVAL=$?
fi
-. $t/Cleanup.inc
+cleanup
Modified: trunk/info/t/inc-sea-insensitive.sh
===================================================================
--- trunk/info/t/inc-sea-insensitive.sh 2015-01-30 01:30:23 UTC (rev 6078)
+++ trunk/info/t/inc-sea-insensitive.sh 2015-01-30 01:58:10 UTC (rev 6079)
@@ -32,5 +32,5 @@
diff $GINFO_OUTPUT $t/node-target
RETVAL=$?
-. $t/Cleanup.inc
+cleanup
Modified: trunk/info/t/index-apropos.sh
===================================================================
--- trunk/info/t/index-apropos.sh 2015-01-30 01:30:23 UTC (rev 6078)
+++ trunk/info/t/index-apropos.sh 2015-01-30 01:58:10 UTC (rev 6079)
@@ -25,5 +25,5 @@
$GINFO
RETVAL=$?
-. $t/Cleanup.inc
+cleanup
Modified: trunk/info/t/index-completing.sh
===================================================================
--- trunk/info/t/index-completing.sh 2015-01-30 01:30:23 UTC (rev 6078)
+++ trunk/info/t/index-completing.sh 2015-01-30 01:58:10 UTC (rev 6079)
@@ -26,5 +26,5 @@
grep '^Node: Node 2' $GINFO_OUTPUT
RETVAL=$?
-. $t/Cleanup.inc
+cleanup
Modified: trunk/info/t/index-long-nodeline.sh
===================================================================
--- trunk/info/t/index-long-nodeline.sh 2015-01-30 01:30:23 UTC (rev 6078)
+++ trunk/info/t/index-long-nodeline.sh 2015-01-30 01:58:10 UTC (rev 6079)
@@ -32,4 +32,4 @@
RETVAL=$?
fi
-. $t/Cleanup.inc
+cleanup
Modified: trunk/info/t/index-search.sh
===================================================================
--- trunk/info/t/index-search.sh 2015-01-30 01:30:23 UTC (rev 6078)
+++ trunk/info/t/index-search.sh 2015-01-30 01:58:10 UTC (rev 6079)
@@ -28,4 +28,4 @@
# Return non-zero (test failure) if files differ
diff $GINFO_OUTPUT $t/node-target
-. $t/Cleanup.inc
+cleanup
Modified: trunk/info/t/index.sh
===================================================================
--- trunk/info/t/index.sh 2015-01-30 01:30:23 UTC (rev 6078)
+++ trunk/info/t/index.sh 2015-01-30 01:58:10 UTC (rev 6079)
@@ -32,4 +32,4 @@
RETVAL=$?
fi
-. $t/Cleanup.inc
+cleanup
Modified: trunk/info/t/last-no-history.sh
===================================================================
--- trunk/info/t/last-no-history.sh 2015-01-30 01:30:23 UTC (rev 6078)
+++ trunk/info/t/last-no-history.sh 2015-01-30 01:58:10 UTC (rev 6079)
@@ -23,5 +23,5 @@
$GINFO -f intera
RETVAL=$?
-. $t/Cleanup.inc
+cleanup
Modified: trunk/info/t/last-node-not-top-level.sh
===================================================================
--- trunk/info/t/last-node-not-top-level.sh 2015-01-30 01:30:23 UTC (rev
6078)
+++ trunk/info/t/last-node-not-top-level.sh 2015-01-30 01:58:10 UTC (rev
6079)
@@ -27,5 +27,5 @@
grep 'Node: Top' $GINFO_OUTPUT
RETVAL=$?
-. $t/Cleanup.inc
+cleanup
Modified: trunk/info/t/menu-sequence.sh
===================================================================
--- trunk/info/t/menu-sequence.sh 2015-01-30 01:30:23 UTC (rev 6078)
+++ trunk/info/t/menu-sequence.sh 2015-01-30 01:58:10 UTC (rev 6079)
@@ -30,5 +30,5 @@
RETVAL=$?
fi
-. $t/Cleanup.inc
+cleanup
Modified: trunk/info/t/next-quoted.sh
===================================================================
--- trunk/info/t/next-quoted.sh 2015-01-30 01:30:23 UTC (rev 6078)
+++ trunk/info/t/next-quoted.sh 2015-01-30 01:58:10 UTC (rev 6079)
@@ -30,5 +30,5 @@
RETVAL=$?
fi
-. $t/Cleanup.inc
+cleanup
Modified: trunk/info/t/no-index.sh
===================================================================
--- trunk/info/t/no-index.sh 2015-01-30 01:30:23 UTC (rev 6078)
+++ trunk/info/t/no-index.sh 2015-01-30 01:58:10 UTC (rev 6079)
@@ -23,5 +23,5 @@
printf 'ia\rq' >$PTY_TYPE
. $t/Timeout-test.inc
-. $t/Cleanup.inc
+cleanup
Modified: trunk/info/t/quoted-label-and-target.sh
===================================================================
--- trunk/info/t/quoted-label-and-target.sh 2015-01-30 01:30:23 UTC (rev
6078)
+++ trunk/info/t/quoted-label-and-target.sh 2015-01-30 01:58:10 UTC (rev
6079)
@@ -30,5 +30,5 @@
RETVAL=$?
fi
-. $t/Cleanup.inc
+cleanup
Modified: trunk/info/t/quoted-label-as-target.sh
===================================================================
--- trunk/info/t/quoted-label-as-target.sh 2015-01-30 01:30:23 UTC (rev
6078)
+++ trunk/info/t/quoted-label-as-target.sh 2015-01-30 01:58:10 UTC (rev
6079)
@@ -30,5 +30,5 @@
RETVAL=$?
fi
-. $t/Cleanup.inc
+cleanup
Modified: trunk/info/t/quoted-target.sh
===================================================================
--- trunk/info/t/quoted-target.sh 2015-01-30 01:30:23 UTC (rev 6078)
+++ trunk/info/t/quoted-target.sh 2015-01-30 01:58:10 UTC (rev 6079)
@@ -30,5 +30,5 @@
RETVAL=$?
fi
-. $t/Cleanup.inc
+cleanup
Modified: trunk/info/t/relative-reference.sh
===================================================================
--- trunk/info/t/relative-reference.sh 2015-01-30 01:30:23 UTC (rev 6078)
+++ trunk/info/t/relative-reference.sh 2015-01-30 01:58:10 UTC (rev 6079)
@@ -26,5 +26,5 @@
printf '\030o\0301\t\t\t\rq' >$PTY_TYPE
. $t/Timeout-test.inc
-. $t/Cleanup.inc
+cleanup
Modified: trunk/info/t/resize-in-completions.sh
===================================================================
--- trunk/info/t/resize-in-completions.sh 2015-01-30 01:30:23 UTC (rev
6078)
+++ trunk/info/t/resize-in-completions.sh 2015-01-30 01:58:10 UTC (rev
6079)
@@ -35,5 +35,5 @@
fi
. $t/Timeout-test.inc
-. $t/Cleanup.inc
+cleanup
Modified: trunk/info/t/search-after-tag.sh
===================================================================
--- trunk/info/t/search-after-tag.sh 2015-01-30 01:30:23 UTC (rev 6078)
+++ trunk/info/t/search-after-tag.sh 2015-01-30 01:58:10 UTC (rev 6079)
@@ -32,5 +32,5 @@
RETVAL=$?
fi
-. $t/Cleanup.inc
+cleanup
Modified: trunk/info/t/search-empty.sh
===================================================================
--- trunk/info/t/search-empty.sh 2015-01-30 01:30:23 UTC (rev 6078)
+++ trunk/info/t/search-empty.sh 2015-01-30 01:58:10 UTC (rev 6079)
@@ -23,5 +23,5 @@
printf 's\rq' >$PTY_TYPE
. $t/Timeout-test.inc
-. $t/Cleanup.inc
+cleanup
Modified: trunk/info/t/search-skip-screen.sh
===================================================================
--- trunk/info/t/search-skip-screen.sh 2015-01-30 01:30:23 UTC (rev 6078)
+++ trunk/info/t/search-skip-screen.sh 2015-01-30 01:58:10 UTC (rev 6079)
@@ -29,5 +29,5 @@
grep '^File: search\.info, Node: Top' $GINFO_OUTPUT
RETVAL=$?
-. $t/Cleanup.inc
+cleanup
Modified: trunk/info/t/split-file-menu.sh
===================================================================
--- trunk/info/t/split-file-menu.sh 2015-01-30 01:30:23 UTC (rev 6078)
+++ trunk/info/t/split-file-menu.sh 2015-01-30 01:58:10 UTC (rev 6079)
@@ -33,4 +33,4 @@
RETVAL=$?
fi
-. $t/Cleanup.inc
+cleanup
Modified: trunk/info/t/split-footnotes.sh
===================================================================
--- trunk/info/t/split-footnotes.sh 2015-01-30 01:30:23 UTC (rev 6078)
+++ trunk/info/t/split-footnotes.sh 2015-01-30 01:58:10 UTC (rev 6079)
@@ -24,5 +24,5 @@
printf '\030o\0302q' >$PTY_TYPE
. $t/Timeout-test.inc
-. $t/Cleanup.inc
+cleanup
Modified: trunk/info/t/split-index.sh
===================================================================
--- trunk/info/t/split-index.sh 2015-01-30 01:30:23 UTC (rev 6078)
+++ trunk/info/t/split-index.sh 2015-01-30 01:58:10 UTC (rev 6079)
@@ -32,4 +32,4 @@
RETVAL=$?
fi
-. $t/Cleanup.inc
+cleanup
Modified: trunk/info/t/star-note-non-whitespace.sh
===================================================================
--- trunk/info/t/star-note-non-whitespace.sh 2015-01-30 01:30:23 UTC (rev
6078)
+++ trunk/info/t/star-note-non-whitespace.sh 2015-01-30 01:58:10 UTC (rev
6079)
@@ -30,5 +30,4 @@
diff $GINFO_OUTPUT $t/node-target
RETVAL=$?
-. $t/Cleanup.inc
-
+cleanup
Modified: trunk/info/t/tab-argument.sh
===================================================================
--- trunk/info/t/tab-argument.sh 2015-01-30 01:30:23 UTC (rev 6078)
+++ trunk/info/t/tab-argument.sh 2015-01-30 01:58:10 UTC (rev 6079)
@@ -26,5 +26,4 @@
diff $GINFO_OUTPUT $t/node-target
RETVAL=$?
-. $t/Cleanup.inc
-
+cleanup
Modified: trunk/info/t/tab.sh
===================================================================
--- trunk/info/t/tab.sh 2015-01-30 01:30:23 UTC (rev 6078)
+++ trunk/info/t/tab.sh 2015-01-30 01:58:10 UTC (rev 6079)
@@ -31,5 +31,4 @@
RETVAL=$?
fi
-. $t/Cleanup.inc
-
+cleanup
Modified: trunk/info/t/window-split-dir.sh
===================================================================
--- trunk/info/t/window-split-dir.sh 2015-01-30 01:30:23 UTC (rev 6078)
+++ trunk/info/t/window-split-dir.sh 2015-01-30 01:58:10 UTC (rev 6079)
@@ -26,5 +26,4 @@
grep '^File: dir' $GINFO_OUTPUT
-. $t/Cleanup.inc
-
+cleanup
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [6079] skip test if read -t failed,
Gavin D. Smith <=