version 1.1.1.1, 2012/02/21 23:05:51
|
version 1.1.1.2, 2012/02/21 23:50:25
|
Line 12
|
Line 12
|
@rem options.
|
@rem options.
|
@rem
|
@rem
|
@rem Sheri Pierce added logic to skip feature dependent tests
|
@rem Sheri Pierce added logic to skip feature dependent tests
|
@rem tests 4 5 8 and 12 require utf8 support
| @rem tests 4 5 9 15 and 18 require utf support
|
@rem tests 6 9 13 require ucp support
| @rem tests 6 7 10 16 and 19 require ucp support
|
@rem 10 requires ucp and link size 2
| @rem 11 requires ucp and link size 2
|
@rem 14 requires presense of jit support
| @rem 12 requires presense of jit support
|
@rem 15 requires absence of jit support
| @rem 13 requires absence of jit support
|
@rem Sheri P also added override tests for study and jit testing
|
@rem Sheri P also added override tests for study and jit testing
|
@rem JIT testing n/a for tests 7-10, removed JIT override test for them
| @rem Zoltan Herczeg added libpcre16 support
|
@rem removed override tests for 14-15
| |
|
|
setlocal enabledelayedexpansion
|
setlocal enabledelayedexpansion
|
if [%srcdir%]==[] (
|
if [%srcdir%]==[] (
|
Line 35 exit /b 1
|
Line 34 exit /b 1
|
goto :eof
|
goto :eof
|
)
|
)
|
|
|
if "%pcregrep%"=="" set pcregrep=.\pcregrep.exe
|
|
if "%pcretest%"=="" set pcretest=.\pcretest.exe
|
if "%pcretest%"=="" set pcretest=.\pcretest.exe
|
|
|
echo source dir is %srcdir%
|
echo source dir is %srcdir%
|
echo pcretest=%pcretest%
|
echo pcretest=%pcretest%
|
echo pcregrep=%pcregrep%
|
|
|
|
if NOT exist "%pcregrep%" (
|
|
echo Error: "%pcregrep%" not found!
|
|
echo.
|
|
call :conferror
|
|
exit /b 1
|
|
)
|
|
|
|
if NOT exist "%pcretest%" (
|
if NOT exist "%pcretest%" (
|
echo Error: "%pcretest%" not found!
|
echo Error: "%pcretest%" not found!
|
echo.
|
echo.
|
Line 56 call :conferror
|
Line 46 call :conferror
|
exit /b 1
|
exit /b 1
|
)
|
)
|
|
|
"%pcretest%" -C|"%pcregrep%" --no-jit "No UTF-8 support">NUL
| "%pcretest%" -C linksize >NUL
|
set utf8=%ERRORLEVEL%
| set link_size=%ERRORLEVEL%
|
"%pcretest%" -C|"%pcregrep%" --no-jit "No Unicode properties support">NUL
| "%pcretest%" -C pcre8 >NUL
|
| set support8=%ERRORLEVEL%
|
| "%pcretest%" -C pcre16 >NUL
|
| set support16=%ERRORLEVEL%
|
| "%pcretest%" -C utf >NUL
|
| set utf=%ERRORLEVEL%
|
| "%pcretest%" -C ucp >NUL
|
set ucp=%ERRORLEVEL%
|
set ucp=%ERRORLEVEL%
|
"%pcretest%" -C|"%pcregrep%" --no-jit "No just-in-time compiler support">NUL
| "%pcretest%" -C jit >NUL
|
set jit=%ERRORLEVEL%
|
set jit=%ERRORLEVEL%
|
"%pcretest%" -C|"%pcregrep%" --no-jit "Internal link size = 2">NUL
|
|
set link2=%ERRORLEVEL%
| if %support8% EQU 1 (
|
set ucpandlink2=0
| if not exist testout8 md testout8
|
if %ucp% EQU 1 (
| if not exist testoutstudy8 md testoutstudy8
|
if %link2% EQU 0 set ucpandlink2=1
| if not exist testoutjit8 md testoutjit8
|
)
|
)
|
|
|
if not exist testout md testout
| if %support16% EQU 1 (
|
if not exist testoutstudy md testoutstudy
| if not exist testout16 md testout16
|
if not exist testoutjit md testoutjit
| if not exist testoutstudy16 md testoutstudy16
|
| if not exist testoutjit16 md testoutjit16
|
| )
|
|
|
set do1=no
|
set do1=no
|
set do2=no
|
set do2=no
|
Line 88 set do12=no
|
Line 86 set do12=no
|
set do13=no
|
set do13=no
|
set do14=no
|
set do14=no
|
set do15=no
|
set do15=no
|
|
set do16=no
|
|
set do17=no
|
|
set do18=no
|
|
set do19=no
|
|
set do20=no
|
set all=yes
|
set all=yes
|
|
|
for %%a in (%*) do (
|
for %%a in (%*) do (
|
set valid=no
|
set valid=no
|
for %%v in (1 2 3 4 5 6 7 8 9 10 11 12 13 14 15) 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) do if %%v == %%a set valid=yes
|
if "!valid!" == "yes" (
|
if "!valid!" == "yes" (
|
set do%%a=yes
|
set do%%a=yes
|
set all=no
|
set all=no
|
) else (
|
) else (
|
echo Invalid test number - %%a!
|
echo Invalid test number - %%a!
|
echo Usage %0 [ test_number ] ...
|
echo Usage %0 [ test_number ] ...
|
echo Where test_number is one or more optional test numbers 1 through 15, default is all tests.
| echo Where test_number is one or more optional test numbers 1 through 20, default is all tests.
|
exit /b 1
|
exit /b 1
|
)
|
)
|
)
|
)
|
Line 121 if "%all%" == "yes" (
|
Line 124 if "%all%" == "yes" (
|
set do13=yes
|
set do13=yes
|
set do14=yes
|
set do14=yes
|
set do15=yes
|
set do15=yes
|
|
set do16=yes
|
|
set do17=yes
|
|
set do18=yes
|
|
set do19=yes
|
|
set do20=yes
|
)
|
)
|
|
|
@echo RunTest.bat's pcretest output is written to newly created subfolders named
|
@echo RunTest.bat's pcretest output is written to newly created subfolders named
|
@echo testout, testoutstudy and testoutjit.
|
@echo testout, testoutstudy and testoutjit.
|
@echo.
|
@echo.
|
|
|
|
set mode=
|
|
set bits=8
|
|
|
|
:nextMode
|
|
if "%mode%" == "" (
|
|
if %support8% EQU 0 goto modeSkip
|
|
echo.
|
|
echo ---- Testing 8-bit library ----
|
|
echo.
|
|
) else (
|
|
if %support16% EQU 0 goto modeSkip
|
|
echo.
|
|
echo ---- Testing 16-bit library ----
|
|
echo.
|
|
)
|
if "%do1%" == "yes" call :do1
|
if "%do1%" == "yes" call :do1
|
if "%do2%" == "yes" call :do2
|
if "%do2%" == "yes" call :do2
|
if "%do3%" == "yes" call :do3
|
if "%do3%" == "yes" call :do3
|
Line 141 if "%do12%" == "yes" call :do12
|
Line 165 if "%do12%" == "yes" call :do12
|
if "%do13%" == "yes" call :do13
|
if "%do13%" == "yes" call :do13
|
if "%do14%" == "yes" call :do14
|
if "%do14%" == "yes" call :do14
|
if "%do15%" == "yes" call :do15
|
if "%do15%" == "yes" call :do15
|
|
if "%do16%" == "yes" call :do16
|
|
if "%do17%" == "yes" call :do17
|
|
if "%do18%" == "yes" call :do18
|
|
if "%do19%" == "yes" call :do19
|
|
if "%do20%" == "yes" call :do20
|
|
:modeSkip
|
|
if "%mode%" == "" (
|
|
set mode=-16
|
|
set bits=16
|
|
goto nextMode
|
|
)
|
|
|
if %failed% == "yes" (
|
if %failed% == "yes" (
|
echo In above output, one or more of the various tests failed!
|
echo In above output, one or more of the various tests failed!
|
exit /b 1
|
exit /b 1
|
Line 180 if exist %srcdir%\testdata\win%testinput% (
|
Line 216 if exist %srcdir%\testdata\win%testinput% (
|
)
|
)
|
|
|
echo Test %1: %3
|
echo Test %1: %3
|
"%pcretest%" %4 %5 %6 %7 %8 %9 "%srcdir%\testdata\%testinput%">%2\%testoutput%
| "%pcretest%" %mode% %4 %5 %6 %7 %8 %9 "%srcdir%\testdata\%testinput%">%2%bits%\%testoutput%
|
if errorlevel 1 (
|
if errorlevel 1 (
|
echo. failed executing command-line:
|
echo. failed executing command-line:
|
echo. "%pcretest%" %4 %5 %6 %7 %8 %9 "%srcdir%\testdata\%testinput%"^>%2\%testoutput%
| echo. "%pcretest%" %mode% %4 %5 %6 %7 %8 %9 "%srcdir%\testdata\%testinput%"^>%2%bits%\%testoutput%
|
set failed="yes"
|
set failed="yes"
|
goto :eof
|
goto :eof
|
)
|
)
|
|
|
fc /n "%srcdir%\testdata\%testoutput%" "%2\%testoutput%">NUL
| if [%1]==[11] (
|
| fc /n "%srcdir%\testdata\%testoutput%-%bits%" "%2%bits%\%testoutput%">NUL
|
| ) else (
|
| fc /n "%srcdir%\testdata\%testoutput%" "%2%bits%\%testoutput%">NUL
|
| )
|
if errorlevel 1 (
|
if errorlevel 1 (
|
echo. failed comparison: fc /n "%srcdir%\testdata\%testoutput%" "%2\%testoutput%"
| echo. failed comparison: fc /n "%srcdir%\testdata\%testoutput%" "%2%bits%\%testoutput%"
|
set failed="yes"
| |
if [%1]==[2] (
|
if [%1]==[2] (
|
echo.
|
echo.
|
echo ** Test 2 requires a lot of stack. PCRE can be configured to
|
echo ** Test 2 requires a lot of stack. PCRE can be configured to
|
Line 206 if errorlevel 1 (
|
Line 245 if errorlevel 1 (
|
echo ** Test 3 failure usually means french locale is not
|
echo ** Test 3 failure usually means french locale is not
|
echo ** available on the system, rather than a bug or problem with PCRE.
|
echo ** available on the system, rather than a bug or problem with PCRE.
|
echo.
|
echo.
|
|
goto :eof
|
)
|
)
|
|
|
|
set failed="yes"
|
goto :eof
|
goto :eof
|
)
|
)
|
|
|
Line 233 goto :eof
|
Line 274 goto :eof
|
goto :eof
|
goto :eof
|
|
|
:do4
|
:do4
|
if %utf8% EQU 0 (
| if %utf% EQU 0 (
|
echo Test 4 Skipped due to absence of UTF-8 support.
| echo Test 4 Skipped due to absence of UTF-%bits% support.
|
goto :eof
|
goto :eof
|
)
|
)
|
call :runsub 4 testout "UTF-8 support - Compatible with Perl 5.8 and above" -q
| call :runsub 4 testout "UTF-%bits% support - Compatible with Perl 5.8 and above" -q
|
call :runsub 4 testoutstudy "Test with Study Override" -q -s
|
call :runsub 4 testoutstudy "Test with Study Override" -q -s
|
if %jit% EQU 1 call :runsub 4 testoutjit "Test with JIT Override" -q -s+
|
if %jit% EQU 1 call :runsub 4 testoutjit "Test with JIT Override" -q -s+
|
goto :eof
|
goto :eof
|
|
|
:do5
|
:do5
|
if %utf8% EQU 0 (
| if %utf% EQU 0 (
|
echo Test 5 Skipped due to absence of UTF-8 support.
| echo Test 5 Skipped due to absence of UTF-%bits% support.
|
goto :eof
|
goto :eof
|
)
|
)
|
call :runsub 5 testout "API, internals, and non-Perl stuff for UTF-8 support" -q
| call :runsub 5 testout "API, internals, and non-Perl stuff for UTF-%bits% support" -q
|
call :runsub 5 testoutstudy "Test with Study Override" -q -s
|
call :runsub 5 testoutstudy "Test with Study Override" -q -s
|
if %jit% EQU 1 call :runsub 5 testoutjit "Test with JIT Override" -q -s+
|
if %jit% EQU 1 call :runsub 5 testoutjit "Test with JIT Override" -q -s+
|
goto :eof
|
goto :eof
|
|
|
:do6
|
:do6
|
if %ucp% EQU 0 (
|
if %ucp% EQU 0 (
|
echo Test 6 Skipped due to absence of ucp support.
| echo Test 6 Skipped due to absence of Unicode property support.
|
goto :eof
|
goto :eof
|
)
|
)
|
call :runsub 6 testout "Unicode property support - Compatible with Perl 5.10 and above" -q
| call :runsub 6 testout "Unicode property support (Compatible with Perl >= 5.10)" -q
|
call :runsub 6 testoutstudy "Test with Study Override" -q -s
|
call :runsub 6 testoutstudy "Test with Study Override" -q -s
|
if %jit% EQU 1 call :runsub 6 testoutjit "Test with JIT Override" -q -s+
|
if %jit% EQU 1 call :runsub 6 testoutjit "Test with JIT Override" -q -s+
|
goto :eof
|
goto :eof
|
|
|
:do7
|
:do7
|
call :runsub 7 testout "DFA matching" -q -dfa
| if %ucp% EQU 0 (
|
call :runsub 7 testoutstudy "Test with Study Override" -q -dfa -s
| echo Test 7 Skipped due to absence of Unicode property support.
|
| goto :eof
|
| )
|
| call :runsub 7 testout "API, internals, and non-Perl stuff for Unicode property support" -q
|
| call :runsub 7 testoutstudy "Test with Study Override" -q -s
|
| if %jit% EQU 1 call :runsub 7 testoutjit "Test with JIT Override" -q -s+
|
goto :eof
|
goto :eof
|
|
|
:do8
|
:do8
|
if %utf8% EQU 0 (
| call :runsub 8 testout "DFA matching main functionality" -q -dfa
|
echo Test 8 Skipped due to absence of UTF-8 support.
| |
goto :eof
| |
)
| |
call :runsub 8 testout "DFA matching with UTF-8" -q -dfa
| |
call :runsub 8 testoutstudy "Test with Study Override" -q -dfa -s
|
call :runsub 8 testoutstudy "Test with Study Override" -q -dfa -s
|
goto :eof
| goto :eof
|
|
|
:do9
|
:do9
|
if %ucp% EQU 0 (
| if %utf% EQU 0 (
|
echo Test 9 Skipped due to absence of ucp support.
| echo Test 9 Skipped due to absence of UTF-%bits% support.
|
goto :eof
|
goto :eof
|
)
|
)
|
call :runsub 9 testout "DFA matching with Unicode properties" -q -dfa
| call :runsub 9 testout "DFA matching with UTF-%bits%" -q -dfa
|
call :runsub 9 testoutstudy "Test with Study Override" -q -dfa -s
|
call :runsub 9 testoutstudy "Test with Study Override" -q -dfa -s
|
goto :eof
| goto :eof
|
|
|
:do10
|
:do10
|
if %ucpandlink2% EQU 0 (
| if %ucp% EQU 0 (
|
echo Test 10 Skipped due to requirements of ucp support AND link size 2.
| echo Test 10 Skipped due to absence of Unicode property support.
|
goto :eof
|
goto :eof
|
)
|
)
|
call :runsub 10 testout "Internal offsets and code size tests" -q
| call :runsub 10 testout "DFA matching with Unicode properties" -q -dfa
|
call :runsub 10 testoutstudy "Test with Study Override" -q -s
| call :runsub 10 testoutstudy "Test with Study Override" -q -dfa -s
|
goto :eof
|
goto :eof
|
|
|
:do11
|
:do11
|
call :runsub 11 testout "Features from Perl 5.10 and above" -q
| if NOT %link_size% EQU 2 (
|
| echo Test 11 Skipped because link size is not 2.
|
| goto :eof
|
| )
|
| if %ucp% EQU 0 (
|
| echo Test 11 Skipped due to absence of Unicode property support.
|
| goto :eof
|
| )
|
| call :runsub 11 testout "Internal offsets and code size tests" -q
|
call :runsub 11 testoutstudy "Test with Study Override" -q -s
|
call :runsub 11 testoutstudy "Test with Study Override" -q -s
|
if %jit% EQU 1 call :runsub 11 testoutjit "Test with JIT Override" -q -s+
|
|
goto :eof
|
goto :eof
|
|
|
:do12
|
:do12
|
if %utf8% EQU 0 (
| if %jit% EQU 0 (
|
echo Test 12 Skipped due to absence of UTF-8 support.
| echo Test 12 Skipped due to absence of JIT support.
|
goto :eof
|
goto :eof
|
)
|
)
|
call :runsub 12 testout "Features from Perl 5.10 and above w UTF-8" -q
| call :runsub 12 testout "JIT-specific features - have JIT" -q
|
call :runsub 12 testoutstudy "Test with Study Override" -q -s
| |
if %jit% EQU 1 call :runsub 12 testoutjit "Test with JIT Override" -q -s+
| |
goto :eof
|
goto :eof
|
|
|
:do13
|
:do13
|
if %ucp% EQU 0 (
| if %jit% EQU 1 (
|
echo Test 13 Skipped due to absence of ucp support.
| echo Test 13 Skipped due to presence of JIT support.
|
goto :eof
|
goto :eof
|
)
|
)
|
call :runsub 13 testout "API internals and non-Perl stuff for Unicode property support" -q
| call :runsub 13 testout "JIT-specific features - no JIT" -q
|
call :runsub 13 testoutstudy "Test with Study Override" -q -s
| |
if %jit% EQU 1 call :runsub 13 testoutjit "Test with JIT Override" -q -s+
| |
goto :eof
|
goto :eof
|
|
|
:do14
|
:do14
|
if %jit% EQU 0 (
| if NOT %bits% EQU 8 (
|
echo Test 14 Skipped due to absence of JIT support.
| echo Test 14 Skipped when running 16-bit tests.
|
goto :eof
|
goto :eof
|
)
|
)
|
call :runsub 14 testout "JIT-specific features - have JIT" -q
| copy /Y "%srcdir%\testdata\saved16" testsaved16
|
| 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
|
goto :eof
|
|
|
:do15
|
:do15
|
if %jit% EQU 1 (
| if NOT %bits% EQU 8 (
|
echo Test 15 Skipped due to presence of JIT support.
| echo Test 15 Skipped when running 16-bit tests.
|
goto :eof
|
goto :eof
|
)
|
)
|
call :runsub 15 testout "JIT-specific features - no JIT" -q
| if %utf% EQU 0 (
|
| echo Test 15 Skipped due to absence of UTF-8 support.
|
| goto :eof
|
| )
|
| call :runsub 15 testout "Specials for the 8-bit library with UTF-8 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.
|
| goto :eof
|
| )
|
| if %ucp% EQU 0 (
|
| echo Test 16 Skipped due to absence of Unicode property support.
|
| goto :eof
|
| )
|
| call :runsub 16 testout "Specials for the 8-bit library with Unicode propery support" -q
|
| call :runsub 16 testoutstudy "Test with Study Override" -q -s
|
| if %jit% EQU 1 call :runsub 16 testoutjit "Test with JIT Override" -q -s+
|
| goto :eof
|
|
|
| :do17
|
| if NOT %bits% EQU 16 (
|
| 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 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 (
|
| 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.
|
| 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 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 (
|
| echo Test 19 Skipped when running 8-bit tests.
|
| goto :eof
|
| )
|
| 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 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 (
|
| 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 testoutstudy "Test with Study Override" -q -s
|
goto :eof
|
goto :eof
|
|
|
:conferror
|
:conferror
|