[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[5449] use per-test temporary files
From: |
Gavin D. Smith |
Subject: |
[5449] use per-test temporary files |
Date: |
Tue, 15 Apr 2014 14:56:44 +0000 |
Revision: 5449
http://svn.sv.gnu.org/viewvc/?view=rev&root=texinfo&revision=5449
Author: gavin
Date: 2014-04-15 14:56:41 +0000 (Tue, 15 Apr 2014)
Log Message:
-----------
use per-test temporary files
Modified Paths:
--------------
trunk/ChangeLog
trunk/info/t/Cleanup.inc
trunk/info/t/Init-intera.inc
trunk/info/t/Init-test.inc
trunk/info/t/index.sh
trunk/info/t/tab.sh
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2014-04-14 17:01:03 UTC (rev 5448)
+++ trunk/ChangeLog 2014-04-15 14:56:41 UTC (rev 5449)
@@ -1,3 +1,9 @@
+2014-04-15 Gavin Smith <address@hidden>
+
+ * info/t/Cleanup.inc, info/t/Init-intera.inc, info/t/Init-test.inc,
+ info/t/index.sh, info/t/tab.sh: Use temporary files based on name
+ of test.
+
2014-04-14 Gavin Smith <address@hidden>
* indices.c (info_indices_of_file_buffer): Don't consider anchors
Modified: trunk/info/t/Cleanup.inc
===================================================================
--- trunk/info/t/Cleanup.inc 2014-04-14 17:01:03 UTC (rev 5448)
+++ trunk/info/t/Cleanup.inc 2014-04-15 14:56:41 UTC (rev 5449)
@@ -1,8 +1,7 @@
# Cleanup and exit.
# Delete created files and kill spawned processes if any.
-rm -f t/ginfo-output
-rm -f pty_file
+rm -f $GINFO_OUTPUT
test $PTY_PID -ne 0 && kill $PTY_PID
exit $RETVAL
Modified: trunk/info/t/Init-intera.inc
===================================================================
--- trunk/info/t/Init-intera.inc 2014-04-14 17:01:03 UTC (rev 5448)
+++ trunk/info/t/Init-intera.inc 2014-04-15 14:56:41 UTC (rev 5449)
@@ -1,13 +1,16 @@
-# Initialize test of interactive operation
+# Initialize test of interactive operation
+# This file is not to be run directly
# Code to redirect output to pseudoterminal
# We could perhaps use AM_TESTS_FD_REDIRECT in Makefile.am instead,
# although this would stop us from running test scripts from the command-line.
-rm -f pty_file
-./pseudotty >pty_file &
+GINFO_PTY_FILE=$0.pty
+rm -f $GINFO_PTY_FILE
+./pseudotty >$GINFO_PTY_FILE &
PTY_PID=$!
# Wait for pseudotty process to create file
-while test ! -f pty_file; do sleep 1; done
-exec >"$(cat pty_file | tr -d '\n')"
+while test ! -f $GINFO_PTY_FILE; do sleep 1; done
+exec >"$(cat $GINFO_PTY_FILE | tr -d '\n')"
+rm -f $GINFO_PTY_FILE
Modified: trunk/info/t/Init-test.inc
===================================================================
--- trunk/info/t/Init-test.inc 2014-04-14 17:01:03 UTC (rev 5448)
+++ trunk/info/t/Init-test.inc 2014-04-15 14:56:41 UTC (rev 5449)
@@ -1,5 +1,5 @@
-# Set up test environment. This file is not to be run directly, but to
-# be sourced by the other tests.
+# Set up test environment
+# This file is not to be run directly
# Allow running with "make check" and individual tests at the command-line
srcdir=${srcdir:-.}
@@ -10,13 +10,12 @@
export infodir=$srcdir/t/infodir
export INFOPATH=$infodir
-# Dump nodes with M-x print-node
-# TODO: Use different output files in each test to allow running them
-# in parallel.
-export INFO_PRINT_COMMAND='>t/ginfo-output'
+GINFO_OUTPUT=$0.out
+# Remove left over file from previous tests
+rm -f $GINFO_OUTPUT
-# Remove any accidentally left over files from previous tests
-rm -f t/ginfo-output
+# File to dump nodes to with M-x print-node
+export INFO_PRINT_COMMAND=">$GINFO_OUTPUT"
# Not an interactive test
PTY_PID=0
Modified: trunk/info/t/index.sh
===================================================================
--- trunk/info/t/index.sh 2014-04-14 17:01:03 UTC (rev 5448)
+++ trunk/info/t/index.sh 2014-04-15 14:56:41 UTC (rev 5449)
@@ -21,9 +21,9 @@
$GINFO -f intera --restore t/index.drib
-test -f t/ginfo-output || exit 1
+test -f $GINFO_OUTPUT || exit 1
# Return non-zero (test failure) if files differ
-diff t/ginfo-output t/node-target
+diff $GINFO_OUTPUT t/node-target
RETVAL=$?
. t/Cleanup.inc
Modified: trunk/info/t/tab.sh
===================================================================
--- trunk/info/t/tab.sh 2014-04-14 17:01:03 UTC (rev 5448)
+++ trunk/info/t/tab.sh 2014-04-15 14:56:41 UTC (rev 5449)
@@ -20,9 +20,9 @@
# Tab to first link and follow it
$GINFO -f intera --restore t/tab.drib
-test -f t/ginfo-output || exit 1
+test -f $GINFO_OUTPUT || exit 1
# Return non-zero (test failure) if files differ
-diff t/ginfo-output t/node-target
+diff $GINFO_OUTPUT t/node-target
RETVAL=$?
. t/Cleanup.inc
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [5449] use per-test temporary files,
Gavin D. Smith <=