/[pcre]/code/trunk/RunTest.bat
ViewVC logotype

Diff of /code/trunk/RunTest.bat

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1206 by zherczeg, Tue Oct 9 15:43:08 2012 UTC revision 1207 by zherczeg, Tue Nov 6 07:13:50 2012 UTC
# Line 19  Line 19 
19  @rem 13 requires absence of jit support  @rem 13 requires absence of jit support
20  @rem Sheri P also added override tests for study and jit testing  @rem Sheri P also added override tests for study and jit testing
21  @rem Zoltan Herczeg added libpcre16 support  @rem Zoltan Herczeg added libpcre16 support
22    @rem Zoltan Herczeg added libpcre32 support
23    
24  setlocal enabledelayedexpansion  setlocal enabledelayedexpansion
25  if [%srcdir%]==[] (  if [%srcdir%]==[] (
# Line 52  set link_size=%ERRORLEVEL% Line 53  set link_size=%ERRORLEVEL%
53  set support8=%ERRORLEVEL%  set support8=%ERRORLEVEL%
54  %pcretest% -C pcre16 >NUL  %pcretest% -C pcre16 >NUL
55  set support16=%ERRORLEVEL%  set support16=%ERRORLEVEL%
56    %pcretest% -C pcre32 >NUL
57    set support32=%ERRORLEVEL%
58  %pcretest% -C utf >NUL  %pcretest% -C utf >NUL
59  set utf=%ERRORLEVEL%  set utf=%ERRORLEVEL%
60  %pcretest% -C ucp >NUL  %pcretest% -C ucp >NUL
# Line 71  if not exist testoutstudy16 md testoutst Line 74  if not exist testoutstudy16 md testoutst
74  if not exist testoutjit16 md testoutjit16  if not exist testoutjit16 md testoutjit16
75  )  )
76    
77    if %support16% EQU 1 (
78    if not exist testout32 md testout32
79    if not exist testoutstudy32 md testoutstudy32
80    if not exist testoutjit32 md testoutjit32
81    )
82    
83  set do1=no  set do1=no
84  set do2=no  set do2=no
85  set do3=no  set do3=no
# Line 91  set do17=no Line 100  set do17=no
100  set do18=no  set do18=no
101  set do19=no  set do19=no
102  set do20=no  set do20=no
103    set do21=no
104    set do22=no
105    set do23=no
106    set do24=no
107    set do25=no
108    set do26=no
109  set all=yes  set all=yes
110    
111  for %%a in (%*) do (  for %%a in (%*) do (
112    set valid=no    set valid=no
113    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
114    if "!valid!" == "yes" (    if "!valid!" == "yes" (
115      set do%%a=yes      set do%%a=yes
116      set all=no      set all=no
117  ) else (  ) else (
118      echo Invalid test number - %%a!      echo Invalid test number - %%a!
119          echo Usage %0 [ test_number ] ...          echo Usage %0 [ test_number ] ...
120          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.
121          exit /b 1          exit /b 1
122  )  )
123  )  )
# Line 129  if "%all%" == "yes" ( Line 144  if "%all%" == "yes" (
144    set do18=yes    set do18=yes
145    set do19=yes    set do19=yes
146    set do20=yes    set do20=yes
147      set do21=yes
148      set do22=yes
149      set do23=yes
150      set do24=yes
151      set do25=yes
152      set do26=yes
153  )  )
154    
155  @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
# Line 144  if "%mode%" == "" ( Line 165  if "%mode%" == "" (
165    echo.    echo.
166    echo ---- Testing 8-bit library ----    echo ---- Testing 8-bit library ----
167    echo.    echo.
168  ) else (  )
169    if "%mode%" == "-16" (
170    if %support16% EQU 0 goto modeSkip    if %support16% EQU 0 goto modeSkip
171    echo.    echo.
172    echo ---- Testing 16-bit library ----    echo ---- Testing 16-bit library ----
173    echo.    echo.
174  )  )
175    if "%mode%" == "-32" (
176      if %support32% EQU 0 goto modeSkip
177      echo.
178      echo ---- Testing 32-bit library ----
179      echo.
180    )
181  if "%do1%" == "yes" call :do1  if "%do1%" == "yes" call :do1
182  if "%do2%" == "yes" call :do2  if "%do2%" == "yes" call :do2
183  if "%do3%" == "yes" call :do3  if "%do3%" == "yes" call :do3
# Line 170  if "%do17%" == "yes" call :do17 Line 198  if "%do17%" == "yes" call :do17
198  if "%do18%" == "yes" call :do18  if "%do18%" == "yes" call :do18
199  if "%do19%" == "yes" call :do19  if "%do19%" == "yes" call :do19
200  if "%do20%" == "yes" call :do20  if "%do20%" == "yes" call :do20
201    if "%do21%" == "yes" call :do21
202    if "%do22%" == "yes" call :do22
203    if "%do23%" == "yes" call :do23
204    if "%do24%" == "yes" call :do24
205    if "%do25%" == "yes" call :do25
206    if "%do26%" == "yes" call :do26
207  :modeSkip  :modeSkip
208  if "%mode%" == "" (  if "%mode%" == "" (
209    set mode=-16    set mode=-16
210    set bits=16    set bits=16
211    goto nextMode    goto nextMode
212  )  )
213    if "%mode%" == "-16" (
214      set mode=-32
215      set bits=32
216      goto nextMode
217    )
218    
219    @rem If mode is -32, testing is finished
220  if %failed% == "yes" (  if %failed% == "yes" (
221  echo In above output, one or more of the various tests failed!  echo In above output, one or more of the various tests failed!
222  exit /b 1  exit /b 1
# Line 224  if errorlevel 1 ( Line 264  if errorlevel 1 (
264    goto :eof    goto :eof
265  )  )
266    
267    set type=
268  if [%1]==[11] (  if [%1]==[11] (
269    fc /n %srcdir%\testdata\%testoutput%-%bits% %2%bits%\%testoutput% >NUL    set type=-%bits%
270  ) else (  )
271    fc /n %srcdir%\testdata\%testoutput% %2%bits%\%testoutput% >NUL  if [%1]==[18] (
272      set type=-%bits%
273    )
274    if [%1]==[21] (
275      set type=-%bits%
276    )
277    if [%1]==[22] (
278      set type=-%bits%
279  )  )
280    
281    fc /n %srcdir%\testdata\%testoutput%%type% %2%bits%\%testoutput% >NUL
282    
283  if errorlevel 1 (  if errorlevel 1 (
284    echo.          failed comparison: fc /n %srcdir%\testdata\%testoutput% %2%bits%\%testoutput%    echo.          failed comparison: fc /n %srcdir%\testdata\%testoutput% %2%bits%\%testoutput%
285    if [%1]==[2] (    if [%1]==[2] (
# Line 256  echo.          Passed. Line 307  echo.          Passed.
307  goto :eof  goto :eof
308    
309  :do1  :do1
310  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
311  call :runsub 1 testoutstudy "Test with Study Override" -q -s  call :runsub 1 testoutstudy "Test with Study Override" -q -s
312  if %jit% EQU 1 call :runsub 1 testoutjit "Test with JIT Override" -q -s+  if %jit% EQU 1 call :runsub 1 testoutjit "Test with JIT Override" -q -s+
313  goto :eof  goto :eof
314    
315  :do2  :do2
316    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
317    call :runsub 2 testoutstudy "Test with Study Override" -q -s    call :runsub 2 testoutstudy "Test with Study Override" -q -s
318    if %jit% EQU 1 call :runsub 2 testoutjit "Test with JIT Override" -q -s+    if %jit% EQU 1 call :runsub 2 testoutjit "Test with JIT Override" -q -s+
319  goto :eof  goto :eof
# Line 274  goto :eof Line 325  goto :eof
325  goto :eof  goto :eof
326    
327  :do4  :do4
328    if %utf% EQU 0 (  if %utf% EQU 0 (
329    echo Test 4 Skipped due to absence of UTF-%bits% support.    echo Test 4 Skipped due to absence of UTF-%bits% support.
330    goto :eof    goto :eof
331  )  )
332    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
333    call :runsub 4 testoutstudy "Test with Study Override" -q -s    call :runsub 4 testoutstudy "Test with Study Override" -q -s
334    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+
335  goto :eof  goto :eof
336    
337  :do5  :do5
338    if %utf% EQU 0 (  if %utf% EQU 0 (
339    echo Test 5 Skipped due to absence of UTF-%bits% support.    echo Test 5 Skipped due to absence of UTF-%bits% support.
340    goto :eof    goto :eof
341  )  )
342    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
343    call :runsub 5 testoutstudy "Test with Study Override" -q -s    call :runsub 5 testoutstudy "Test with Study Override" -q -s
344    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+
345  goto :eof  goto :eof
# Line 319  goto :eof Line 370  goto :eof
370  goto :eof  goto :eof
371    
372  :do9  :do9
373    if %utf% EQU 0 (  if %utf% EQU 0 (
374    echo Test 9 Skipped due to absence of UTF-%bits% support.    echo Test 9 Skipped due to absence of UTF-%bits% support.
375    goto :eof    goto :eof
376  )  )
# Line 328  goto :eof Line 379  goto :eof
379    goto :eof    goto :eof
380    
381  :do10  :do10
382    if %ucp% EQU 0 (  if %ucp% EQU 0 (
383    echo Test 10 Skipped due to absence of Unicode property support.    echo Test 10 Skipped due to absence of Unicode property support.
384    goto :eof    goto :eof
385  )  )
# Line 337  goto :eof Line 388  goto :eof
388  goto :eof  goto :eof
389    
390  :do11  :do11
391    if NOT %link_size% EQU 2 (  if NOT %link_size% EQU 2 (
392    echo Test 11 Skipped because link size is not 2.    echo Test 11 Skipped because link size is not 2.
393    goto :eof    goto :eof
394  )  )
395    if %ucp% EQU 0 (  if %ucp% EQU 0 (
396    echo Test 11 Skipped due to absence of Unicode property support.    echo Test 11 Skipped due to absence of Unicode property support.
397    goto :eof    goto :eof
398  )  )
# Line 354  if %jit% EQU 0 ( Line 405  if %jit% EQU 0 (
405    echo Test 12 Skipped due to absence of JIT support.    echo Test 12 Skipped due to absence of JIT support.
406    goto :eof    goto :eof
407  )  )
408    call :runsub 12 testout "JIT-specific features - have JIT" -q    call :runsub 12 testout "JIT-specific features (JIT available)" -q
409  goto :eof  goto :eof
410    
411  :do13  :do13
412    if %jit% EQU 1 (  if %jit% EQU 1 (
413    echo Test 13 Skipped due to presence of JIT support.    echo Test 13 Skipped due to presence of JIT support.
414    goto :eof    goto :eof
415  )  )
416    call :runsub 13 testout "JIT-specific features - no JIT" -q    call :runsub 13 testout "JIT-specific features (JIT not available)" -q
417  goto :eof  goto :eof
418    
419  :do14  :do14
420    if NOT %bits% EQU 8 (  if NOT %bits% EQU 8 (
421    echo Test 14 Skipped when running 16-bit tests.    echo Test 14 Skipped when running 16/32-bit tests.
422    goto :eof    goto :eof
423  )  )
424    copy /Y %srcdir%\testdata\saved16 testsaved16    copy /Y %srcdir%\testdata\saved16 testsaved16
425      copy /Y %srcdir%\testdata\saved32 testsaved32
426    call :runsub 14 testout "Specials for the basic 8-bit library" -q    call :runsub 14 testout "Specials for the basic 8-bit library" -q
427    call :runsub 14 testoutstudy "Test with Study Override" -q -s    call :runsub 14 testoutstudy "Test with Study Override" -q -s
428    if %jit% EQU 1 call :runsub 14 testoutjit "Test with JIT Override" -q -s+    if %jit% EQU 1 call :runsub 14 testoutjit "Test with JIT Override" -q -s+
429  goto :eof  goto :eof
430    
431  :do15  :do15
432    if NOT %bits% EQU 8 (  if NOT %bits% EQU 8 (
433    echo Test 15 Skipped when running 16-bit tests.    echo Test 15 Skipped when running 16/32-bit tests.
434    goto :eof    goto :eof
435  )  )
436    if %utf% EQU 0 (  if %utf% EQU 0 (
437    echo Test 15 Skipped due to absence of UTF-8 support.    echo Test 15 Skipped due to absence of UTF-%bits% support.
438    goto :eof    goto :eof
439  )  )
440    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
441    call :runsub 15 testoutstudy "Test with Study Override" -q -s    call :runsub 15 testoutstudy "Test with Study Override" -q -s
442    if %jit% EQU 1 call :runsub 15 testoutjit "Test with JIT Override" -q -s+    if %jit% EQU 1 call :runsub 15 testoutjit "Test with JIT Override" -q -s+
443  goto :eof  goto :eof
444    
445  :do16  :do16
446    if NOT %bits% EQU 8 (  if NOT %bits% EQU 8 (
447    echo Test 16 Skipped when running 16-bit tests.    echo Test 16 Skipped when running 16/32-bit tests.
448    goto :eof    goto :eof
449  )  )
450    if %ucp% EQU 0 (  if %ucp% EQU 0 (
451    echo Test 16 Skipped due to absence of Unicode property support.    echo Test 16 Skipped due to absence of Unicode property support.
452    goto :eof    goto :eof
453  )  )
# Line 405  goto :eof Line 457  goto :eof
457  goto :eof  goto :eof
458    
459  :do17  :do17
460    if NOT %bits% EQU 16 (  if %bits% EQU 8 (
461    echo Test 17 Skipped when running 8-bit tests.    echo Test 17 Skipped when running 8-bit tests.
462    goto :eof    goto :eof
463  )  )
464    copy /Y %srcdir%\testdata\saved8 testsaved8    call :runsub 17 testout "Specials for the basic 16/32-bit library" -q
   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  
465    call :runsub 17 testoutstudy "Test with Study Override" -q -s    call :runsub 17 testoutstudy "Test with Study Override" -q -s
466    if %jit% EQU 1 call :runsub 17 testoutjit "Test with JIT Override" -q -s+    if %jit% EQU 1 call :runsub 17 testoutjit "Test with JIT Override" -q -s+
467  goto :eof  goto :eof
468    
469  :do18  :do18
470    if NOT %bits% EQU 16 (  if %bits% EQU 8 (
471    echo Test 18 Skipped when running 8-bit tests.    echo Test 18 Skipped when running 8-bit tests.
472    goto :eof    goto :eof
473  )  )
474    if %utf% EQU 0 (  if %utf% EQU 0 (
475    echo Test 18 Skipped due to absence of UTF-8 support.    echo Test 18 Skipped due to absence of UTF-%bits% support.
476    goto :eof    goto :eof
477  )  )
478    copy /Y %srcdir%\testdata\saved16LE-2 testsaved16LE-2    call :runsub 18 testout "Specials for the 16/32-bit library with UTF-%bits% support" -q
   copy /Y %srcdir%\testdata\saved16BE-2 testsaved16BE-2  
   call :runsub 18 testout "Specials for the basic 8-bit library" -q  
479    call :runsub 18 testoutstudy "Test with Study Override" -q -s    call :runsub 18 testoutstudy "Test with Study Override" -q -s
480    if %jit% EQU 1 call :runsub 18 testoutjit "Test with JIT Override" -q -s+    if %jit% EQU 1 call :runsub 18 testoutjit "Test with JIT Override" -q -s+
481  goto :eof  goto :eof
482    
483  :do19  :do19
484    if NOT %bits% EQU 16 (  if %bits% EQU 8 (
485    echo Test 19 Skipped when running 8-bit tests.    echo Test 19 Skipped when running 8-bit tests.
486    goto :eof    goto :eof
487  )  )
488    if %ucp% EQU 0 (  if %ucp% EQU 0 (
489    echo Test 19 Skipped due to absence of Unicode property support.    echo Test 19 Skipped due to absence of Unicode property support.
490    goto :eof    goto :eof
491  )  )
492    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
493    call :runsub 19 testoutstudy "Test with Study Override" -q -s    call :runsub 19 testoutstudy "Test with Study Override" -q -s
494    if %jit% EQU 1 call :runsub 19 testoutjit "Test with JIT Override" -q -s+    if %jit% EQU 1 call :runsub 19 testoutjit "Test with JIT Override" -q -s+
495  goto :eof  goto :eof
496    
497  :do20  :do20
498    if NOT %bits% EQU 16 (  if %bits% EQU 8 (
499    echo Test 20 Skipped when running 8-bit tests.    echo Test 20 Skipped when running 8-bit tests.
500    goto :eof    goto :eof
501  )  )
502    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
503    call :runsub 20 testoutstudy "Test with Study Override" -q -s    call :runsub 20 testoutstudy "Test with Study Override" -q -s
504  goto :eof  goto :eof
505    
506    :do21
507    if %bits% EQU 8 (
508      echo Test 21 Skipped when running 8-bit tests.
509      goto :eof
510    )
511    if NOT %link_size% EQU 2 (
512      echo Test 21 Skipped because link size is not 2.
513      goto :eof
514    )
515    copy /Y %srcdir%\testdata\saved8 testsaved8
516    copy /Y %srcdir%\testdata\saved16LE-1 testsaved16LE-1
517    copy /Y %srcdir%\testdata\saved16BE-1 testsaved16BE-1
518    copy /Y %srcdir%\testdata\saved32LE-1 testsaved32LE-1
519    copy /Y %srcdir%\testdata\saved32BE-1 testsaved32BE-1
520    call :runsub 21 testout "Reloads for the basic 16/32-bit library" -q
521    call :runsub 21 testoutstudy "Test with Study Override" -q -s
522    if %jit% EQU 1 call :runsub 21 testoutjit "Test with JIT Override" -q -s+
523    goto :eof
524    
525    :do22
526    if %bits% EQU 8 (
527      echo Test 22 Skipped when running 8-bit tests.
528      goto :eof
529    )
530    if %utf% EQU 0 (
531      echo Test 22 Skipped due to absence of UTF-%bits% support.
532      goto :eof
533    )
534    if NOT %link_size% EQU 2 (
535      echo Test 22 Skipped because link size is not 2.
536      goto :eof
537    )
538    copy /Y %srcdir%\testdata\saved16LE-2 testsaved16LE-2
539    copy /Y %srcdir%\testdata\saved16BE-2 testsaved16BE-2
540    copy /Y %srcdir%\testdata\saved32LE-2 testsaved32LE-2
541    copy /Y %srcdir%\testdata\saved32BE-2 testsaved32BE-2
542    call :runsub 22 testout "Reloads for the 16/32-bit library with UTF-16/32 support" -q
543    call :runsub 22 testoutstudy "Test with Study Override" -q -s
544    if %jit% EQU 1 call :runsub 22 testoutjit "Test with JIT Override" -q -s+
545    goto :eof
546    
547    :do23
548    if NOT %bits% EQU 16 (
549      echo Test 23 Skipped when running 8/32-bit tests.
550      goto :eof
551    )
552    call :runsub 23 testout "Specials for the 16-bit library" -q
553    call :runsub 23 testoutstudy "Test with Study Override" -q -s
554    if %jit% EQU 1 call :runsub 23 testoutjit "Test with JIT Override" -q -s+
555    goto :eof
556    
557    :do24
558    if NOT %bits% EQU 16 (
559      echo Test 24 Skipped when running 8/32-bit tests.
560      goto :eof
561    )
562    if %utf% EQU 0 (
563      echo Test 24 Skipped due to absence of UTF-%bits% support.
564      goto :eof
565    )
566    call :runsub 24 testout "Specials for the 16-bit library with UTF-16 support" -q
567    call :runsub 24 testoutstudy "Test with Study Override" -q -s
568    if %jit% EQU 1 call :runsub 24 testoutjit "Test with JIT Override" -q -s+
569    goto :eof
570    
571    :do25
572    if NOT %bits% EQU 32 (
573      echo Test 25 Skipped when running 8/16-bit tests.
574      goto :eof
575    )
576    call :runsub 25 testout "Specials for the 32-bit library" -q
577    call :runsub 25 testoutstudy "Test with Study Override" -q -s
578    if %jit% EQU 1 call :runsub 25 testoutjit "Test with JIT Override" -q -s+
579    goto :eof
580    
581    :do26
582    if NOT %bits% EQU 32 (
583      echo Test 26 Skipped when running 8/16-bit tests.
584      goto :eof
585    )
586    if %utf% EQU 0 (
587      echo Test 26 Skipped due to absence of UTF-%bits% support.
588      goto :eof
589    )
590    call :runsub 26 testout "Specials for the 32-bit library with UTF-32 support" -q
591    call :runsub 26 testoutstudy "Test with Study Override" -q -s
592    if %jit% EQU 1 call :runsub 26 testoutjit "Test with JIT Override" -q -s+
593    goto :eof
594    
595  :conferror  :conferror
596  @echo.  @echo.
597  @echo Either your build is incomplete or you have a configuration error.  @echo Either your build is incomplete or you have a configuration error.

Legend:
Removed from v.1206  
changed lines
  Added in v.1207

  ViewVC Help
Powered by ViewVC 1.1.5