From b205b9285d0feca53c32d7258fc02ecb926ca16b Mon Sep 17 00:00:00 2001 From: ph10 Date: Mon, 22 Aug 2011 14:56:43 +0000 Subject: Commit changes for JIT support git-svn-id: svn://vcs.exim.org/pcre/code/trunk@666 2f5784b3-3f2a-0410-8824-cb99058d5e15 --- RunTest | 81 ++++++++++++++++++++++++++++++++++++++++++++++------------------- 1 file changed, 58 insertions(+), 23 deletions(-) (limited to 'RunTest') diff --git a/RunTest b/RunTest index c8f0283..175be07 100755 --- a/RunTest +++ b/RunTest @@ -39,6 +39,13 @@ utf8=$? ./pcretest -C | ./pcregrep 'No Unicode properties support' >/dev/null ucp=$? +jitopt= +./pcretest -C | ./pcregrep 'No Just-in-time compiler support' >/dev/null +jit=$? +if [ $jit -ne 0 ] ; then + jitopt=-s+ +fi + # Select which tests to run; for those that are explicitly requested, check # that the necessary optional facilities are available. @@ -70,8 +77,8 @@ while [ $# -gt 0 ] ; do 10) do10=yes;; 11) do11=yes;; 12) do12=yes;; - 13) do12=yes;; - valgrind) valgrind="valgrind -q";; + 13) do13=yes;; + valgrind) valgrind="valgrind -q --smc-check=all";; *) echo "Unknown test number $1"; exit 1;; esac shift @@ -126,7 +133,8 @@ fi if [ $do1 = no -a $do2 = no -a $do3 = no -a $do4 = no -a \ $do5 = no -a $do6 = no -a $do7 = no -a $do8 = no -a \ - $do9 = no -a $do10 = no -a $do11 = no -a $do12 = no ] ; then + $do9 = no -a $do10 = no -a $do11 = no -a $do12 = no -a \ + $do13 = no ] ; then do1=yes do2=yes do3=yes @@ -148,26 +156,29 @@ echo "" echo PCRE C library tests ./pcretest /dev/null -# Primary test, compatible with all versions of Perl >= 5.8 +# Primary test, compatible with JIT and all versions of Perl >= 5.8 if [ $do1 = yes ] ; then echo "Test 1: main functionality (Compatible with Perl >= 5.8)" - for opt in "" "-s"; do + for opt in "" "-s" $jitopt; do $valgrind ./pcretest -q $opt $testdata/testinput1 testtry if [ $? = 0 ] ; then $cf $testdata/testoutput1 testtry if [ $? != 0 ] ; then exit 1; fi else exit 1 fi - if [ "$opt" = "-s" ] ; then echo "OK with study" ; else echo "OK"; fi + if [ "$opt" = "-s" ] ; then echo "OK with study" + elif [ "$opt" = "-s+" ] ; then echo "OK with JIT study" + else echo "OK" + fi done fi -# PCRE tests that are not Perl-compatible - API, errors, internals +# PCRE tests that are not JIT or Perl-compatible: API, errors, internals if [ $do2 = yes ] ; then echo "Test 2: API, errors, internals, and non-Perl stuff" - for opt in "" "-s"; do + for opt in "" "-s" $jitopt; do $valgrind ./pcretest -q $opt $testdata/testinput2 testtry if [ $? = 0 ] ; then $cf $testdata/testoutput2 testtry @@ -181,7 +192,10 @@ if [ $do2 = yes ] ; then echo " " exit 1 fi - if [ "$opt" = "-s" ] ; then echo "OK with study" ; else echo "OK"; fi + if [ "$opt" = "-s" ] ; then echo "OK with study" + elif [ "$opt" = "-s+" ] ; then echo "OK with JIT study" + else echo "OK" + fi done fi @@ -210,7 +224,7 @@ if [ $do3 = yes ] ; then if [ "$locale" != "" ] ; then echo "Test 3: locale-specific features (using '$locale' locale)" - for opt in "" "-s"; do + for opt in "" "-s" $jitopt; do $valgrind ./pcretest -q $opt $infile testtry if [ $? = 0 ] ; then $cf $outfile testtry @@ -221,7 +235,10 @@ if [ $do3 = yes ] ; then echo "settings rather than a bug in PCRE." break; else - if [ "$opt" = "-s" ] ; then echo "OK with study" ; else echo "OK"; fi + if [ "$opt" = "-s" ] ; then echo "OK with study" + elif [ "$opt" = "-s+" ] ; then echo "OK with JIT study" + else echo "OK" + fi fi else exit 1 fi @@ -238,40 +255,49 @@ fi if [ $do4 = yes ] ; then echo "Test 4: UTF-8 support (Compatible with Perl >= 5.8)" - for opt in "" "-s"; do + for opt in "" "-s" $jitopt; do $valgrind ./pcretest -q $opt $testdata/testinput4 testtry if [ $? = 0 ] ; then $cf $testdata/testoutput4 testtry if [ $? != 0 ] ; then exit 1; fi else exit 1 fi - if [ "$opt" = "-s" ] ; then echo "OK with study" ; else echo "OK"; fi + if [ "$opt" = "-s" ] ; then echo "OK with study" + elif [ "$opt" = "-s+" ] ; then echo "OK with JIT study" + else echo "OK" + fi done fi if [ $do5 = yes ] ; then echo "Test 5: API, internals, and non-Perl stuff for UTF-8 support" - for opt in "" "-s"; do + for opt in "" "-s" $jitopt; do $valgrind ./pcretest -q $opt $testdata/testinput5 testtry if [ $? = 0 ] ; then $cf $testdata/testoutput5 testtry if [ $? != 0 ] ; then exit 1; fi else exit 1 fi - if [ "$opt" = "-s" ] ; then echo "OK with study" ; else echo "OK"; fi + if [ "$opt" = "-s" ] ; then echo "OK with study" + elif [ "$opt" = "-s+" ] ; then echo "OK with JIT study" + else echo "OK" + fi done fi if [ $do6 = yes ] ; then echo "Test 6: Unicode property support (Compatible with Perl >= 5.10)" - for opt in "" "-s"; do + for opt in "" "-s" $jitopt; do $valgrind ./pcretest -q $opt $testdata/testinput6 testtry if [ $? = 0 ] ; then $cf $testdata/testoutput6 testtry if [ $? != 0 ] ; then exit 1; fi else exit 1 fi - if [ "$opt" = "-s" ] ; then echo "OK with study" ; else echo "OK"; fi + if [ "$opt" = "-s" ] ; then echo "OK with study" + elif [ "$opt" = "-s+" ] ; then echo "OK with JIT study" + else echo "OK" + fi done fi @@ -339,14 +365,17 @@ fi if [ $do11 = yes ] ; then echo "Test 11: Features from Perl >= 5.10 without UTF8 support" - for opt in "" "-s"; do + for opt in "" "-s" $jitopt; do $valgrind ./pcretest -q $opt $testdata/testinput11 testtry if [ $? = 0 ] ; then $cf $testdata/testoutput11 testtry if [ $? != 0 ] ; then exit 1; fi else exit 1 fi - if [ "$opt" = "-s" ] ; then echo "OK with study" ; else echo "OK"; fi + if [ "$opt" = "-s" ] ; then echo "OK with study" + elif [ "$opt" = "-s+" ] ; then echo "OK with JIT study" + else echo "OK" + fi done fi @@ -354,14 +383,17 @@ fi if [ $do12 = yes ] ; then echo "Test 12: Features from Perl >= 5.10 with UTF8 support" - for opt in "" "-s"; do + for opt in "" "-s" $jitopt; do $valgrind ./pcretest -q $opt $testdata/testinput12 testtry if [ $? = 0 ] ; then $cf $testdata/testoutput12 testtry if [ $? != 0 ] ; then exit 1; fi else exit 1 fi - if [ "$opt" = "-s" ] ; then echo "OK with study" ; else echo "OK"; fi + if [ "$opt" = "-s" ] ; then echo "OK with study" + elif [ "$opt" = "-s+" ] ; then echo "OK with JIT study" + else echo "OK" + fi done fi @@ -369,14 +401,17 @@ fi if [ $do13 = yes ] ; then echo "Test 13: API, internals, and non-Perl stuff for Unicode property support" - for opt in "" "-s"; do + for opt in "" "-s" $jitopt; do $valgrind ./pcretest -q $opt $testdata/testinput13 testtry if [ $? = 0 ] ; then $cf $testdata/testoutput13 testtry if [ $? != 0 ] ; then exit 1; fi else exit 1 fi - if [ "$opt" = "-s" ] ; then echo "OK with study" ; else echo "OK"; fi + if [ "$opt" = "-s" ] ; then echo "OK with study" + elif [ "$opt" = "-s+" ] ; then echo "OK with JIT study" + else echo "OK" + fi done fi -- cgit v1.2.1