Diff for /embedaddon/pcre/RunTest between versions 1.1.1.2 and 1.1.1.3

version 1.1.1.2, 2012/02/21 23:50:25 version 1.1.1.3, 2012/10/09 09:19:17
Line 26 Line 26
 # executables under a simulator, for example:  # executables under a simulator, for example:
 #  #
 # RunTest 3 sim "qemu-arm -s 8388608"  # RunTest 3 sim "qemu-arm -s 8388608"
   #
   # Finally, if the script is obeyed as "RunTest list", a list of available
   # tests is output, but none of them are run.
   
   # Define test titles in variables so that they can be output as a list. Some
   # of them are modified (e.g. with -8 or -16) when used in the actual tests.
   
   title1="Test 1: Main functionality (Compatible with Perl >= 5.10)"
   title2="Test 2: API, errors, internals, and non-Perl stuff"
   title3="Test 3: Locale-specific features"
   title4A="Test 4: UTF"
   title4B=" support (Compatible with Perl >= 5.10)"
   title5="Test 5: API, internals, and non-Perl stuff for UTF"
   title6="Test 6: Unicode property support (Compatible with Perl >= 5.10)"
   title7="Test 7: API, internals, and non-Perl stuff for Unicode property support"
   title8="Test 8: DFA matching main functionality"
   title9="Test 9: DFA matching with UTF"
   title10="Test 10: DFA matching with Unicode properties"
   title11="Test 11: Internal offsets and code size tests"
   title12="Test 12: JIT-specific features (JIT available)"
   title13="Test 13: JIT-specific features (JIT not available)"
   title14="Test 14: Specials for the basic 8-bit library"
   title15="Test 15: Specials for the 8-bit library with UTF-8 support"
   title16="Test 16: Specials for the 8-bit library with Unicode propery support"
   title17="Test 17: Specials for the basic 16-bit library"
   title18="Test 18: Specials for the 16-bit library with UTF-16 support"
   title19="Test 19: Specials for the 16-bit library with Unicode propery support"
   title20="Test 20: DFA specials for the basic 16-bit library"
   title21="Test 21: Reloads for the basic 16-bit library"
   title22="Test 22: Reloads for the 16-bit library with UTF-16 support"
   
   if [ $# -eq 1 -a "$1" = "list" ]; then
     echo $title1
     echo $title2 "(not UTF)"
     echo $title3
     echo $title4A $title4B
     echo $title5 support
     echo $title6
     echo $title7
     echo $title8
     echo $title9
     echo $title10
     echo $title11
     echo $title12
     echo $title13
     echo $title14
     echo $title15
     echo $title16
     echo $title17
     echo $title18
     echo $title19
     echo $title20
     echo $title21
     echo $title22
     exit 0
   fi
   
   # Default values
   
 valgrind=  valgrind=
 sim=  sim=
 arg8=  arg8=
Line 89  while [ $# -gt 0 ] ; do Line 147  while [ $# -gt 0 ] ; do
   -16) arg16=yes;;    -16) arg16=yes;;
    valgrind) valgrind="valgrind -q --smc-check=all";;     valgrind) valgrind="valgrind -q --smc-check=all";;
    sim) shift; sim=$1;;     sim) shift; sim=$1;;
    *) echo "Unknown test number $1"; exit 1;;    *) echo "Unknown test number '$1'"; exit 1;;
   esac    esac
   shift    shift
 done  done
Line 135  $sim ./pcretest -C pcre8 >/dev/null Line 193  $sim ./pcretest -C pcre8 >/dev/null
 support8=$?  support8=$?
 $sim ./pcretest -C pcre16 >/dev/null  $sim ./pcretest -C pcre16 >/dev/null
 support16=$?  support16=$?
if [ $(( $support8 + $support16 )) -eq 2 ] ; thenif [ `expr $support8 + $support16` -eq 2 ] ; then
   test8=    test8=
   test16=-16    test16=-16
   if [ "$arg8" = yes -a "$arg16" != yes ] ; then    if [ "$arg8" = yes -a "$arg16" != yes ] ; then
