[Pcre-svn] [1207] code/trunk/RunTest.bat: Updating RunTest.b…

Startseite
Nachricht löschen
Autor: Subversion repository
Datum:  
To: pcre-svn
Betreff: [Pcre-svn] [1207] code/trunk/RunTest.bat: Updating RunTest.bat with libpre32 support.
Revision: 1207
          http://vcs.pcre.org/viewvc?view=rev&revision=1207
Author:   zherczeg
Date:     2012-11-06 07:13:50 +0000 (Tue, 06 Nov 2012)


Log Message:
-----------
Updating RunTest.bat with libpre32 support.

Modified Paths:
--------------
    code/trunk/RunTest.bat


Modified: code/trunk/RunTest.bat
===================================================================
--- code/trunk/RunTest.bat    2012-11-06 05:52:31 UTC (rev 1206)
+++ code/trunk/RunTest.bat    2012-11-06 07:13:50 UTC (rev 1207)
@@ -19,6 +19,7 @@
 @rem 13 requires absence of jit support
 @rem Sheri P also added override tests for study and jit testing
 @rem Zoltan Herczeg added libpcre16 support
+@rem Zoltan Herczeg added libpcre32 support


setlocal enabledelayedexpansion
if [%srcdir%]==[] (
@@ -52,6 +53,8 @@
set support8=%ERRORLEVEL%
%pcretest% -C pcre16 >NUL
set support16=%ERRORLEVEL%
+%pcretest% -C pcre32 >NUL
+set support32=%ERRORLEVEL%
%pcretest% -C utf >NUL
set utf=%ERRORLEVEL%
%pcretest% -C ucp >NUL
@@ -71,6 +74,12 @@
if not exist testoutjit16 md testoutjit16
)

+if %support16% EQU 1 (
+if not exist testout32 md testout32
+if not exist testoutstudy32 md testoutstudy32
+if not exist testoutjit32 md testoutjit32
+)
+
set do1=no
set do2=no
set do3=no
@@ -91,18 +100,24 @@
set do18=no
set do19=no
set do20=no
+set do21=no
+set do22=no
+set do23=no
+set do24=no
+set do25=no
+set do26=no
set all=yes

 for %%a in (%*) do (
   set valid=no
-  for %%v in (1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20) do if %%v == %%a set valid=yes
+  for %%v in (1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26) do if %%v == %%a set valid=yes
   if "!valid!" == "yes" (
     set do%%a=yes
     set all=no
 ) else (
     echo Invalid test number - %%a!
         echo Usage %0 [ test_number ] ...
-        echo Where test_number is one or more optional test numbers 1 through 20, default is all tests.
+        echo Where test_number is one or more optional test numbers 1 through 26, default is all tests.
         exit /b 1
 )
 )
@@ -129,6 +144,12 @@
   set do18=yes
   set do19=yes
   set do20=yes
+  set do21=yes
+  set do22=yes
+  set do23=yes
+  set do24=yes
+  set do25=yes
+  set do26=yes
 )


@echo RunTest.bat's pcretest output is written to newly created subfolders named
@@ -144,12 +165,19 @@
echo.
echo ---- Testing 8-bit library ----
echo.
-) else (
+)
+if "%mode%" == "-16" (
if %support16% EQU 0 goto modeSkip
echo.
echo ---- Testing 16-bit library ----
echo.
)
+if "%mode%" == "-32" (
+ if %support32% EQU 0 goto modeSkip
+ echo.
+ echo ---- Testing 32-bit library ----
+ echo.
+)
if "%do1%" == "yes" call :do1
if "%do2%" == "yes" call :do2
if "%do3%" == "yes" call :do3
@@ -170,13 +198,25 @@
if "%do18%" == "yes" call :do18
if "%do19%" == "yes" call :do19
if "%do20%" == "yes" call :do20
+if "%do21%" == "yes" call :do21
+if "%do22%" == "yes" call :do22
+if "%do23%" == "yes" call :do23
+if "%do24%" == "yes" call :do24
+if "%do25%" == "yes" call :do25
+if "%do26%" == "yes" call :do26
:modeSkip
if "%mode%" == "" (
set mode=-16
set bits=16
goto nextMode
)
+if "%mode%" == "-16" (
+ set mode=-32
+ set bits=32
+ goto nextMode
+)

