[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
branch master updated: * contrib/nontests/defs.in, contrib/nontests/run_
From: |
Patrice Dumas |
Subject: |
branch master updated: * contrib/nontests/defs.in, contrib/nontests/run_test_utils.sh (TEXI2DVI_run), contrib/nontests/*.test: split nontests/defs.in code independent of configure substitutions to the new file nontests/run_test_utils.sh. Assume that all tex now understands --version. Update TEXI2DVI path. Source defs in run_test_utils.sh only if it is present. Update code to be more Bourne compatible using recent autoconf generated code. Set TEXINDEX and TEXINDEX_SCRIPT in the TEXI2DVI call in TEXI2DVI_run. [...] |
Date: |
Sat, 02 Nov 2024 12:19:04 -0400 |
This is an automated email from the git hooks/post-receive script.
pertusus pushed a commit to branch master
in repository texinfo.
The following commit(s) were added to refs/heads/master by this push:
new e83f9033f1 * contrib/nontests/defs.in,
contrib/nontests/run_test_utils.sh (TEXI2DVI_run), contrib/nontests/*.test:
split nontests/defs.in code independent of configure substitutions to the new
file nontests/run_test_utils.sh. Assume that all tex now understands
--version. Update TEXI2DVI path. Source defs in run_test_utils.sh only if it
is present. Update code to be more Bourne compatible using recent autoconf
generated code. Set TEXINDEX and TEXINDEX_SCRIPT in the TEXI2DVI [...]
e83f9033f1 is described below
commit e83f9033f1be1559d6bb36397fc1485cdcdbe3be
Author: Patrice Dumas <pertusus@free.fr>
AuthorDate: Sat Nov 2 17:16:45 2024 +0100
* contrib/nontests/defs.in, contrib/nontests/run_test_utils.sh
(TEXI2DVI_run), contrib/nontests/*.test: split nontests/defs.in code
independent of configure substitutions to the new file
nontests/run_test_utils.sh. Assume that all tex now understands
--version. Update TEXI2DVI path. Source defs in run_test_utils.sh
only if it is present. Update code to be more Bourne compatible using
recent autoconf generated code. Set TEXINDEX and TEXINDEX_SCRIPT in
the TEXI2DVI call in TEXI2DVI_run. Determine srcdir in each test
files and source run_test_utils.sh only.
* contrib/nontests/run_test_utils.sh (create_input_texi)
(create_input_empty_texi), contrib/nontests/texi2dvi_no_content.test,
contrib/nontests/texi2dvi.test (one_run): rename create_input_texi as
create_input_empty_texi and readd create_input_texi such that it
outputs a minimal manual instead of a manual without content. Add
texi2dvi_no_content.test that calls create_input_empty_texi. Add
an index entry in one_run.
* contrib/nontests/test_all.sh: run all the *.test tests.
---
.gitignore | 4 +
ChangeLog | 22 ++
contrib/nontests/bibtex.test | 10 +-
contrib/nontests/defs.in | 334 +--------------------
contrib/nontests/dvipdf.test | 10 +-
contrib/nontests/local.test | 10 +-
contrib/nontests/{defs.in => run_test_utils.sh} | 122 ++++----
contrib/nontests/test_all.sh | 25 ++
contrib/nontests/texi2dvi.test | 17 +-
.../{texi2dvi.test => texi2dvi_no_content.test} | 42 ++-
10 files changed, 180 insertions(+), 416 deletions(-)
diff --git a/.gitignore b/.gitignore
index cbbddaf3d5..2167ccec55 100644
--- a/.gitignore
+++ b/.gitignore
@@ -413,6 +413,10 @@ contrib/mass_test/normalized
contrib/mass_test/perl_HTML_refs
contrib/mass_test/result_check_perlVSC
+contrib/nontests/logs
+contrib/nontests/testSubDir
+contrib/nontests/tmpdir_txitextest
+
js/build-aux/install-sh
js/build-aux/missing
js/examples/hello-html
diff --git a/ChangeLog b/ChangeLog
index 391bc2a466..d93fe6751b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,25 @@
+2024-11-02 Patrice Dumas <pertusus@free.fr>
+
+ * contrib/nontests/defs.in, contrib/nontests/run_test_utils.sh
+ (TEXI2DVI_run), contrib/nontests/*.test: split nontests/defs.in code
+ independent of configure substitutions to the new file
+ nontests/run_test_utils.sh. Assume that all tex now understands
+ --version. Update TEXI2DVI path. Source defs in run_test_utils.sh
+ only if it is present. Update code to be more Bourne compatible using
+ recent autoconf generated code. Set TEXINDEX and TEXINDEX_SCRIPT in
+ the TEXI2DVI call in TEXI2DVI_run. Determine srcdir in each test
+ files and source run_test_utils.sh only.
+
+ * contrib/nontests/run_test_utils.sh (create_input_texi)
+ (create_input_empty_texi), contrib/nontests/texi2dvi_no_content.test,
+ contrib/nontests/texi2dvi.test (one_run): rename create_input_texi as
+ create_input_empty_texi and readd create_input_texi such that it
+ outputs a minimal manual instead of a manual without content. Add
+ texi2dvi_no_content.test that calls create_input_empty_texi. Add
+ an index entry in one_run.
+
+ * contrib/nontests/test_all.sh: run all the *.test tests.
+
2024-11-02 Gavin Smith <gavinsmith0123@gmail.com>
* doc/texinfo.tex (\nolig): Add brace pair after 0pt to avoid
diff --git a/contrib/nontests/bibtex.test b/contrib/nontests/bibtex.test
index 465f8d5cf4..c548eec68e 100755
--- a/contrib/nontests/bibtex.test
+++ b/contrib/nontests/bibtex.test
@@ -16,7 +16,15 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-. ./defs || exit 1
+# If srcdir is not set, then we are not running from `make check', be verbose.
+if test -z "$srcdir"; then
+ VERBOSE=x
+ # compute $srcdir.
+ srcdir=`echo "$0" | sed -e 's,/[^\\/]*$,,'`
+ test $srcdir = $0 && srcdir=.
+fi
+
+. ${srcdir}/run_test_utils.sh || exit 1
set -e
diff --git a/contrib/nontests/defs.in b/contrib/nontests/defs.in
index 971fcec8ff..a5629511f9 100644
--- a/contrib/nontests/defs.in
+++ b/contrib/nontests/defs.in
@@ -18,342 +18,12 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-# Defines for Automake testing environment.
-# Tom Tromey <tromey@cygnus.com>
-
-# Be Bourne compatible.
-# (Snippet copied from configure's initialization in Autoconf 2.57.)
-if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
- emulate sh
- NULLCMD=:
- # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
- # is contrary to our usage. Disable this feature.
- alias -g '${1+"$@"}'='"$@"'
-elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
- set -o posix
-fi
-
-# Ensure we are running from the right directory.
-test -f ./defs || {
- echo "defs: not found in current directory" 1>&2
- exit 1
-}
-
-# If srcdir is not set, then we are not running from `make check', be verbose.
-if test -z "$srcdir"; then
- VERBOSE=x
- # compute $srcdir.
- srcdir=`echo "$0" | sed -e 's,/[^\\/]*$,,'`
- test $srcdir = $0 && srcdir=.
-fi
-
-# Ensure $srcdir is set correctly.
-test -f $srcdir/defs.in || {
- echo "$srcdir/defs.in not found, check \$srcdir" 1>&2
- exit 1
-}
-
-me=`echo "$0" | sed -e 's,.*[\\/],,;s/\.test$//'`
-
-# See how redirections should work. User can set VERBOSE to see all
-# output.
-test -z "$VERBOSE" && {
- exec > /dev/null 2>&1
-}
-
# Make sure we override the user shell.
SHELL='@SHELL@'
export SHELL
-srcdir_abs=`cd $srcdir && pwd`
-test -z "$TEXI2DVI" && TEXI2DVI=$srcdir_abs/texi2dvi
-
-# be sure we use texi2dvi and texindex from our own directory, not
-# whatever happens to be in the path.
-echo "defs: prepending $srcdir_abs to PATH for testing."
-PATH="@abs_builddir@:@abs_srcdir@:$PATH"
-
-# Some shells forget to export modified environment variables.
-# (See note about `export' in the Autoconf manual.)
-export PATH
-
-# User can override various tools used.
-test -z "$PERL" && PERL='@PERL@'
-
-if test -n "$required"
-then
- for tool in $required
- do
- # Check that each required tool is present.
- case $tool in
- tex)
- # No all versions of Tex support `--version', so we use
- # a configure check.
- test -n "@TEX@" || exit 77
- ;;
- # Generic case: the tool must support --version.
- *)
- echo "$me: running $tool --version"
- ( $tool --version ) || exit 77
- ;;
- esac
- done
-fi
-
-
-# Always use an absolute srcdir. Otherwise symlinks made in subdirs
-# of the test dir just won't work.
-case "$srcdir" in
- [\\/]* | ?:[\\/]*)
- ;;
-
- *)
- srcdir=`CDPATH=: && cd "$srcdir" && pwd`
- ;;
-esac
-
-chmod -R a+rwx testSubDir > /dev/null 2>&1
-rm -rf testSubDir > /dev/null 2>&1
-mkdir testSubDir
-
-# Copy in some files we need.
-cp $srcdir/../doc/texinfo.tex testSubDir || exit 1
-
-cd ./testSubDir
-
-
-# Unset the user's envvars that might change the behavior.
-unset TEXI2DVI_BUILD_MODE
-unset TEXI2DVI_BUILD_DIRECTORY
-
-echo "=== Running test $0"
-
# POSIX no longer requires 'egrep' and 'fgrep',
# but some hosts lack 'grep -E' and 'grep -F'.
-EGREP='@EGREP@'
-FGREP='@FGREP@'
-
-# The amount we should wait after modifying files depends on the platform.
-# For instance, Windows '95, '98 and ME have 2-second granularity
-# and can be up to 3 seconds in the future w.r.t. the system clock.
-sleep='sleep @MODIFICATION_DELAY@'
-
-# The tests call `make -e' but we do not want $srcdir from the environment
-# to override the definition from the Makefile.
-testsrcdir=$srcdir
-unset srcdir
-
-
-# create_input_texi < INPUT
-# -------------------------
-# Create input.texi adding stdin inside a default prologue/epilogue
-create_input_texi ()
-{
- {
- cat << END
-\input texinfo @c -*-texinfo-*-
-@setfilename input
-@settitle input
-
-@ifnottex
-@node Top
-@top input
-@end ifnottex
-
-END
- cat
- cat << END
-@bye
-END
- } >input.texi
-}
-
-
-# create_input_tex < INPUT
-# ------------------------
-# Create input.tex adding stdin inside a default prologue/epilogue
-create_input_tex ()
-{
- {
- cat << END
-\documentclass{article}
-
-\begin{document}
-END
- cat
- cat << END
-\end{document}
-END
- } >input.tex
-}
-
-
-# TEXI2DVI_run status [options...]
-# --------------------------------
-# Run texi2dvi with OPTIONS, and fail if does not exit with STATUS.
-TEXI2DVI_run ()
-{
- expected_exitcode=$1
- shift
- exitcode=0
- if test -n "$VERBOSE"; then
- set x --debug --verbose ${1+"$@"}
- shift
- fi
- texi2dvi ${1+"$@"} 2>stderr >stdout || exitcode=$?
- cat stderr
- cat stdout
- test $exitcode = $expected_exitcode || exit 1
-}
-
-
-# TEXI2DVI_fail [options...]
-# ---------------------------
-# Run texi2dvi with OPTIONS, and fail if does not exit with failure.
-TEXI2DVI_fail ()
-{
- TEXI2DVI_run 1 ${1+"$@"}
-}
-
-
-# TEXI2DVI_pass [options...]
-# ---------------------------
-# Run texi2dvi with OPTIONS, and fail if does not exit with failure.
-TEXI2DVI_pass ()
-{
- TEXI2DVI_run 0 ${1+"$@"}
-}
-
-
-# optionset_get N OPTIONSET<1> -- OPTIONSET<2> -- ...
-# ---------------------------------------------------
-# Return OPTIONSET<N>
-optionset_get ()
-{
- n=$1
- shift
- # Find the optionset.
- while test $n != 1; do
- case $1 in
- --) n=`expr $n - 1`;;
- esac
- shift
- done
- # Return the optionset.
- while true; do
- case $#:$1 in
- 0:) break;;
- *:--) shift; break;;
- *) echo "$1"; shift;;
- esac
- done
-}
-
-# list_files ()
-# -------------
-# Return the sorted list of files in this directory, except the "invisible"
ones.
-list_files ()
-{
- for f in *
- do
- case $f in
- texinfo.tex | stdout | stderr | ls.expected | ls.value );;
- *) echo $f;;
- esac
- done | sort
-}
-
-
-# assert_files (EXPECTED-FILES)
-# -----------------------------
-# Only those files are valid in the current directory.
-assert_files ()
-{
- if test -n "$VERBOSE"; then
- ls
- fi
- list_files > ls.value
- echo "$*" | tr ' ' '\n' | sort > ls.expected
- diff -u ls.expected ls.value
-}
-
-
-# assert_and_remove_files (EXPECTED-FILES)
-# ----------------------------------------
-# Only those files are valid in the current directory. Remove them
-# afterwards.
-assert_and_remove_files ()
-{
- assert_files "$@"
- rm -rf "$@"
-}
-
-
-# title TITLE...
-# --------------
-# Make a huge title to ease the reading of the output.
-title ()
-{
- (
- set +x
- echo " $@ " | sed -e 's/./=/g'
- echo " $@ "
- echo " $@ " | sed -e 's/./=/g'
- )
-}
-
-# $latex_paragraph
-# ----------------
-# Some lengthy LaTeX.
-# grep -E '^[a-zA-Z]+$' /usr/share/dict/words | sed 200q | pr --page-width=76
--column=5 --omit-header
-latex_paragraph='
-A Acrux Aegean Ahmad Albany
-AOL Actaeon Aelfric Ahmadabad Albee
-Aachen Acton Aeneas Ahmed Alberio
-Aaliyah Acts Aeneid Ahriman Albert
-Aaron Acuff Aeolus Aida Alberta
-Abbas Ada Aeroflot Aiken Alberto
-Abbasid Adam Aeschylus Aileen Albigensian
-Abbott Adams Aesculapius Aimee Albion
-Abby Adan Aesop Ainu Albireo
-Abdul Adana Afghan Airedale Albuquerque
-Abe Adar Afghanistan Airedales Alcatraz
-Abel Addams Afghans Aisha Alcestis
-Abelard Adderley Africa Ajax Alcibiades
-Abelson Addie African Akbar Alcmena
-Aberdeen Addison Africans Akhmatova Alcoa
-Abernathy Adela Afrikaans Akihito Alcott
-Abidjan Adelaide Afrikaner Akita Alcuin
-Abigail Adele Afrikaners Akkad Alcyone
-Abilene Adeline Afro Akron Aldan
-Abner Aden Afrocentrism Al Aldebaran
-Abraham Adenauer Afros Ala Alden
-Abram Adhara Ag Alabama Alderamin
-Abrams Adidas Agamemnon Alabaman Aldo
-Absalom Adirondack Agassi Alabamans Aldrin
-Abuja Adirondacks Agassiz Alabamian Alec
-Abyssinia Adkins Agatha Alabamians Aleichem
-Abyssinian Adler Aggie Aladdin Alejandra
-Ac Adolf Aglaia Alamo Alejandro
-Acadia Adolfo Agnes Alamogordo Alembert
-Acapulco Adolph Agnew Alan Aleppo
-Accra Adonis Agni Alana Aleut
-Acevedo Adonises Agra Alar Aleutian
-Achaean Adrian Agricola Alaric Alex
-Achebe Adriana Agrippa Alaska Alexander
-Achernar Adriatic Agrippina Alaskan Alexandra
-Acheson Adrienne Aguilar Alaskans Alexandria
-Achilles Advent Aguinaldo Alba Alexei
-Aconcagua Adventist Aguirre Albania Alexis
-Acosta Advents Agustin Albanian Alfonso
-Acropolis Advil Ahab Albanians Alfonzo
-'
-
+#EGREP='@EGREP@'
+#FGREP='@FGREP@'
-# Turn on shell traces when VERBOSE is set.
-if test -n "$VERBOSE"; then
- set -x
-else
- :
-fi
-pwd
diff --git a/contrib/nontests/dvipdf.test b/contrib/nontests/dvipdf.test
index f66375be55..0224d009ab 100755
--- a/contrib/nontests/dvipdf.test
+++ b/contrib/nontests/dvipdf.test
@@ -18,7 +18,15 @@
required='tex'
-. ./defs || exit 1
+# If srcdir is not set, then we are not running from `make check', be verbose.
+if test -z "$srcdir"; then
+ VERBOSE=x
+ # compute $srcdir.
+ srcdir=`echo "$0" | sed -e 's,/[^\\/]*$,,'`
+ test $srcdir = $0 && srcdir=.
+fi
+
+. ${srcdir}/run_test_utils.sh || exit 1
set -e
diff --git a/contrib/nontests/local.test b/contrib/nontests/local.test
index ff4aa7928a..396a96f3ca 100755
--- a/contrib/nontests/local.test
+++ b/contrib/nontests/local.test
@@ -19,7 +19,15 @@
# Make sure no "local" variable identifier is used twice, since
# local is not actually portable.
-. ./defs || exit 1
+# If srcdir is not set, then we are not running from `make check', be verbose.
+if test -z "$srcdir"; then
+ VERBOSE=x
+ # compute $srcdir.
+ srcdir=`echo "$0" | sed -e 's,/[^\\/]*$,,'`
+ test $srcdir = $0 && srcdir=.
+fi
+
+. ${srcdir}/run_test_utils.sh || exit 1
set -e
diff --git a/contrib/nontests/defs.in b/contrib/nontests/run_test_utils.sh
similarity index 80%
copy from contrib/nontests/defs.in
copy to contrib/nontests/run_test_utils.sh
index 971fcec8ff..011f6955b6 100644
--- a/contrib/nontests/defs.in
+++ b/contrib/nontests/run_test_utils.sh
@@ -1,5 +1,4 @@
# -*- shell-script -*-
-# @configure_input@
#
# Copyright (C) 1996-2023 Free Software Foundation, Inc.
#
@@ -18,33 +17,36 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-# Defines for Automake testing environment.
+# Based on defines for Automake testing environment.
# Tom Tromey <tromey@cygnus.com>
-# Be Bourne compatible.
-# (Snippet copied from configure's initialization in Autoconf 2.57.)
-if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+# Be more Bourne compatible.
+# (Snippet copied from configure's initialization in Autoconf 2.72.)
+DUALCASE=1; export DUALCASE # for MKS sh
+if test ${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1
+then :
emulate sh
NULLCMD=:
- # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
+ # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
# is contrary to our usage. Disable this feature.
alias -g '${1+"$@"}'='"$@"'
-elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
- set -o posix
+ setopt NO_GLOB_SUBST
+else case e in #(
+ e) case `(set -o) 2>/dev/null` in #(
+ *posix*) :
+ set -o posix ;; #(
+ *) :
+ ;;
+esac ;;
+esac
fi
-# Ensure we are running from the right directory.
-test -f ./defs || {
- echo "defs: not found in current directory" 1>&2
- exit 1
-}
-
-# If srcdir is not set, then we are not running from `make check', be verbose.
-if test -z "$srcdir"; then
- VERBOSE=x
- # compute $srcdir.
- srcdir=`echo "$0" | sed -e 's,/[^\\/]*$,,'`
- test $srcdir = $0 && srcdir=.
+if test -f ./defs ; then
+ . ./defs
+#else
+# # Ensure we are running from the right directory.
+# echo "defs: not found in current directory" 1>&2
+# exit 1
fi
# Ensure $srcdir is set correctly.
@@ -55,30 +57,22 @@ test -f $srcdir/defs.in || {
me=`echo "$0" | sed -e 's,.*[\\/],,;s/\.test$//'`
+if test z"$EGREP" = z ; then
+ EGREP='grep -e'
+fi
+
+if test z"$FGREP" = z ; then
+ FGREP='grep -f'
+fi
+
# See how redirections should work. User can set VERBOSE to see all
# output.
test -z "$VERBOSE" && {
exec > /dev/null 2>&1
}
-# Make sure we override the user shell.
-SHELL='@SHELL@'
-export SHELL
-
srcdir_abs=`cd $srcdir && pwd`
-test -z "$TEXI2DVI" && TEXI2DVI=$srcdir_abs/texi2dvi
-
-# be sure we use texi2dvi and texindex from our own directory, not
-# whatever happens to be in the path.
-echo "defs: prepending $srcdir_abs to PATH for testing."
-PATH="@abs_builddir@:@abs_srcdir@:$PATH"
-
-# Some shells forget to export modified environment variables.
-# (See note about `export' in the Autoconf manual.)
-export PATH
-
-# User can override various tools used.
-test -z "$PERL" && PERL='@PERL@'
+test -z "$TEXI2DVI" && TEXI2DVI=$srcdir_abs/../../util/texi2dvi
if test -n "$required"
then
@@ -86,11 +80,6 @@ then
do
# Check that each required tool is present.
case $tool in
- tex)
- # No all versions of Tex support `--version', so we use
- # a configure check.
- test -n "@TEX@" || exit 77
- ;;
# Generic case: the tool must support --version.
*)
echo "$me: running $tool --version"
@@ -112,12 +101,16 @@ case "$srcdir" in
;;
esac
+abs_top_builddir=`CDPATH=: && cd . && pwd`/../..
+
chmod -R a+rwx testSubDir > /dev/null 2>&1
rm -rf testSubDir > /dev/null 2>&1
mkdir testSubDir
# Copy in some files we need.
-cp $srcdir/../doc/texinfo.tex testSubDir || exit 1
+cp $srcdir/../../doc/texinfo.tex testSubDir || exit 1
+
+unset srcdir
cd ./testSubDir
@@ -128,21 +121,6 @@ unset TEXI2DVI_BUILD_DIRECTORY
echo "=== Running test $0"
-# POSIX no longer requires 'egrep' and 'fgrep',
-# but some hosts lack 'grep -E' and 'grep -F'.
-EGREP='@EGREP@'
-FGREP='@FGREP@'
-
-# The amount we should wait after modifying files depends on the platform.
-# For instance, Windows '95, '98 and ME have 2-second granularity
-# and can be up to 3 seconds in the future w.r.t. the system clock.
-sleep='sleep @MODIFICATION_DELAY@'
-
-# The tests call `make -e' but we do not want $srcdir from the environment
-# to override the definition from the Makefile.
-testsrcdir=$srcdir
-unset srcdir
-
# create_input_texi < INPUT
# -------------------------
@@ -155,6 +133,31 @@ create_input_texi ()
@setfilename input
@settitle input
+@node Top
+@top input
+
+@node chap
+@chapter chap
+
+END
+ cat
+ cat << END
+@bye
+END
+ } >input.texi
+}
+
+# create_input_empty_texi < INPUT
+# -------------------------
+# Create input.texi adding stdin inside a prologue/epilogue without contents
+create_input_empty_texi ()
+{
+ {
+ cat << END
+\input texinfo @c -*-texinfo-*-
+@setfilename input
+@settitle input
+
@ifnottex
@node Top
@top input
@@ -168,7 +171,6 @@ END
} >input.texi
}
-
# create_input_tex < INPUT
# ------------------------
# Create input.tex adding stdin inside a default prologue/epilogue
@@ -200,7 +202,7 @@ TEXI2DVI_run ()
set x --debug --verbose ${1+"$@"}
shift
fi
- texi2dvi ${1+"$@"} 2>stderr >stdout || exitcode=$?
+ TEXINDEX=$abs_top_builddir/texindex/texindex
TEXINDEX_SCRIPT=$srcdir_abs/texindex/texindex.awk $TEXI2DVI ${1+"$@"} 2>stderr
>stdout || exitcode=$?
cat stderr
cat stdout
test $exitcode = $expected_exitcode || exit 1
diff --git a/contrib/nontests/test_all.sh b/contrib/nontests/test_all.sh
new file mode 100755
index 0000000000..a388932a0a
--- /dev/null
+++ b/contrib/nontests/test_all.sh
@@ -0,0 +1,25 @@
+#! /bin/sh
+
+set -e
+#set -x
+
+if test "z$srcdir" = z ; then
+ srcdir=.
+fi
+
+mkdir -p logs
+
+status=0
+for test_file in $srcdir/*.test; do
+ bfile=`echo "$test_file" | sed -e 's,.*[\\/],,;s/\.test$//'`
+ if $test_file > logs/${bfile}.log 2>&1 ; then
+ error=0
+ else
+ error=1
+ fi
+ echo "$bfile: $error"
+ # if the result is 0, expr exists with a non 0 status, hence the || true
+ status=`expr $status + $error` || true
+done
+
+exit $status
diff --git a/contrib/nontests/texi2dvi.test b/contrib/nontests/texi2dvi.test
index 2f3f075169..cbdeb9e753 100755
--- a/contrib/nontests/texi2dvi.test
+++ b/contrib/nontests/texi2dvi.test
@@ -18,7 +18,15 @@
required='tex'
-. ./defs || exit 1
+# If srcdir is not set, then we are not running from `make check', be verbose.
+if test -z "$srcdir"; then
+ VERBOSE=x
+ # compute $srcdir.
+ srcdir=`echo "$0" | sed -e 's,/[^\\/]*$,,'`
+ test $srcdir = $0 && srcdir=.
+fi
+
+. ${srcdir}/run_test_utils.sh || exit 1
set -e
@@ -31,6 +39,7 @@ one_run ()
# Use @foo to check that -t works properly.
echo "@foo" | create_input_texi
TEXI2DVI_pass $(optionset_get 1 "$@") \
+ -t '@cindex entry' \
-t '@macro foo' \
-t 'Foo' \
-t '@end macro' \
@@ -41,14 +50,12 @@ one_run ()
one_run --batch \
-- \
- input.aux input.cp input.dvi input.fn input.ky input.log \
- input.pg input.tp input.vr
+ input.aux input.dvi input.log input.cp input.cps input.toc
one_run --batch -o output.dvi \
-- \
- input.aux input.cp input.fn input.ky input.log \
- input.pg input.tp input.vr output.dvi
+ input.aux input.log output.dvi input.cp input.cps input.toc
# Testing the clean build mode.
diff --git a/contrib/nontests/texi2dvi.test
b/contrib/nontests/texi2dvi_no_content.test
similarity index 65%
copy from contrib/nontests/texi2dvi.test
copy to contrib/nontests/texi2dvi_no_content.test
index 2f3f075169..1a309235e8 100755
--- a/contrib/nontests/texi2dvi.test
+++ b/contrib/nontests/texi2dvi_no_content.test
@@ -18,18 +18,27 @@
required='tex'
-. ./defs || exit 1
+# If srcdir is not set, then we are not running from `make check', be verbose.
+if test -z "$srcdir"; then
+ VERBOSE=x
+ # compute $srcdir.
+ srcdir=`echo "$0" | sed -e 's,/[^\\/]*$,,'`
+ test $srcdir = $0 && srcdir=.
+fi
+
+. ${srcdir}/run_test_utils.sh || exit 1
set -e
-# one_run ARGS -- FILES
+# one_empty_texi_run ARGS -- FILES
# ---------------------
-# Run texi2dvi with ARGS, expect the FILES to be left. Remove them.
-one_run ()
+# Run texi2dvi with ARGS on a texi file without content, expect the FILES
+# to be left. Remove them.
+one_empty_texi_run ()
{
# Testing the local build mode.
# Use @foo to check that -t works properly.
- echo "@foo" | create_input_texi
+ echo "@foo" | create_input_empty_texi
TEXI2DVI_pass $(optionset_get 1 "$@") \
-t '@macro foo' \
-t 'Foo' \
@@ -39,31 +48,31 @@ one_run ()
assert_and_remove_files $(optionset_get 2 "$@") input.texi
}
-one_run --batch \
+one_empty_texi_run --batch \
-- \
- input.aux input.cp input.dvi input.fn input.ky input.log \
- input.pg input.tp input.vr
+ input.dvi input.log
-one_run --batch -o output.dvi \
+one_empty_texi_run --batch -o output.dvi \
-- \
- input.aux input.cp input.fn input.ky input.log \
- input.pg input.tp input.vr output.dvi
+ input.log output.dvi
+if false ; then
# Testing the clean build mode.
for mode in --clean --build=clean
do
# There should only be the DVI and the TEXI file.
- one_run $mode --batch -- input.dvi
+ one_empty_texi_run $mode --batch -- input.dvi
# There should only be the DVI and the TEXI file.
- one_run $mode --batch -o output.dvi -- output.dvi
+ one_empty_texi_run $mode --batch -o output.dvi -- output.dvi
done
+fi
# Testing the tidy build mode.
-one_run --build=tidy --batch -o output.dvi \
+one_empty_texi_run --build=tidy --batch -o output.dvi \
-- \
output.dvi output.t2d
@@ -71,7 +80,7 @@ one_run --build=tidy --batch -o output.dvi \
# mostly-clean should remove auxiliary files, but not the expected
# output.
touch output.dvi
-one_run --build=tidy --batch -o output.dvi --mostly-clean \
+one_empty_texi_run --build=tidy --batch -o output.dvi --mostly-clean \
-- \
output.dvi
@@ -79,6 +88,7 @@ one_run --build=tidy --batch -o output.dvi --mostly-clean \
# There should only be the DVI and the TEXI file.
create_input_texi </dev/null
cp input.texi input2.texi
-one_run --clean --batch input.texi input2.texi \
+one_empty_texi_run --clean --batch input.texi input2.texi \
-- \
input2.dvi input2.texi input.dvi
+
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- branch master updated: * contrib/nontests/defs.in, contrib/nontests/run_test_utils.sh (TEXI2DVI_run), contrib/nontests/*.test: split nontests/defs.in code independent of configure substitutions to the new file nontests/run_test_utils.sh. Assume that all tex now understands --version. Update TEXI2DVI path. Source defs in run_test_utils.sh only if it is present. Update code to be more Bourne compatible using recent autoconf generated code. Set TEXINDEX and TEXINDEX_SCRIPT in the TEXI2DVI call in TEXI2DVI_run. [...],
Patrice Dumas <=