Line 295  for bmode in "$test8" "$test16"; do Line 353  for bmode in "$test8" "$test16"; do
 # Primary test, compatible with JIT and all versions of Perl >= 5.8  # Primary test, compatible with JIT and all versions of Perl >= 5.8
   
 if [ $do1 = yes ] ; then  if [ $do1 = yes ] ; then
  echo "Test 1: main functionality (Compatible with Perl >= 5.10)"  echo $title1
   for opt in "" "-s" $jitopt; do    for opt in "" "-s" $jitopt; do
     $sim $valgrind ./pcretest -q $bmode $opt $testdata/testinput1 testtry      $sim $valgrind ./pcretest -q $bmode $opt $testdata/testinput1 testtry
     if [ $? = 0 ] ; then      if [ $? = 0 ] ; then
Line 313  fi Line 371  fi
 # PCRE tests that are not JIT or Perl-compatible: API, errors, internals  # PCRE tests that are not JIT or Perl-compatible: API, errors, internals
   
 if [ $do2 = yes ] ; then  if [ $do2 = yes ] ; then
  echo "Test 2: API, errors, internals, and non-Perl stuff (not UTF-$bits)"  echo $title2 "(not UTF-$bits)"
   for opt in "" "-s" $jitopt; do    for opt in "" "-s" $jitopt; do
     $sim $valgrind ./pcretest -q $bmode $opt $testdata/testinput2 testtry      $sim $valgrind ./pcretest -q $bmode $opt $testdata/testinput2 testtry
     if [ $? = 0 ] ; then      if [ $? = 0 ] ; then
Line 367  if [ $do3 = yes ] ; then Line 425  if [ $do3 = yes ] ; then
   fi    fi
   
   if [ "$locale" != "" ] ; then    if [ "$locale" != "" ] ; then
    echo "Test 3: locale-specific features (using '$locale' locale)"    echo $title3 "(using '$locale' locale)"
     for opt in "" "-s" $jitopt; do      for opt in "" "-s" $jitopt; do
       $sim $valgrind ./pcretest -q $bmode $opt $infile testtry        $sim $valgrind ./pcretest -q $bmode $opt $infile testtry
       if [ $? = 0 ] ; then        if [ $? = 0 ] ; then
Line 398  fi Line 456  fi
 # Additional tests for UTF support  # Additional tests for UTF support
   
 if [ $do4 = yes ] ; then  if [ $do4 = yes ] ; then
  echo "Test 4: UTF-$bits support (Compatible with Perl >= 5.10)"  echo ${title4A}-${bits}${title4B}
   if [ $utf -eq 0 ] ; then    if [ $utf -eq 0 ] ; then
     echo "  Skipped because UTF-$bits support is not available"      echo "  Skipped because UTF-$bits support is not available"
   else    else
Line 418  if [ $do4 = yes ] ; then Line 476  if [ $do4 = yes ] ; then
 fi  fi
   
 if [ $do5 = yes ] ; then  if [ $do5 = yes ] ; then
  echo "Test 5: API, internals, and non-Perl stuff for UTF-$bits support"  echo ${title5}-${bits} support
   if [ $utf -eq 0 ] ; then    if [ $utf -eq 0 ] ; then
     echo "  Skipped because UTF-$bits support is not available"      echo "  Skipped because UTF-$bits support is not available"
   else    else
Line 438  if [ $do5 = yes ] ; then Line 496  if [ $do5 = yes ] ; then
 fi  fi
   
 if [ $do6 = yes ] ; then  if [ $do6 = yes ] ; then
  echo "Test 6: Unicode property support (Compatible with Perl >= 5.10)"  echo $title6
   if [ $utf -eq 0 -o $ucp -eq 0 ] ; then    if [ $utf -eq 0 -o $ucp -eq 0 ] ; then
     echo "  Skipped because Unicode property support is not available"      echo "  Skipped because Unicode property support is not available"
   else    else
Line 460  fi Line 518  fi
 # Test non-Perl-compatible Unicode property support  # Test non-Perl-compatible Unicode property support
   
 if [ $do7 = yes ] ; then  if [ $do7 = yes ] ; then
  echo "Test 7: API, internals, and non-Perl stuff for Unicode property support"  echo $title7
   if [ $utf -eq 0 -o $ucp -eq 0 ] ; then    if [ $utf -eq 0 -o $ucp -eq 0 ] ; then
     echo "  Skipped because Unicode property support is not available"      echo "  Skipped because Unicode property support is not available"
   else    else