+@rem If mode is -32, testing is finished
if %failed% == "yes" (
echo In above output, one or more of the various tests failed!
exit /b 1
@@ -224,11 +264,22 @@
goto :eof
)

+set type=
 if [%1]==[11] (
-  fc /n %srcdir%\testdata\%testoutput%-%bits% %2%bits%\%testoutput% >NUL
-) else (
-  fc /n %srcdir%\testdata\%testoutput% %2%bits%\%testoutput% >NUL
+  set type=-%bits%
 )
+if [%1]==[18] (
+  set type=-%bits%
+)
+if [%1]==[21] (
+  set type=-%bits%
+)
+if [%1]==[22] (
+  set type=-%bits%
+)
+
+fc /n %srcdir%\testdata\%testoutput%%type% %2%bits%\%testoutput% >NUL
+
 if errorlevel 1 (
   echo.          failed comparison: fc /n %srcdir%\testdata\%testoutput% %2%bits%\%testoutput%
   if [%1]==[2] (
@@ -256,13 +307,13 @@
 goto :eof


:do1
-call :runsub 1 testout "Main functionality - Compatible with Perl 5.8 and above" -q
+call :runsub 1 testout "Main functionality (Compatible with Perl >= 5.10)" -q
call :runsub 1 testoutstudy "Test with Study Override" -q -s
if %jit% EQU 1 call :runsub 1 testoutjit "Test with JIT Override" -q -s+
goto :eof

:do2
- call :runsub 2 testout "API, errors, internals, and non-Perl stuff (not UTF-8)" -q
+ call :runsub 2 testout "API, errors, internals, and non-Perl stuff" -q
call :runsub 2 testoutstudy "Test with Study Override" -q -s
if %jit% EQU 1 call :runsub 2 testoutjit "Test with JIT Override" -q -s+
goto :eof
@@ -274,21 +325,21 @@
goto :eof

:do4
- if %utf% EQU 0 (
+if %utf% EQU 0 (
echo Test 4 Skipped due to absence of UTF-%bits% support.
goto :eof
)
- call :runsub 4 testout "UTF-%bits% support - Compatible with Perl 5.8 and above" -q
+ call :runsub 4 testout "UTF-%bits% support - (Compatible with Perl >= 5.10)" -q
call :runsub 4 testoutstudy "Test with Study Override" -q -s
if %jit% EQU 1 call :runsub 4 testoutjit "Test with JIT Override" -q -s+
goto :eof

:do5
- if %utf% EQU 0 (
+if %utf% EQU 0 (
echo Test 5 Skipped due to absence of UTF-%bits% support.
goto :eof
)
- call :runsub 5 testout "API, internals, and non-Perl stuff for UTF-%bits% support" -q
+ call :runsub 5 testout "API, internals, and non-Perl stuff for UTF-%bits%" -q
call :runsub 5 testoutstudy "Test with Study Override" -q -s
if %jit% EQU 1 call :runsub 5 testoutjit "Test with JIT Override" -q -s+
goto :eof
@@ -319,7 +370,7 @@
goto :eof

:do9
- if %utf% EQU 0 (
+if %utf% EQU 0 (
echo Test 9 Skipped due to absence of UTF-%bits% support.
goto :eof
)
@@ -328,7 +379,7 @@
goto :eof

:do10
- if %ucp% EQU 0 (
+if %ucp% EQU 0 (
echo Test 10 Skipped due to absence of Unicode property support.
goto :eof
)
@@ -337,11 +388,11 @@
goto :eof

:do11
- if NOT %link_size% EQU 2 (
+if NOT %link_size% EQU 2 (
echo Test 11 Skipped because link size is not 2.
goto :eof
)
- if %ucp% EQU 0 (
+if %ucp% EQU 0 (
echo Test 11 Skipped due to absence of Unicode property support.
goto :eof
)
@@ -354,48 +405,49 @@
echo Test 12 Skipped due to absence of JIT support.
goto :eof
)
- call :runsub 12 testout "JIT-specific features - have JIT" -q
+ call :runsub 12 testout "JIT-specific features (JIT available)" -q
goto :eof

:do13
- if %jit% EQU 1 (
+if %jit% EQU 1 (
echo Test 13 Skipped due to presence of JIT support.
goto :eof
)
- call :runsub 13 testout "JIT-specific features - no JIT" -q
+ call :runsub 13 testout "JIT-specific features (JIT not available)" -q
goto :eof

:do14
- if NOT %bits% EQU 8 (
- echo Test 14 Skipped when running 16-bit tests.
+if NOT %bits% EQU 8 (
+ echo Test 14 Skipped when running 16/32-bit tests.
goto :eof
)
copy /Y %srcdir%\testdata\saved16 testsaved16
+ copy /Y %srcdir%\testdata\saved32 testsaved32
call :runsub 14 testout "Specials for the basic 8-bit library" -q
call :runsub 14 testoutstudy "Test with Study Override" -q -s
if %jit% EQU 1 call :runsub 14 testoutjit "Test with JIT Override" -q -s+
goto :eof

:do15
- if NOT %bits% EQU 8 (
- echo Test 15 Skipped when running 16-bit tests.
+if NOT %bits% EQU 8 (
+ echo Test 15 Skipped when running 16/32-bit tests.
goto :eof
)
- if %utf% EQU 0 (
- echo Test 15 Skipped due to absence of UTF-8 support.
+if %utf% EQU 0 (
+ echo Test 15 Skipped due to absence of UTF-%bits% support.
goto :eof
)
- call :runsub 15 testout "Specials for the 8-bit library with UTF-8 support" -q
+ call :runsub 15 testout "Specials for the 8-bit library with UTF-%bits% support" -q
call :runsub 15 testoutstudy "Test with Study Override" -q -s
if %jit% EQU 1 call :runsub 15 testoutjit "Test with JIT Override" -q -s+
goto :eof

:do16
- if NOT %bits% EQU 8 (
- echo Test 16 Skipped when running 16-bit tests.
+if NOT %bits% EQU 8 (
+ echo Test 16 Skipped when running 16/32-bit tests.
goto :eof
)
- if %ucp% EQU 0 (
+if %ucp% EQU 0 (
echo Test 16 Skipped due to absence of Unicode property support.
goto :eof
)
@@ -405,57 +457,141 @@
goto :eof

:do17
- if NOT %bits% EQU 16 (
+if %bits% EQU 8 (
echo Test 17 Skipped when running 8-bit tests.
goto :eof
)
- copy /Y %srcdir%\testdata\saved8 testsaved8
- copy /Y %srcdir%\testdata\saved16LE-1 testsaved16LE-1
- copy /Y %srcdir%\testdata\saved16BE-1 testsaved16BE-1
- call :runsub 17 testout "Specials for the basic 8-bit library" -q
+ call :runsub 17 testout "Specials for the basic 16/32-bit library" -q
call :runsub 17 testoutstudy "Test with Study Override" -q -s
if %jit% EQU 1 call :runsub 17 testoutjit "Test with JIT Override" -q -s+
goto :eof

:do18
- if NOT %bits% EQU 16 (
+if %bits% EQU 8 (
echo Test 18 Skipped when running 8-bit tests.
goto :eof
)
- if %utf% EQU 0 (
- echo Test 18 Skipped due to absence of UTF-8 support.
+if %utf% EQU 0 (
+ echo Test 18 Skipped due to absence of UTF-%bits% support.
goto :eof
)
- copy /Y %srcdir%\testdata\saved16LE-2 testsaved16LE-2
- copy /Y %srcdir%\testdata\saved16BE-2 testsaved16BE-2
- call :runsub 18 testout "Specials for the basic 8-bit library" -q
+ call :runsub 18 testout "Specials for the 16/32-bit library with UTF-%bits% support" -q
call :runsub 18 testoutstudy "Test with Study Override" -q -s
if %jit% EQU 1 call :runsub 18 testoutjit "Test with JIT Override" -q -s+
goto :eof

:do19
- if NOT %bits% EQU 16 (
+if %bits% EQU 8 (
echo Test 19 Skipped when running 8-bit tests.
goto :eof
)
- if %ucp% EQU 0 (
+if %ucp% EQU 0 (
echo Test 19 Skipped due to absence of Unicode property support.
goto :eof
)
- call :runsub 19 testout "Specials for the basic 8-bit library" -q
+ call :runsub 19 testout "Specials for the 16/32-bit library with Unicode property support" -q
call :runsub 19 testoutstudy "Test with Study Override" -q -s
if %jit% EQU 1 call :runsub 19 testoutjit "Test with JIT Override" -q -s+
goto :eof

:do20
- if NOT %bits% EQU 16 (
+if %bits% EQU 8 (
echo Test 20 Skipped when running 8-bit tests.
goto :eof
)
- call :runsub 20 testout "DFA specials for the basic 16-bit library" -q
+ call :runsub 20 testout "DFA specials for the basic 16/32-bit library" -q
call :runsub 20 testoutstudy "Test with Study Override" -q -s
goto :eof

+:do21
+if %bits% EQU 8 (
+ echo Test 21 Skipped when running 8-bit tests.
+ goto :eof
+)
+if NOT %link_size% EQU 2 (
+ echo Test 21 Skipped because link size is not 2.
+ goto :eof
+)
+copy /Y %srcdir%\testdata\saved8 testsaved8
+copy /Y %srcdir%\testdata\saved16LE-1 testsaved16LE-1
+copy /Y %srcdir%\testdata\saved16BE-1 testsaved16BE-1
+copy /Y %srcdir%\testdata\saved32LE-1 testsaved32LE-1
+copy /Y %srcdir%\testdata\saved32BE-1 testsaved32BE-1
+call :runsub 21 testout "Reloads for the basic 16/32-bit library" -q
+call :runsub 21 testoutstudy "Test with Study Override" -q -s
+if %jit% EQU 1 call :runsub 21 testoutjit "Test with JIT Override" -q -s+
+goto :eof
+
+:do22
+if %bits% EQU 8 (
+ echo Test 22 Skipped when running 8-bit tests.
+ goto :eof
+)
+if %utf% EQU 0 (
+ echo Test 22 Skipped due to absence of UTF-%bits% support.
+ goto :eof
+)
+if NOT %link_size% EQU 2 (
+ echo Test 22 Skipped because link size is not 2.
+ goto :eof
+)
+copy /Y %srcdir%\testdata\saved16LE-2 testsaved16LE-2
+copy /Y %srcdir%\testdata\saved16BE-2 testsaved16BE-2
+copy /Y %srcdir%\testdata\saved32LE-2 testsaved32LE-2
+copy /Y %srcdir%\testdata\saved32BE-2 testsaved32BE-2
+call :runsub 22 testout "Reloads for the 16/32-bit library with UTF-16/32 support" -q
+call :runsub 22 testoutstudy "Test with Study Override" -q -s
+if %jit% EQU 1 call :runsub 22 testoutjit "Test with JIT Override" -q -s+
+goto :eof
+
+:do23
+if NOT %bits% EQU 16 (
+ echo Test 23 Skipped when running 8/32-bit tests.
+ goto :eof
+)
+call :runsub 23 testout "Specials for the 16-bit library" -q
+call :runsub 23 testoutstudy "Test with Study Override" -q -s
+if %jit% EQU 1 call :runsub 23 testoutjit "Test with JIT Override" -q -s+
+goto :eof
+
+:do24
+if NOT %bits% EQU 16 (
+ echo Test 24 Skipped when running 8/32-bit tests.
+ goto :eof
+)
+if %utf% EQU 0 (
+ echo Test 24 Skipped due to absence of UTF-%bits% support.
+ goto :eof
+)
+call :runsub 24 testout "Specials for the 16-bit library with UTF-16 support" -q
+call :runsub 24 testoutstudy "Test with Study Override" -q -s
+if %jit% EQU 1 call :runsub 24 testoutjit "Test with JIT Override" -q -s+
+goto :eof
+
+:do25
+if NOT %bits% EQU 32 (
+ echo Test 25 Skipped when running 8/16-bit tests.
+ goto :eof
+)
+call :runsub 25 testout "Specials for the 32-bit library" -q
+call :runsub 25 testoutstudy "Test with Study Override" -q -s
+if %jit% EQU 1 call :runsub 25 testoutjit "Test with JIT Override" -q -s+
+goto :eof
+
+:do26
+if NOT %bits% EQU 32 (
+ echo Test 26 Skipped when running 8/16-bit tests.
+ goto :eof
+)
+if %utf% EQU 0 (
+ echo Test 26 Skipped due to absence of UTF-%bits% support.
+ goto :eof
+)
+call :runsub 26 testout "Specials for the 32-bit library with UTF-32 support" -q
+call :runsub 26 testoutstudy "Test with Study Override" -q -s
+if %jit% EQU 1 call :runsub 26 testoutjit "Test with JIT Override" -q -s+
+goto :eof
+
:conferror
@echo.
@echo Either your build is incomplete or you have a configuration error.