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

Diff of /code/trunk/RunTest

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

revision 673 by ph10, Tue Aug 23 11:17:49 2011 UTC revision 674 by ph10, Fri Aug 26 18:17:51 2011 UTC
# Line 15  Line 15 
15    
16  # When JIT support is available, all the tests are also run with -s+ to test  # When JIT support is available, all the tests are also run with -s+ to test
17  # (again, almost) everything with studying and the JIT option. There are also  # (again, almost) everything with studying and the JIT option. There are also
18  # two tests for JIT-specific features, one to be run when JIT support is  # two tests for JIT-specific features, one to be run when JIT support is
19  # available, and one when it is not.  # available, and one when it is not.
20    
21  valgrind=  valgrind=
# Line 48  utf8=$? Line 48  utf8=$?
48  ucp=$?  ucp=$?
49    
50  jitopt=  jitopt=
51  ./pcretest -C | ./pcregrep 'No Just-in-time compiler support' >/dev/null  ./pcretest -C | ./pcregrep \
52      'No Just-in-time compiler support|this architecture is unsupported' \
53      >/dev/null
54  jit=$?  jit=$?
55  if [ $jit -ne 0 ] ; then  if [ $jit -ne 0 ] ; then
56    jitopt=-s+    jitopt=-s+
57  fi  else
58      ./pcretest -C | ./pcregrep 'this architecture is unsupported' >/dev/null
59      jitnotcompiled=$?
60    fi
61    
62    
63  # Select which tests to run; for those that are explicitly requested, check  # Select which tests to run; for those that are explicitly requested, check
64  # that the necessary optional facilities are available.  # that the necessary optional facilities are available.
# Line 151  else Line 157  else
157      echo "Can't run test 15 because JIT support is configured"      echo "Can't run test 15 because JIT support is configured"
158      exit 1      exit 1
159    fi    fi
160  fi  fi
161    
162  # If no specific tests were requested, select all. Those that are not  # If no specific tests were requested, select all. Those that are not
163  # relevant will be skipped.  # relevant will be skipped.
# Line 194  if [ $do1 = yes ] ; then Line 200  if [ $do1 = yes ] ; then
200        if [ $? != 0 ] ; then exit 1; fi        if [ $? != 0 ] ; then exit 1; fi
201      else exit 1      else exit 1
202      fi      fi
203      if [ "$opt" = "-s" ] ; then echo "  OK with study"      if [ "$opt" = "-s" ] ; then echo "  OK with study"
204      elif [ "$opt" = "-s+" ] ; then echo "  OK with JIT study"      elif [ "$opt" = "-s+" ] ; then echo "  OK with JIT study"
205      else echo "  OK"      else echo "  OK"
206      fi      fi
207    done    done
208  fi  fi
# Line 219  if [ $do2 = yes ] ; then Line 225  if [ $do2 = yes ] ; then
225        echo " "        echo " "
226        exit 1        exit 1
227      fi      fi
228      if [ "$opt" = "-s" ] ; then echo "  OK with study"      if [ "$opt" = "-s" ] ; then echo "  OK with study"
229      elif [ "$opt" = "-s+" ] ; then echo "  OK with JIT study"      elif [ "$opt" = "-s+" ] ; then echo "  OK with JIT study"
230      else echo "  OK"      else echo "  OK"
231      fi      fi
232    done    done
233  fi  fi
# Line 262  if [ $do3 = yes ] ; then Line 268  if [ $do3 = yes ] ; then
268            echo "settings rather than a bug in PCRE."            echo "settings rather than a bug in PCRE."
269            break;            break;
270          else          else
271            if [ "$opt" = "-s" ] ; then echo "  OK with study"            if [ "$opt" = "-s" ] ; then echo "  OK with study"
272            elif [ "$opt" = "-s+" ] ; then echo "  OK with JIT study"            elif [ "$opt" = "-s+" ] ; then echo "  OK with JIT study"
273            else echo "  OK"            else echo "  OK"
274            fi            fi
275          fi          fi
276        else exit 1        else exit 1
# Line 284  if [ $do4 = yes ] ; then Line 290  if [ $do4 = yes ] ; then
290    echo "Test 4: UTF-8 support (Compatible with Perl >= 5.8)"    echo "Test 4: UTF-8 support (Compatible with Perl >= 5.8)"
291    if [ $utf8 -eq 0 ] ; then    if [ $utf8 -eq 0 ] ; then
292      echo "  Skipped because UTF-8 support is not available"      echo "  Skipped because UTF-8 support is not available"
293    else    else
294      for opt in "" "-s" $jitopt; do      for opt in "" "-s" $jitopt; do
295        $valgrind ./pcretest -q $opt $testdata/testinput4 testtry        $valgrind ./pcretest -q $opt $testdata/testinput4 testtry
296        if [ $? = 0 ] ; then        if [ $? = 0 ] ; then
# Line 292  if [ $do4 = yes ] ; then Line 298  if [ $do4 = yes ] ; then
298          if [ $? != 0 ] ; then exit 1; fi          if [ $? != 0 ] ; then exit 1; fi
299        else exit 1        else exit 1
300        fi        fi
301        if [ "$opt" = "-s" ] ; then echo "  OK with study"        if [ "$opt" = "-s" ] ; then echo "  OK with study"
302        elif [ "$opt" = "-s+" ] ; then echo "  OK with JIT study"        elif [ "$opt" = "-s+" ] ; then echo "  OK with JIT study"
303        else echo "  OK"        else echo "  OK"
304        fi        fi
305      done      done
306    fi    fi
307  fi  fi
308    
309  if [ $do5 = yes ] ; then  if [ $do5 = yes ] ; then
310    echo "Test 5: API, internals, and non-Perl stuff for UTF-8 support"    echo "Test 5: API, internals, and non-Perl stuff for UTF-8 support"
311    if [ $utf8 -eq 0 ] ; then    if [ $utf8 -eq 0 ] ; then
312      echo "  Skipped because UTF-8 support is not available"      echo "  Skipped because UTF-8 support is not available"
313    else    else
314      for opt in "" "-s" $jitopt; do      for opt in "" "-s" $jitopt; do
315        $valgrind ./pcretest -q $opt $testdata/testinput5 testtry        $valgrind ./pcretest -q $opt $testdata/testinput5 testtry
316        if [ $? = 0 ] ; then        if [ $? = 0 ] ; then
# Line 312  if [ $do5 = yes ] ; then Line 318  if [ $do5 = yes ] ; then
318          if [ $? != 0 ] ; then exit 1; fi          if [ $? != 0 ] ; then exit 1; fi
319        else exit 1        else exit 1
320        fi        fi
321        if [ "$opt" = "-s" ] ; then echo "  OK with study"        if [ "$opt" = "-s" ] ; then echo "  OK with study"
322        elif [ "$opt" = "-s+" ] ; then echo "  OK with JIT study"        elif [ "$opt" = "-s+" ] ; then echo "  OK with JIT study"
323        else echo "  OK"        else echo "  OK"
324        fi        fi
325      done      done
326    fi    fi
327  fi  fi
328    
329  if [ $do6 = yes ] ; then  if [ $do6 = yes ] ; then
330    echo "Test 6: Unicode property support (Compatible with Perl >= 5.10)"    echo "Test 6: Unicode property support (Compatible with Perl >= 5.10)"
331    if [ $utf8 -eq 0 -o $ucp -eq 0 ] ; then    if [ $utf8 -eq 0 -o $ucp -eq 0 ] ; then
332      echo "  Skipped because Unicode property support is not available"      echo "  Skipped because Unicode property support is not available"
333    else    else
334      for opt in "" "-s" $jitopt; do      for opt in "" "-s" $jitopt; do
335        $valgrind ./pcretest -q $opt $testdata/testinput6 testtry        $valgrind ./pcretest -q $opt $testdata/testinput6 testtry
336        if [ $? = 0 ] ; then        if [ $? = 0 ] ; then
# Line 332  if [ $do6 = yes ] ; then Line 338  if [ $do6 = yes ] ; then
338          if [ $? != 0 ] ; then exit 1; fi          if [ $? != 0 ] ; then exit 1; fi
339        else exit 1        else exit 1
340        fi        fi
341        if [ "$opt" = "-s" ] ; then echo "  OK with study"        if [ "$opt" = "-s" ] ; then echo "  OK with study"
342        elif [ "$opt" = "-s+" ] ; then echo "  OK with JIT study"        elif [ "$opt" = "-s+" ] ; then echo "  OK with JIT study"
343        else echo "  OK"        else echo "  OK"
344        fi        fi
345      done      done
346    fi    fi
347  fi  fi
348    
349  # Tests for DFA matching support  # Tests for DFA matching support
# Line 359  if [ $do8 = yes ] ; then Line 365  if [ $do8 = yes ] ; then
365    echo "Test 8: DFA matching with UTF-8"    echo "Test 8: DFA matching with UTF-8"
366    if [ $utf8 -eq 0 ] ; then    if [ $utf8 -eq 0 ] ; then
367      echo "  Skipped because UTF-8 support is not available"      echo "  Skipped because UTF-8 support is not available"
368    else    else
369      for opt in "" "-s"; do      for opt in "" "-s"; do
370        $valgrind ./pcretest -q $opt -dfa $testdata/testinput8 testtry        $valgrind ./pcretest -q $opt -dfa $testdata/testinput8 testtry
371        if [ $? = 0 ] ; then        if [ $? = 0 ] ; then
# Line 369  if [ $do8 = yes ] ; then Line 375  if [ $do8 = yes ] ; then
375        fi        fi
376        if [ "$opt" = "-s" ] ; then echo "  OK with study" ; else echo "  OK"; fi        if [ "$opt" = "-s" ] ; then echo "  OK with study" ; else echo "  OK"; fi
377      done      done
378    fi    fi
379  fi  fi
380    
381  if [ $do9 = yes ] ; then  if [ $do9 = yes ] ; then
382    echo "Test 9: DFA matching with Unicode properties"    echo "Test 9: DFA matching with Unicode properties"
383    if [ $utf8 -eq 0 -o $ucp -eq 0 ] ; then    if [ $utf8 -eq 0 -o $ucp -eq 0 ] ; then
384      echo "  Skipped because Unicode property support is not available"      echo "  Skipped because Unicode property support is not available"
385    else    else
386      for opt in "" "-s"; do      for opt in "" "-s"; do
387        $valgrind ./pcretest -q $opt -dfa $testdata/testinput9 testtry        $valgrind ./pcretest -q $opt -dfa $testdata/testinput9 testtry
388        if [ $? = 0 ] ; then        if [ $? = 0 ] ; then
# Line 386  if [ $do9 = yes ] ; then Line 392  if [ $do9 = yes ] ; then
392        fi        fi
393        if [ "$opt" = "-s" ] ; then echo "  OK with study" ; else echo "  OK"; fi        if [ "$opt" = "-s" ] ; then echo "  OK with study" ; else echo "  OK"; fi
394      done      done
395    fi    fi
396  fi  fi
397    
398  # Test of internal offsets and code sizes. This test is run only when there  # Test of internal offsets and code sizes. This test is run only when there
# Line 397  fi Line 403  fi
403    
404  if [ $do10 = yes ] ; then  if [ $do10 = yes ] ; then
405    echo "Test 10: Internal offsets and code size tests"    echo "Test 10: Internal offsets and code size tests"
406    if [ $link_size -ne 2 ] ; then    if [ $link_size -ne 2 ] ; then
407      echo "  Skipped because link size is not 2"      echo "  Skipped because link size is not 2"
408    elif [ $ucp -eq 0 ] ; then    elif [ $ucp -eq 0 ] ; then
409      echo "  Skipped because Unicode property support is not available"      echo "  Skipped because Unicode property support is not available"
410    else    else
411      for opt in "" "-s"; do      for opt in "" "-s"; do
412        $valgrind ./pcretest -q $opt $testdata/testinput10 testtry        $valgrind ./pcretest -q $opt $testdata/testinput10 testtry
413        if [ $? = 0 ] ; then        if [ $? = 0 ] ; then
# Line 411  if [ $do10 = yes ] ; then Line 417  if [ $do10 = yes ] ; then
417        fi        fi
418        if [ "$opt" = "-s" ] ; then echo "  OK with study" ; else echo "  OK"; fi        if [ "$opt" = "-s" ] ; then echo "  OK with study" ; else echo "  OK"; fi
419      done      done
420    fi    fi
421  fi  fi
422    
423  # Test of Perl >= 5.10 features without UTF8 support  # Test of Perl >= 5.10 features without UTF8 support
# Line 425  if [ $do11 = yes ] ; then Line 431  if [ $do11 = yes ] ; then
431        if [ $? != 0 ] ; then exit 1; fi        if [ $? != 0 ] ; then exit 1; fi
432      else exit 1      else exit 1
433      fi      fi
434      if [ "$opt" = "-s" ] ; then echo "  OK with study"      if [ "$opt" = "-s" ] ; then echo "  OK with study"
435      elif [ "$opt" = "-s+" ] ; then echo "  OK with JIT study"      elif [ "$opt" = "-s+" ] ; then echo "  OK with JIT study"
436      else echo "  OK"      else echo "  OK"
437      fi      fi
438    done    done
439  fi  fi
# Line 438  if [ $do12 = yes ] ; then Line 444  if [ $do12 = yes ] ; then
444    echo "Test 12: Features from Perl >= 5.10 with UTF8 support"    echo "Test 12: Features from Perl >= 5.10 with UTF8 support"
445    if [ $utf8 -eq 0 ] ; then    if [ $utf8 -eq 0 ] ; then
446      echo "  Skipped because UTF-8 support is not available"      echo "  Skipped because UTF-8 support is not available"
447    else    else
448      for opt in "" "-s" $jitopt; do      for opt in "" "-s" $jitopt; do
449        $valgrind ./pcretest -q $opt $testdata/testinput12 testtry        $valgrind ./pcretest -q $opt $testdata/testinput12 testtry
450        if [ $? = 0 ] ; then        if [ $? = 0 ] ; then
# Line 446  if [ $do12 = yes ] ; then Line 452  if [ $do12 = yes ] ; then
452          if [ $? != 0 ] ; then exit 1; fi          if [ $? != 0 ] ; then exit 1; fi
453        else exit 1        else exit 1
454        fi        fi
455        if [ "$opt" = "-s" ] ; then echo "  OK with study"        if [ "$opt" = "-s" ] ; then echo "  OK with study"
456        elif [ "$opt" = "-s+" ] ; then echo "  OK with JIT study"        elif [ "$opt" = "-s+" ] ; then echo "  OK with JIT study"
457        else echo "  OK"        else echo "  OK"
458        fi        fi
459      done      done
460    fi    fi
461  fi  fi
462    
463  # Test non-Perl-compatible Unicode property support  # Test non-Perl-compatible Unicode property support
# Line 460  if [ $do13 = yes ] ; then Line 466  if [ $do13 = yes ] ; then
466    echo "Test 13: API, internals, and non-Perl stuff for Unicode property support"    echo "Test 13: API, internals, and non-Perl stuff for Unicode property support"
467    if [ $utf8 -eq 0 -o $ucp -eq 0 ] ; then    if [ $utf8 -eq 0 -o $ucp -eq 0 ] ; then
468      echo "  Skipped because Unicode property support is not available"      echo "  Skipped because Unicode property support is not available"
469    else    else
470      for opt in "" "-s" $jitopt; do      for opt in "" "-s" $jitopt; do
471        $valgrind ./pcretest -q $opt $testdata/testinput13 testtry        $valgrind ./pcretest -q $opt $testdata/testinput13 testtry
472        if [ $? = 0 ] ; then        if [ $? = 0 ] ; then
# Line 468  if [ $do13 = yes ] ; then Line 474  if [ $do13 = yes ] ; then
474          if [ $? != 0 ] ; then exit 1; fi          if [ $? != 0 ] ; then exit 1; fi
475        else exit 1        else exit 1
476        fi        fi
477        if [ "$opt" = "-s" ] ; then echo "  OK with study"        if [ "$opt" = "-s" ] ; then echo "  OK with study"
478        elif [ "$opt" = "-s+" ] ; then echo "  OK with JIT study"        elif [ "$opt" = "-s+" ] ; then echo "  OK with JIT study"
479        else echo "  OK"        else echo "  OK"
480        fi        fi
481      done      done
482    fi    fi
483  fi  fi
484    
485  # Test JIT-specific features when JIT is available  # Test JIT-specific features when JIT is available
486    
487  if [ $do14 = yes ] ; then  if [ $do14 = yes ] ; then
488    echo "Test 14: JIT-specific features (JIT available)"    echo "Test 14: JIT-specific features (JIT available and usable)"
489    if [ $jit -eq 0 ] ; then    if [ $jit -eq 0 ] ; then
490      echo "  Skipped because JIT is not available"      echo "  Skipped because JIT is not available or not usable"
491    else    else
492      $valgrind ./pcretest -q $testdata/testinput14 testtry      $valgrind ./pcretest -q $testdata/testinput14 testtry
493      if [ $? = 0 ] ; then      if [ $? = 0 ] ; then
# Line 489  if [ $do14 = yes ] ; then Line 495  if [ $do14 = yes ] ; then
495        if [ $? != 0 ] ; then exit 1; fi        if [ $? != 0 ] ; then exit 1; fi
496      else exit 1      else exit 1
497      fi      fi
498      echo "  OK"      echo "  OK"
499    fi    fi
500  fi  fi
501    
502  # Test JIT-specific features when JIT is not available  # Test JIT-specific features when JIT is not available
503    
504  if [ $do15 = yes ] ; then  if [ $do15 = yes ] ; then
505    echo "Test 15: JIT-specific features (JIT not available)"    echo "Test 15: JIT-specific features (JIT not available or not usable)"
506    if [ $jit -ne 0 ] ; then    if [ $jit -ne 0 ] ; then
507      echo "  Skipped because JIT is available"      echo "  Skipped because JIT is available"
508      elif [ $jitnotcompiled -eq 0 ] ; then
509        echo "  Skipped because JIT does not support this architecture"
510    else    else
511      $valgrind ./pcretest -q $testdata/testinput15 testtry      $valgrind ./pcretest -q $testdata/testinput15 testtry
512      if [ $? = 0 ] ; then      if [ $? = 0 ] ; then
# Line 506  if [ $do15 = yes ] ; then Line 514  if [ $do15 = yes ] ; then
514        if [ $? != 0 ] ; then exit 1; fi        if [ $? != 0 ] ; then exit 1; fi
515      else exit 1      else exit 1
516      fi      fi
517      echo "  OK"      echo "  OK"
518    fi    fi
519  fi  fi
520    
521  # End  # End

Legend:
Removed from v.673  
changed lines
  Added in v.674

webmaster@exim.org
ViewVC Help
Powered by ViewVC 1.1.12