Line 482  fi Line 540  fi
 # Tests for DFA matching support  # Tests for DFA matching support
   
 if [ $do8 = yes ] ; then  if [ $do8 = yes ] ; then
  echo "Test 8: DFA matching main functionality"  echo $title8
   for opt in "" "-s"; do    for opt in "" "-s"; do
     $sim $valgrind ./pcretest -q $bmode $opt -dfa $testdata/testinput8 testtry      $sim $valgrind ./pcretest -q $bmode $opt -dfa $testdata/testinput8 testtry
     if [ $? = 0 ] ; then      if [ $? = 0 ] ; then
Line 495  if [ $do8 = yes ] ; then Line 553  if [ $do8 = yes ] ; then
 fi  fi
   
 if [ $do9 = yes ] ; then  if [ $do9 = yes ] ; then
  echo "Test 9: DFA matching with UTF-$bits"  echo ${title9}-${bits}
   if [ $utf -eq 0 ] ; then    if [ $utf -eq 0 ] ; then
     echo "  Skipped because UTF-$bits support is not available"      echo "  Skipped because UTF-$bits support is not available"
   else    else
Line 512  if [ $do9 = yes ] ; then Line 570  if [ $do9 = yes ] ; then
 fi  fi
   
 if [ $do10 = yes ] ; then  if [ $do10 = yes ] ; then
  echo "Test 10: DFA matching with Unicode properties"  echo $title10
   if [ $utf -eq 0 -o $ucp -eq 0 ] ; then    if [ $utf -eq 0 -o $ucp -eq 0 ] ; then
     echo "  Skipped because Unicode property support is not available"      echo "  Skipped because Unicode property support is not available"
   else    else
Line 536  fi Line 594  fi
 # this test is not the same in 8-bit and 16-bit modes.  # this test is not the same in 8-bit and 16-bit modes.
   
 if [ $do11 = yes ] ; then  if [ $do11 = yes ] ; then
  echo "Test 11: Internal offsets and code size tests"  echo $title11
   if [ $link_size -ne 2 ] ; then    if [ $link_size -ne 2 ] ; then
     echo "  Skipped because link size is not 2"      echo "  Skipped because link size is not 2"
   elif [ $ucp -eq 0 ] ; then    elif [ $ucp -eq 0 ] ; then
Line 557  fi Line 615  fi
 # Test JIT-specific features when JIT is available  # Test JIT-specific features when JIT is available
   
 if [ $do12 = yes ] ; then  if [ $do12 = yes ] ; then
  echo "Test 12: JIT-specific features (JIT available)"  echo $title12
   if [ $jit -eq 0 ] ; then    if [ $jit -eq 0 ] ; then
     echo "  Skipped because JIT is not available or not usable"      echo "  Skipped because JIT is not available or not usable"
   else    else
Line 574  fi Line 632  fi
 # Test JIT-specific features when JIT is not available  # Test JIT-specific features when JIT is not available
   
 if [ $do13 = yes ] ; then  if [ $do13 = yes ] ; then
  echo "Test 13: JIT-specific features (JIT not available)"  echo $title13
   if [ $jit -ne 0 ] ; then    if [ $jit -ne 0 ] ; then
     echo "  Skipped because JIT is available"      echo "  Skipped because JIT is available"
   else    else
Line 591  fi Line 649  fi
 # Tests for 8-bit-specific features  # Tests for 8-bit-specific features
   
 if [ "$do14" = yes ] ; then  if [ "$do14" = yes ] ; then
  echo "Test 14: specials for the basic 8-bit library"  echo $title14
   if [ "$bits" = "16" ] ; then    if [ "$bits" = "16" ] ; then
     echo "  Skipped when running 16-bit tests"      echo "  Skipped when running 16-bit tests"
   else    else
Line 614  fi Line 672  fi
 # Tests for 8-bit-specific features (needs UTF-8 support)  # Tests for 8-bit-specific features (needs UTF-8 support)
   
 if [ "$do15" = yes ] ; then  if [ "$do15" = yes ] ; then
  echo "Test 15: specials for the 8-bit library with UTF-8 support"  echo $title15
   if [ "$bits" = "16" ] ; then    if [ "$bits" = "16" ] ; then
     echo "  Skipped when running 16-bit tests"      echo "  Skipped when running 16-bit tests"
   elif [ $utf -eq 0 ] ; then    elif [ $utf -eq 0 ] ; then
