Skip to content

Commit

Permalink
bibtex: Make easier to test on Windows
Browse files Browse the repository at this point in the history
git-svn-id: svn://tug.org/texlive/trunk/Build/source@67993 c570f23f-e606-0410-a88d-b1316a301751
  • Loading branch information
t-tk committed Aug 20, 2023
1 parent 9c74339 commit 9e559e7
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 8 deletions.
6 changes: 4 additions & 2 deletions texk/web2c/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
2023-08-20 TANAKA Takuji <ttk@t-lab.opal.ne.jp>

* mftraptest.test,
* triptest.test: Filter Web2C year in banner.
* {mftraptest,triptest}.test:
Filter Web2C year in banner.
* {mftraptest,triptest,bibtex}.test,
tests/{bibtex-{auxinclude,bibauth,mem},tex-closeout}.test:
Make easier to test on Windows.
* Makefile.in: Add tests {,e}uptexdir/wcfname0.test.

Expand Down
8 changes: 6 additions & 2 deletions texk/web2c/bibtex.test
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,20 @@
# Copyright 2009 Peter Breitenlohner <tex-live@tug.org>
# You may freely use, modify and/or distribute this file.

BinDir=${BinDir:-.}
ExeExt=${ExeExt:-}
_bibtex=$BinDir/bibtex$ExeExt

test -d tests || mkdir -p tests
rm -f tests/xexampl.*

./bibtex -version || exit 100
$_bibtex -version || exit 100

cp $srcdir/tests/exampl.aux tests/xexampl.aux

TEXMFCNF=$srcdir/../kpathsea \
BSTINPUTS=$srcdir/tests \
BIBINPUTS=$srcdir/tests \
./bibtex tests/xexampl || exit 1
$_bibtex tests/xexampl || exit 1
diff $srcdir/tests/exampl.bbl tests/xexampl.bbl || exit 2

6 changes: 5 additions & 1 deletion texk/web2c/tests/bibtex-auxinclude.test
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
# Copyright 2018 Karl Berry <tex-live@tug.org>
# You may freely use, modify and/or distribute this file.

BinDir=${BinDir:-.}
ExeExt=${ExeExt:-}
_bibtex=$BinDir/bibtex$ExeExt

test -d tests || mkdir -p tests

# in case we're invoked standalone instead of from make.
Expand All @@ -19,4 +23,4 @@ cp $srcdir/tests/auxinclude2.aux tests/auxinclude2.aux || exit 1
TEXMFCNF=$srcdir/../kpathsea \
BSTINPUTS=$srcdir/tests \
BIBINPUTS=$srcdir/tests \
./bibtex tests/xauxinclude || exit 1
$_bibtex tests/xauxinclude || exit 1
6 changes: 5 additions & 1 deletion texk/web2c/tests/bibtex-bigauth.test
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
# Copyright 2019 Karl Berry <tex-live@tug.org>
# You may freely use, modify and/or distribute this file.

BinDir=${BinDir:-.}
ExeExt=${ExeExt:-}
_bibtex=$BinDir/bibtex$ExeExt

test -d tests || mkdir -p tests

# in case we're invoked standalone instead of from make.
Expand All @@ -21,7 +25,7 @@ cp $srcdir/tests/bibtex-bigauth.aux tests/xbigauth.aux || exit 1
TEXMFCNF=$srcdir/../kpathsea \
BSTINPUTS=$srcdir/../tests/texmf \
BIBINPUTS=$srcdir/tests \
./bibtex tests/xbigauth || exit 1
$_bibtex tests/xbigauth || exit 1

# the final author, in case glob_str_size is insufficient.
grep MeerKAT tests/xbigauth.bbl >/dev/null || exit 1
6 changes: 5 additions & 1 deletion texk/web2c/tests/bibtex-mem.test
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@

# Using test data from Philipp Lehman <lehman@gmx.net>

BinDir=${BinDir:-.}
ExeExt=${ExeExt:-}
_bibtex=$BinDir/bibtex$ExeExt

test -d tests || mkdir -p tests

# Create bib data
Expand Down Expand Up @@ -64,7 +68,7 @@ for t in 1 2 3; do
TEXMFCNF=$srcdir/../kpathsea \
BSTINPUTS=$srcdir/tests \
BIBINPUTS=./tests \
./bibtex tests/memtest$t || exit 1
$_bibtex tests/memtest$t || exit $t

done

6 changes: 5 additions & 1 deletion texk/web2c/tests/tex-closeout.test
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,17 @@
# Copyright 2019 Karl Berry <tex-live@tug.org>
# You may freely use, modify and/or distribute this file.

BinDir=${BinDir:-.}
ExeExt=${ExeExt:-}
_tex=$BinDir/tex$ExeExt

# in case we're invoked standalone instead of from make.
test -z "$srcdir" && srcdir=`cd \`dirname $0\`/.. && pwd` # web2c/
TEXMFCNF=$srcdir/../kpathsea; export TEXMFCNF

# Resulted in a double free with glibc on x86_64-linux.
fail=2
./tex -ini '\batchmode \immediate\openout1=b \openout1=/tmp/a \end'
$_tex -ini '\batchmode \immediate\openout1=b \openout1=/tmp/a \end'

# If TeX crashed, we won't get here. The exit status will be something
# like 134 on GNU/Linux, but we don't want to rely on that.
Expand Down

0 comments on commit 9e559e7

Please sign in to comment.