diff options
Diffstat (limited to 'RunTest')
-rwxr-xr-x | RunTest | 37 |
1 files changed, 31 insertions, 6 deletions
@@ -17,8 +17,16 @@ # individual test numbers, ranges of tests such as 3-6 or 3- (meaning 3 to the # end), or a number preceded by ~ to exclude a test. For example, "3-15 ~10" # runs tests 3 to 15, excluding test 10, and just "~10" runs all the tests -# except test 10. Whatever order the arguments are in, the tests are always run -# in numerical order. +# except test 10. Whatever order the arguments are in, these tests are always +# run in numerical order. +# +# If no specific tests are selected (which is the case when this script is run +# via 'make check') the default is to run all the numbered tests. +# +# There may also be named (as well as numbered) tests for special purposes. At +# present there is just one, called "heap". This test's output contains the +# sizes of heap frames and frame vectors, which depend on the environment. It +# is therefore not run unless explicitly requested. # # Inappropriate tests are automatically skipped (with a comment to say so). For # example, if JIT support is not compiled, test 16 is skipped, whereas if JIT @@ -82,6 +90,7 @@ title24="Test 24: Non-UTF pattern conversion tests" title25="Test 25: UTF pattern conversion tests" title26="Test 26: Auto-generated unicode property tests" maxtest=26 +titleheap="Test 'heap': Environment-specific heap tests" if [ $# -eq 1 -a "$1" = "list" ]; then echo $title0 @@ -111,6 +120,11 @@ if [ $# -eq 1 -a "$1" = "list" ]; then echo $title24 echo $title25 echo $title26 + echo "" + echo $titleheap + echo "" + echo "Numbered tests are automatically run if nothing selected." + echo "Named tests must be explicitly selected." exit 0 fi @@ -241,6 +255,7 @@ do23=no do24=no do25=no do26=no +doheap=no while [ $# -gt 0 ] ; do case $1 in @@ -271,6 +286,7 @@ while [ $# -gt 0 ] ; do 24) do24=yes;; 25) do25=yes;; 26) do26=yes;; + heap) doheap=yes;; -8) arg8=yes;; -16) arg16=yes;; -32) arg32=yes;; @@ -412,8 +428,8 @@ if [ $jit -ne 0 -a "$nojit" != "yes" ] ; then fi fi -# If no specific tests were requested, select all. Those that are not -# relevant will be automatically skipped. +# If no specific tests were requested, select all the numbered tests. Those +# that are not relevant will be automatically skipped. if [ $do0 = no -a $do1 = no -a $do2 = no -a $do3 = no -a \ $do4 = no -a $do5 = no -a $do6 = no -a $do7 = no -a \ @@ -421,7 +437,7 @@ if [ $do0 = no -a $do1 = no -a $do2 = no -a $do3 = no -a \ $do12 = no -a $do13 = no -a $do14 = no -a $do15 = no -a \ $do16 = no -a $do17 = no -a $do18 = no -a $do19 = no -a \ $do20 = no -a $do21 = no -a $do22 = no -a $do23 = no -a \ - $do24 = no -a $do25 = no -a $do26 = no \ + $do24 = no -a $do25 = no -a $do26 = no -a $doheap = no \ ]; then do0=yes do1=yes @@ -640,7 +656,7 @@ for bmode in "$test8" "$test16" "$test32"; do # Test of internal offsets and code sizes. This test is run only when there # is UTF/UCP support. The actual tests are mostly the same as in some of the # above, but in this test we inspect some offsets and sizes. This is a - # doublecheck for the maintainer, just in case something changes unexpectely. + # doublecheck for the maintainer, just in case something changes unexpectedly. # The output from this test is different in 8-bit, 16-bit, and 32-bit modes # and for different link sizes, so there are different output files for each # mode and link size. @@ -882,6 +898,15 @@ for bmode in "$test8" "$test16" "$test32"; do fi fi + # Manually selected heap tests - output may vary in different environments, + # which is why that are not automatically run. + + if [ $doheap = yes ] ; then + echo $titleheap + $sim $valgrind ./pcre2test -q $setstack $bmode $testdata/testinputheap testtry + checkresult $? heap-$bits "" + fi + # End of loop for 8/16/32-bit tests done |