Line 638  fi Line 696  fi
 # Tests for 8-bit-specific features (Unicode property support)  # Tests for 8-bit-specific features (Unicode property support)
   
 if [ $do16 = yes ] ; then  if [ $do16 = yes ] ; then
  echo "Test 16: specials for the 8-bit library with Unicode propery support"  echo $title16
   if [ "$bits" = "16" ] ; then    if [ "$bits" = "16" ] ; then
     echo "  Skipped when running 16-bit tests"      echo "  Skipped when running 16-bit tests"
   elif [ $ucp -eq 0 ] ; then    elif [ $ucp -eq 0 ] ; then
Line 662  fi Line 720  fi
 # Tests for 16-bit-specific features  # Tests for 16-bit-specific features
   
 if [ $do17 = yes ] ; then  if [ $do17 = yes ] ; then
  echo "Test 17: specials for the basic 16-bit library"  echo $title17
   if [ "$bits" = "8" ] ; then    if [ "$bits" = "8" ] ; then
     echo "  Skipped when running 8-bit tests"      echo "  Skipped when running 8-bit tests"
   else    else
Line 684  fi Line 742  fi
 # Tests for 16-bit-specific features (UTF-16 support)  # Tests for 16-bit-specific features (UTF-16 support)
   
 if [ $do18 = yes ] ; then  if [ $do18 = yes ] ; then
  echo "Test 18: specials for the 16-bit library with UTF-16 support"  echo $title18
   if [ "$bits" = "8" ] ; then    if [ "$bits" = "8" ] ; then
     echo "  Skipped when running 8-bit tests"      echo "  Skipped when running 8-bit tests"
   elif [ $utf -eq 0 ] ; then    elif [ $utf -eq 0 ] ; then
Line 708  fi Line 766  fi
 # Tests for 16-bit-specific features (Unicode property support)  # Tests for 16-bit-specific features (Unicode property support)
   
 if [ $do19 = yes ] ; then  if [ $do19 = yes ] ; then
  echo "Test 19: specials for the 16-bit library with Unicode propery support"  echo $title19
   if [ "$bits" = "8" ] ; then    if [ "$bits" = "8" ] ; then
     echo "  Skipped when running 8-bit tests"      echo "  Skipped when running 8-bit tests"
   elif [ $ucp -eq 0 ] ; then    elif [ $ucp -eq 0 ] ; then
Line 732  fi Line 790  fi
 # Tests for 16-bit-specific features in DFA non-UTF-16 mode  # Tests for 16-bit-specific features in DFA non-UTF-16 mode
   
 if [ $do20 = yes ] ; then  if [ $do20 = yes ] ; then
  echo "Test 20: DFA specials for the basic 16-bit library"  echo $title20
   if [ "$bits" = "8" ] ; then    if [ "$bits" = "8" ] ; then
     echo "  Skipped when running 8-bit tests"      echo "  Skipped when running 8-bit tests"
   else    else
Line 753  fi Line 811  fi
 # Tests for reloads with 16-bit library  # Tests for reloads with 16-bit library
   
 if [ $do21 = yes ] ; then  if [ $do21 = yes ] ; then
  echo "Test 21: reloads for the basic 16-bit library"  echo $title21
   if [ "$bits" = "8" ] ; then    if [ "$bits" = "8" ] ; then
     echo "  Skipped when running 8-bit tests"      echo "  Skipped when running 8-bit tests"
   elif [ $link_size -ne 2 ] ; then    elif [ $link_size -ne 2 ] ; then
Line 775  fi Line 833  fi
 # Tests for reloads with 16-bit library (UTF-16 support)  # Tests for reloads with 16-bit library (UTF-16 support)
   
 if [ $do22 = yes ] ; then  if [ $do22 = yes ] ; then
  echo "Test 22: reloads for the 16-bit library with UTF-16 support"  echo $title22
   if [ "$bits" = "8" ] ; then    if [ "$bits" = "8" ] ; then
     echo "  Skipped when running 8-bit tests"      echo "  Skipped when running 8-bit tests"
   elif [ $utf -eq 0 ] ; then    elif [ $utf -eq 0 ] ; then

Removed from v.1.1.1.2  
changed lines
  Added in v.1.1.1.3


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>