texinfo-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[6043] more info test fixes


From: Gavin D. Smith
Subject: [6043] more info test fixes
Date: Wed, 14 Jan 2015 21:25:19 +0000

Revision: 6043
          http://svn.sv.gnu.org/viewvc/?view=rev&root=texinfo&revision=6043
Author:   gavin
Date:     2015-01-14 21:25:17 +0000 (Wed, 14 Jan 2015)
Log Message:
-----------
more info test fixes

Modified Paths:
--------------
    trunk/ChangeLog
    trunk/info/Makefile.am
    trunk/info/t/Cleanup.inc
    trunk/info/t/Init-inter.inc
    trunk/info/t/Init-test.inc
    trunk/info/t/Timeout-test.inc

Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog     2015-01-14 20:54:32 UTC (rev 6042)
+++ trunk/ChangeLog     2015-01-14 21:25:17 UTC (rev 6043)
@@ -4,6 +4,11 @@
        include more commands in subshell.  This means the tests at 
        least pass when run in-source.
 
+       * info/t/Init-inter.inc, info/t/Init-test.inc, 
+       info/t/Timeout-test.inc, info/t/Cleanup.inc: Create temporary 
+       files in $builddir.
+       * info/Makefile.am: Distribute info/t/node-target.
+
 2015-01-14  Karl Berry  <address@hidden>
 
        * info/t/Cleanup.inc,

Modified: trunk/info/Makefile.am
===================================================================
--- trunk/info/Makefile.am      2015-01-14 20:54:32 UTC (rev 6042)
+++ trunk/info/Makefile.am      2015-01-14 21:25:17 UTC (rev 6043)
@@ -161,4 +161,4 @@
 EXTRA_DIST += $(TESTS) $(XFAIL_TESTS) \
   t/README t/infodir \
   t/Cleanup.inc t/Init-inter.inc t/Init-test.inc t/Timeout-test.inc \
-  t/Infokey-config
+  t/Infokey-config t/node-target

Modified: trunk/info/t/Cleanup.inc
===================================================================
--- trunk/info/t/Cleanup.inc    2015-01-14 20:54:32 UTC (rev 6042)
+++ trunk/info/t/Cleanup.inc    2015-01-14 21:25:17 UTC (rev 6043)
@@ -17,7 +17,7 @@
 
 # Delete created files and kill spawned processes if any.
 rm -f $GINFO_OUTPUT
-rm -f $0.pipein $0.pipeout
+rm -f $PIPEIN $PIPEOUT
 test $PTY_PID -ne 0 && kill $PTY_PID
 
 if test -n "$TIMED_OUT"; then

Modified: trunk/info/t/Init-inter.inc
===================================================================
--- trunk/info/t/Init-inter.inc 2015-01-14 20:54:32 UTC (rev 6042)
+++ trunk/info/t/Init-inter.inc 2015-01-14 21:25:17 UTC (rev 6043)
@@ -19,21 +19,23 @@
 # Avoid ginfo complaining that terminal is too dumb
 TERM=vt100; export TERM
 
+FINISHEDFIFO=t/`basename $0.finished`
+
 # Create named pipes to communicate with pseudotty program
-rm -f $0.pipein $0.pipeout
-mknod $0.pipein p
-mknod $0.pipeout p
-PTY_TYPE=$0.pipeout
+rm -f $PIPEIN $PIPEOUT
+mknod $PIPEIN p
+mknod $PIPEOUT p
+PTY_TYPE=$PIPEOUT
 
 # We can feed input bytes into $PTY_TYPE to be passed onto ginfo.  pseudotty
 # only reads from fd 3, but opening the pipe read-write means: (i) there will
 # always be a process with it open for writing, so pseudotty will not hang when
 # opening it; and (ii) select() will never return for an end-of-file on fd 3.
-./pseudotty >$0.pipein 3<>$PTY_TYPE &
+./pseudotty >$PIPEIN 3<>$PTY_TYPE &
 PTY_PID=$!
 
 # Get name of pseudo-terminal slave device
-read PTS_DEVICE <$0.pipein
+read PTS_DEVICE <$PIPEIN
 
 # glibc can kill a running process if it detects a condition like a
 # double free.  This specifies that the message it prints when it does
@@ -43,10 +45,10 @@
 
 run_ginfo ()
 {
-  rm -f $0.finished
-  mkfifo $0.finished
-  { $GINFO "$@" ; test $? -eq 0 || echo failure >$0.finished ;
-    echo finished >$0.finished ; } 0<>$PTS_DEVICE 1<&0 &
+  rm -f $FINISHEDFIFO
+  mkfifo $FINISHEDFIFO
+  { $GINFO "$@" ; test $? -eq 0 || echo failure >$FINISHEDFIFO ;
+    echo finished >$FINISHEDFIFO ; } 0<>$PTS_DEVICE 1<&0 &
   SUBSHELL=$!
 
   # Get the PID of the running ginfo process.  Look for a process called

Modified: trunk/info/t/Init-test.inc
===================================================================
--- trunk/info/t/Init-test.inc  2015-01-14 20:54:32 UTC (rev 6042)
+++ trunk/info/t/Init-test.inc  2015-01-14 21:25:17 UTC (rev 6043)
@@ -33,7 +33,12 @@
 
 t=$srcdir/t; export t
 
-GINFO_OUTPUT=`basename $0.out`
+GINFO_OUTPUT=t/`basename $0.out`
+
+# These are only used for interactive tests
+PIPEIN=t/`basename $0.pipein`
+PIPEOUT=t/`basename $0.pipeout`
+
 # Remove left over file from previous tests
 rm -f $GINFO_OUTPUT
 

Modified: trunk/info/t/Timeout-test.inc
===================================================================
--- trunk/info/t/Timeout-test.inc       2015-01-14 20:54:32 UTC (rev 6042)
+++ trunk/info/t/Timeout-test.inc       2015-01-14 21:25:17 UTC (rev 6043)
@@ -18,8 +18,8 @@
 # Not timed out yet
 TIMED_OUT=
 
-read -t 3 FINISHED <>$0.finished
-rm -f $0.finished
+read -t 3 FINISHED <>$FINISHEDFIFO
+rm -f $FINISHEDFIFO
 
 if test "$FINISHED" = failure; then
   echo 'Program exited unsuccessfully' >&2




reply via email to

[Prev in Thread] Current Thread [Next in Thread]