From c1ba9eebfec87d10efaa4473b5170570651303f5 Mon Sep 17 00:00:00 2001 From: Richard Kimberly Heck Date: Wed, 2 Dec 2020 21:46:52 -0500 Subject: [PATCH] Update test script. --- runtest.sh | 47 ++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 38 insertions(+), 9 deletions(-) diff --git a/runtest.sh b/runtest.sh index 2b48e18adb..37bc50ebd9 100644 --- a/runtest.sh +++ b/runtest.sh @@ -1,16 +1,45 @@ #!/bin/bash -rm Math-Cleanup.tex -/cvs/lyx/lyx-devel/build/bin/lyx2.4 -E pdflatex /cvs/lyx/lyx-devel/Math-Cleanup.tex lib/doc/Math.lyx -if [ ! -f Math-Cleanup.tex ]; then - echo "Export failed!"; +RESULTS="/cvs/lyx/test/"; +BIN="/cvs/lyx/lyx-devel/build/bin/lyx2.4"; +USERDIR="~/dev/lyxdirs/lyxsvn/"; +TESTS="/cvs/lyx/lyx-devel/autotests/mathmacros"; + +rm $RESULTS/Math-Test.tex +$BIN -userdir $USERDIR -E pdflatex $RESULTS/Math-Test.tex lib/doc/Math.lyx +if [ ! -f $RESULTS/Math-Test.tex ]; then + echo "Export of Math.lyx failed!"; exit 1; fi -if diff -q Math-Master.tex Math-Cleanup.tex; then - echo "No differences in LaTeX output!"; +if diff -q $RESULTS/Math.tex $RESULTS/Math-Test.tex; then + echo "No differences in LaTeX output for Math.lyx!"; else - echo "Differences in LaTeX output! Enter to see them...."; - pause - diff -u Math-Master.tex Math-Cleanup.tex + echo "Differences in LaTeX output for Math.lyx! Enter to see them...."; + read + diff -u $RESULTS/Math.tex $RESULTS/Math-Test.tex; + exit; fi + +for FIL in \ + architecture \ + masterOfSpace \ + testcases_basic \ + testcases_environments \ + testcases_speed; do \ + rm $RESULTS/$FIL-Test.tex; + $BIN -userdir $USERDIR -E pdflatex $RESULTS/$FIL-Test.tex $TESTS/$FIL.lyx; + if [ ! -f $RESULTS/Math-Test.tex ]; then + echo "Export of $FIL.lyx failed!"; + exit 1; + fi + + if diff -q $RESULTS/$FIL.tex $RESULTS/$FIL-Test.tex; then + echo "No differences in LaTeX output for $FIL.lyx!"; + else + echo "Differences in LaTeX output for $FIL.lyx! Enter to see them...."; + read + diff $RESULTS/$FIL.tex $RESULTS/$FIL-Test.tex + exit; + fi +done -- 2.39.5