[Pcre-svn] [1285] code/trunk: Fix bug in RunTest: not report…

Páxina inicial
Borrar esta mensaxe
Autor: Subversion repository
Data:  
Para: pcre-svn
Asunto: [Pcre-svn] [1285] code/trunk: Fix bug in RunTest: not reporting failure in test 2, and fix bugs in RunTest
Revision: 1285
          http://www.exim.org/viewvc/pcre2?view=rev&revision=1285
Author:   ph10
Date:     2020-11-22 15:16:05 +0000 (Sun, 22 Nov 2020)
Log Message:
-----------
Fix bug in RunTest: not reporting failure in test 2, and fix bugs in RunTest 
and RunTest.bat causing test 2 to fail when not building in source directory.


Modified Paths:
--------------
    code/trunk/ChangeLog
    code/trunk/RunTest
    code/trunk/RunTest.bat
    code/trunk/testdata/testinput2
    code/trunk/testdata/testoutput2


Modified: code/trunk/ChangeLog
===================================================================
--- code/trunk/ChangeLog    2020-11-13 08:04:06 UTC (rev 1284)
+++ code/trunk/ChangeLog    2020-11-22 15:16:05 UTC (rev 1285)
@@ -94,7 +94,14 @@


19. Fix ARM64 compilation warning in JIT. Patch by Carlo.

+20. A bug in the RunTest script meant that if the first part of test 2 failed,
+the failure was not reported.

+21. Test 2 was failing when run from a directory other than the source
+directory. This failure was previously missed in RunTest because of 20 above.
+Fixes added to both RunTest and RunTest.bat.
+
+
Version 10.35 09-May-2020
---------------------------


Modified: code/trunk/RunTest
===================================================================
--- code/trunk/RunTest    2020-11-13 08:04:06 UTC (rev 1284)
+++ code/trunk/RunTest    2020-11-22 15:16:05 UTC (rev 1285)
@@ -493,15 +493,20 @@
     done
   fi


- # PCRE2 tests that are not Perl-compatible: API, errors, internals
+ # PCRE2 tests that are not Perl-compatible: API, errors, internals. We copy
+ # the testbtables file to the current directory for use by this test.

   if [ $do2 = yes ] ; then
     echo $title2 "(excluding UTF-$bits)"
+    cp $testdata/testbtables . 
     for opt in "" $jitopt; do
       $sim $valgrind ${opt:+$vjs} ./pcre2test -q $setstack $bmode $opt $testdata/testinput2 testtry
-      if [ $? = 0 ] ; then
+      saverc=$?
+      if [ $saverc = 0 ] ; then
         $sim $valgrind ${opt:+$vjs} ./pcre2test -q $bmode $opt -error -70,-62,-2,-1,0,100,101,191,200 >>testtry
         checkresult $? 2 "$opt"
+      else
+        checkresult $saverc 2 "$opt"
       fi
     done
   fi
@@ -859,6 +864,6 @@
 done


# Clean up local working files
-rm -f testSinput test3input testsaved1 testsaved2 test3output test3outputA test3outputB teststdout teststderr testtry
+rm -f testbtables testSinput test3input testsaved1 testsaved2 test3output test3outputA test3outputB teststdout teststderr testtry

# End

Modified: code/trunk/RunTest.bat
===================================================================
--- code/trunk/RunTest.bat    2020-11-13 08:04:06 UTC (rev 1284)
+++ code/trunk/RunTest.bat    2020-11-22 15:16:05 UTC (rev 1285)
@@ -26,6 +26,7 @@
 @rem Updated for new test 14 (moving others up a number), August 2015.
 @rem Tidied and updated for new tests 21, 22, 23 by PH, October 2015.
 @rem PH added missing "set type" for test 22, April 2016.
+@rem PH added copy command for new testbtables file, November 2020



setlocal enabledelayedexpansion
@@ -305,6 +306,8 @@
goto :eof

:do2
+ copy /y %srcdir%\testdata\testbtables testbtables
+
call :runsub 2 testout "API, errors, internals, and non-Perl stuff" -q
if %jit% EQU 1 call :runsub 2 testoutjit "Test with JIT Override" -q -jit
goto :eof

Modified: code/trunk/testdata/testinput2
===================================================================
--- code/trunk/testdata/testinput2    2020-11-13 08:04:06 UTC (rev 1284)
+++ code/trunk/testdata/testinput2    2020-11-22 15:16:05 UTC (rev 1285)
@@ -5850,7 +5850,7 @@
 /^\w+/tables=3
     École


-#loadtables ./testdata/testbtables
+#loadtables ./testbtables

 /^\w+/tables=3
     École


Modified: code/trunk/testdata/testoutput2
===================================================================
--- code/trunk/testdata/testoutput2    2020-11-13 08:04:06 UTC (rev 1284)
+++ code/trunk/testdata/testoutput2    2020-11-22 15:16:05 UTC (rev 1285)
@@ -17597,7 +17597,7 @@
 ** 'Tables = 3' is invalid: binary tables have not been loaded
     École


-#loadtables ./testdata/testbtables
+#loadtables ./testbtables

 /^\w+/tables=3
     École