[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[6278] more attempts at info test suit portability
From: |
Gavin D. Smith |
Subject: |
[6278] more attempts at info test suit portability |
Date: |
Mon, 18 May 2015 15:31:15 +0000 |
Revision: 6278
http://svn.sv.gnu.org/viewvc/?view=rev&root=texinfo&revision=6278
Author: gavin
Date: 2015-05-18 15:31:11 +0000 (Mon, 18 May 2015)
Log Message:
-----------
more attempts at info test suit portability
Modified Paths:
--------------
trunk/ChangeLog
trunk/info/t/Init-inter.inc
trunk/info/t/Init-test.inc
trunk/info/t/Timeout-test.inc
trunk/info/t/cr-tag-table.sh
trunk/info/t/dir-3-menus.sh
trunk/info/t/dir-dangling-entry.sh
trunk/info/t/dir-file-index.sh
trunk/info/t/dir-file-menu.sh
trunk/info/t/dir-file-no-menu.sh
trunk/info/t/dir-file-node.sh
trunk/info/t/dir-file-sloppily.sh
trunk/info/t/dir-file.sh
trunk/info/t/dir-menus-sloppily.sh
trunk/info/t/dir-no-file.sh
trunk/info/t/dir-nondir.sh
trunk/info/t/dir.sh
trunk/info/t/file-file-with-dot.sh
trunk/info/t/file.sh
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2015-05-17 22:15:57 UTC (rev 6277)
+++ trunk/ChangeLog 2015-05-18 15:31:11 UTC (rev 6278)
@@ -1,3 +1,14 @@
+2015-05-18 Gavin Smith <address@hidden>
+
+ * info/t/Init-test.inc, info/t/Init-inter.inc, info/t/*.sh:
+ Revert split of GINFO variable from yesterday.
+
+ * info/t/Init-inter.inc: Wedge pipe for input key presses open
+ for reading as well as for writing.
+ * info/t/Timeout-test.inc: Try to detect if "read -t" works by
+ running it in a subshell. If exit status of "read -t" is 1,
+ report that an end-of-file was likely.
+
2015-05-17 Gavin Smith <address@hidden>
* info/t/Init-test.inc: Split GINFO variable into GINFO and
Modified: trunk/info/t/Init-inter.inc
===================================================================
--- trunk/info/t/Init-inter.inc 2015-05-17 22:15:57 UTC (rev 6277)
+++ trunk/info/t/Init-inter.inc 2015-05-18 15:31:11 UTC (rev 6278)
@@ -89,6 +89,11 @@
sleep 10 3>$PTY_TYPE &
WEDGE_PTY_PID=$!
+# Also keep the pipe open for reading in case pseudotty exits, so that
+# trying to open the pipe for writing doesn't hang.
+sleep 10 3<$PTY_TYPE &
+WEDGE_PTY_PID2=$!
+
# If we wanted the process to be open indefinitely, we could use an
# infinite loop in a subshell, like:
#
Modified: trunk/info/t/Init-test.inc
===================================================================
--- trunk/info/t/Init-test.inc 2015-05-17 22:15:57 UTC (rev 6277)
+++ trunk/info/t/Init-test.inc 2015-05-18 15:31:11 UTC (rev 6278)
@@ -20,12 +20,9 @@
srcdir=${srcdir:-.}
# Use the second line to run the program under valgrind.
-GINFO="./ginfo"
-GINFO_OPTIONS="--init-file $srcdir/t/Infokey-config"
+GINFO="./ginfo --init-file $srcdir/t/Infokey-config"
#GINFO="valgrind --log-file=$0.val.log --leak-check=full ./ginfo --init-file
$srcdir/t/Infokey-config"
-GINFO () { ${GINFO} ${GINFO_OPTIONS} "$@" ; }
-
# Set this to the name of the process
GINFO_NAME=ginfo
#GINFO_NAME=memcheck-x86-li
@@ -51,6 +48,7 @@
# Not an interactive test
PTY_PID=0
WEDGE_PTY_PID=0
+WEDGE_PTY_PID2=0
SUBSHELL=0
# Get error messages in English
@@ -69,6 +67,7 @@
# Delete created files and kill spawned processes if any.
test $PTY_PID -ne 0 && kill $PTY_PID
test $WEDGE_PTY_PID -ne 0 && kill $WEDGE_PTY_PID
+ test $WEDGE_PTY_PID2 -ne 0 && kill $WEDGE_PTY_PID2
test $SUBSHELL -ne 0 && kill $SUBSHELL
rm -f $GINFO_OUTPUT
Modified: trunk/info/t/Timeout-test.inc
===================================================================
--- trunk/info/t/Timeout-test.inc 2015-05-17 22:15:57 UTC (rev 6277)
+++ trunk/info/t/Timeout-test.inc 2015-05-18 15:31:11 UTC (rev 6278)
@@ -18,8 +18,21 @@
# Not timed out yet
TIMED_OUT=
-read -t 3 FINISHED <>$FINISHEDFIFO
-if test $? != 0 -a $? -le 128 ; then
+# Attempt to test if "read -t" works. Under Solaris 10, read -t below
+# should exit the subshell with an error exit status.
+(read -t 0; exit 0)
+if test $? != 0; then
+ status=2
+else
+ read -t 3 FINISHED <>$FINISHEDFIFO
+ status=$?
+fi
+
+if test $status = 1; then
+ echo 'read -t failed - probably end-of-file' >&2
+ RETVAL=1
+
+elif test $status != 0 -a $status -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
Modified: trunk/info/t/cr-tag-table.sh
===================================================================
--- trunk/info/t/cr-tag-table.sh 2015-05-17 22:15:57 UTC (rev 6277)
+++ trunk/info/t/cr-tag-table.sh 2015-05-18 15:31:11 UTC (rev 6278)
@@ -23,7 +23,7 @@
# Programmer's Guide" (23NOV2013 build of GNU COBOL 2.1),
# "gnucobpg.info", to be inaccessible when the error has built up to be
# more than the 1000 bytes of tolerance.
-GINFO --strict-node-location --file cr-tag-table.info \
+$GINFO --strict-node-location --file cr-tag-table.info \
--node Second >$GINFO_OUTPUT
grep 'Node: Second' $GINFO_OUTPUT
Modified: trunk/info/t/dir-3-menus.sh
===================================================================
--- trunk/info/t/dir-3-menus.sh 2015-05-17 22:15:57 UTC (rev 6277)
+++ trunk/info/t/dir-3-menus.sh 2015-05-18 15:31:11 UTC (rev 6278)
@@ -18,6 +18,6 @@
. $srcdir/t/Init-test.inc
# Follow several menus in a file to get to desired node
-GINFO --output - file-menu 'First entry' 'Node 2' 'Node 3' \
+$GINFO --output - file-menu 'First entry' 'Node 2' 'Node 3' \
| grep 'Arrived at Node 3.'
Modified: trunk/info/t/dir-dangling-entry.sh
===================================================================
--- trunk/info/t/dir-dangling-entry.sh 2015-05-17 22:15:57 UTC (rev 6277)
+++ trunk/info/t/dir-dangling-entry.sh 2015-05-18 15:31:11 UTC (rev 6278)
@@ -18,7 +18,7 @@
. $srcdir/t/Init-test.inc
. $t/Init-inter.inc
-# Try to load a dir entry refererring to a non-existing file
+# Try to load a dir entry referring to a non-existing file
run_ginfo non-existent
Modified: trunk/info/t/dir-file-index.sh
===================================================================
--- trunk/info/t/dir-file-index.sh 2015-05-17 22:15:57 UTC (rev 6277)
+++ trunk/info/t/dir-file-index.sh 2015-05-18 15:31:11 UTC (rev 6278)
@@ -18,5 +18,5 @@
. $srcdir/t/Init-test.inc
# Follow an index entry in a file found through dir
-GINFO --output - split 'entry text' \
+$GINFO --output - split 'entry text' \
| grep 'Node: Target node'
Modified: trunk/info/t/dir-file-menu.sh
===================================================================
--- trunk/info/t/dir-file-menu.sh 2015-05-17 22:15:57 UTC (rev 6277)
+++ trunk/info/t/dir-file-menu.sh 2015-05-18 15:31:11 UTC (rev 6278)
@@ -18,5 +18,5 @@
. $srcdir/t/Init-test.inc
# Follow a menu in a file
-GINFO --output - file-menu 'First entry' | grep 'Arrived at Node 1.'
+$GINFO --output - file-menu 'First entry' | grep 'Arrived at Node 1.'
Modified: trunk/info/t/dir-file-no-menu.sh
===================================================================
--- trunk/info/t/dir-file-no-menu.sh 2015-05-17 22:15:57 UTC (rev 6277)
+++ trunk/info/t/dir-file-no-menu.sh 2015-05-18 15:31:11 UTC (rev 6278)
@@ -18,5 +18,5 @@
. $srcdir/t/Init-test.inc
# Try to select a non-existent menu item
-GINFO --output - file-menu 'Not an entry' 2>&1 | grep 'No menu item'
+$GINFO --output - file-menu 'Not an entry' 2>&1 | grep 'No menu item'
Modified: trunk/info/t/dir-file-node.sh
===================================================================
--- trunk/info/t/dir-file-node.sh 2015-05-17 22:15:57 UTC (rev 6277)
+++ trunk/info/t/dir-file-node.sh 2015-05-18 15:31:11 UTC (rev 6278)
@@ -20,5 +20,5 @@
# Load a node in loaded file using --node, without using --file to
# specify the desired file.
-GINFO --output - file-menu --node Unreachable \
+$GINFO --output - file-menu --node Unreachable \
| grep 'not linked to elsewhere'
Modified: trunk/info/t/dir-file-sloppily.sh
===================================================================
--- trunk/info/t/dir-file-sloppily.sh 2015-05-17 22:15:57 UTC (rev 6277)
+++ trunk/info/t/dir-file-sloppily.sh 2015-05-18 15:31:11 UTC (rev 6278)
@@ -18,4 +18,4 @@
. $srcdir/t/Init-test.inc
# Follow an reference to "file-menu" in dir without matching label exactly
-GINFO --output - FiLe-M | grep "^File: file-menu,"
+$GINFO --output - FiLe-M | grep "^File: file-menu,"
Modified: trunk/info/t/dir-file.sh
===================================================================
--- trunk/info/t/dir-file.sh 2015-05-17 22:15:57 UTC (rev 6277)
+++ trunk/info/t/dir-file.sh 2015-05-18 15:31:11 UTC (rev 6278)
@@ -18,4 +18,4 @@
. $srcdir/t/Init-test.inc
# Follow a reference to file1 in dir
-GINFO --output - file1
+$GINFO --output - file1
Modified: trunk/info/t/dir-menus-sloppily.sh
===================================================================
--- trunk/info/t/dir-menus-sloppily.sh 2015-05-17 22:15:57 UTC (rev 6277)
+++ trunk/info/t/dir-menus-sloppily.sh 2015-05-18 15:31:11 UTC (rev 6278)
@@ -18,6 +18,6 @@
. $srcdir/t/Init-test.inc
# Follow several menus in a file inexactly to get to desired node
-GINFO --output - file-menu first nod nod \
+$GINFO --output - file-menu first nod nod \
| grep 'Arrived at Node 3.'
Modified: trunk/info/t/dir-no-file.sh
===================================================================
--- trunk/info/t/dir-no-file.sh 2015-05-17 22:15:57 UTC (rev 6277)
+++ trunk/info/t/dir-no-file.sh 2015-05-18 15:31:11 UTC (rev 6278)
@@ -24,4 +24,4 @@
# the dir node, but the former does not output the dir node, just an
# error message.
-GINFO --output - not-a-file 2>&1 | grep 'No menu item'
+$GINFO --output - not-a-file 2>&1 | grep 'No menu item'
Modified: trunk/info/t/dir-nondir.sh
===================================================================
--- trunk/info/t/dir-nondir.sh 2015-05-17 22:15:57 UTC (rev 6277)
+++ trunk/info/t/dir-nondir.sh 2015-05-18 15:31:11 UTC (rev 6278)
@@ -18,4 +18,4 @@
. $srcdir/t/Init-test.inc
# Load a file despite it not being listed in dir.
-GINFO --output - sample | grep "This is a simple Info file."
+$GINFO --output - sample | grep "This is a simple Info file."
Modified: trunk/info/t/dir.sh
===================================================================
--- trunk/info/t/dir.sh 2015-05-17 22:15:57 UTC (rev 6277)
+++ trunk/info/t/dir.sh 2015-05-18 15:31:11 UTC (rev 6278)
@@ -18,4 +18,4 @@
. $srcdir/t/Init-test.inc
# Load top-level dir node
-GINFO --output -
+$GINFO --output -
Modified: trunk/info/t/file-file-with-dot.sh
===================================================================
--- trunk/info/t/file-file-with-dot.sh 2015-05-17 22:15:57 UTC (rev 6277)
+++ trunk/info/t/file-file-with-dot.sh 2015-05-18 15:31:11 UTC (rev 6278)
@@ -18,5 +18,5 @@
. $srcdir/t/Init-test.inc
# Follow a menu in a file where the filename contains a full stop.
-GINFO --output - -f file-menu Target | grep 'File: file1'
+$GINFO --output - -f file-menu Target | grep 'File: file1'
Modified: trunk/info/t/file.sh
===================================================================
--- trunk/info/t/file.sh 2015-05-17 22:15:57 UTC (rev 6277)
+++ trunk/info/t/file.sh 2015-05-18 15:31:11 UTC (rev 6278)
@@ -18,7 +18,7 @@
. $srcdir/t/Init-test.inc
# Check that we can reach a file with --file
-GINFO --file file-menu >$GINFO_OUTPUT
+$GINFO --file file-menu >$GINFO_OUTPUT
# Check that the entire file was dumped, and not just the Top node
grep 'Node: Top' $GINFO_OUTPUT \
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [6278] more attempts at info test suit portability,
Gavin D. Smith <=