sim=
skip=
valgrind=
+vjs=
# This is in case the caller has set aliases (as I do - PH)
unset cp ls mv rm
jit=$?
if [ $jit -ne 0 -a "$nojit" != "yes" ] ; then
jitopt=-s+
+ if [ "$valgrind" != "" ] ; then
+ vjs="--suppressions=$testdata/valgrind-jit.supp"
+ fi
fi
# If no specific tests were requested, select all. Those that are not
if [ $do1 = yes ] ; then
echo $title1
for opt in "" "-s" $jitopt; do
- $sim $valgrind ./pcretest -q $bmode $opt $testdata/testinput1 testtry
+ $sim $valgrind ${opt:+$vjs} ./pcretest -q $bmode $opt $testdata/testinput1 testtry
if [ $? = 0 ] ; then
$cf $testdata/testoutput1 testtry
if [ $? != 0 ] ; then exit 1; fi
if [ $do2 = yes ] ; then
echo $title2 "(not UTF-$bits)"
for opt in "" "-s" $jitopt; do
- $sim $valgrind ./pcretest -q $bmode $opt $testdata/testinput2 testtry
+ $sim $valgrind ${opt:+$vjs} ./pcretest -q $bmode $opt $testdata/testinput2 testtry
if [ $? = 0 ] ; then
$cf $testdata/testoutput2 testtry
if [ $? != 0 ] ; then exit 1; fi
if [ "$locale" != "" ] ; then
echo $title3 "(using '$locale' locale)"
for opt in "" "-s" $jitopt; do
- $sim $valgrind ./pcretest -q $bmode $opt $infile testtry
+ $sim $valgrind ${opt:+$vjs} ./pcretest -q $bmode $opt $infile testtry
if [ $? = 0 ] ; then
if $cf $outfile testtry >teststdout || \
$cf $outfile2 testtry >teststdout || \
echo " Skipped because UTF-$bits support is not available"
else
for opt in "" "-s" $jitopt; do
- $sim $valgrind ./pcretest -q $bmode $opt $testdata/testinput4 testtry
+ $sim $valgrind ${opt:+$vjs} ./pcretest -q $bmode $opt $testdata/testinput4 testtry
if [ $? = 0 ] ; then
$cf $testdata/testoutput4 testtry
if [ $? != 0 ] ; then exit 1; fi
echo " Skipped because UTF-$bits support is not available"
else
for opt in "" "-s" $jitopt; do
- $sim $valgrind ./pcretest -q $bmode $opt $testdata/testinput5 testtry
+ $sim $valgrind ${opt:+$vjs} ./pcretest -q $bmode $opt $testdata/testinput5 testtry
if [ $? = 0 ] ; then
$cf $testdata/testoutput5 testtry
if [ $? != 0 ] ; then exit 1; fi
echo " Skipped because Unicode property support is not available"
else
for opt in "" "-s" $jitopt; do
- $sim $valgrind ./pcretest -q $bmode $opt $testdata/testinput6 testtry
+ $sim $valgrind ${opt:+$vjs} ./pcretest -q $bmode $opt $testdata/testinput6 testtry
if [ $? = 0 ] ; then
$cf $testdata/testoutput6 testtry
if [ $? != 0 ] ; then exit 1; fi
echo " Skipped because Unicode property support is not available"
else
for opt in "" "-s" $jitopt; do
- $sim $valgrind ./pcretest -q $bmode $opt $testdata/testinput7 testtry
+ $sim $valgrind ${opt:+$vjs} ./pcretest -q $bmode $opt $testdata/testinput7 testtry
if [ $? = 0 ] ; then
$cf $testdata/testoutput7 testtry
if [ $? != 0 ] ; then exit 1; fi
if [ $jit -eq 0 -o "$nojit" = "yes" ] ; then
echo " Skipped because JIT is not available or not usable"
else
- $sim $valgrind ./pcretest -q $bmode $testdata/testinput12 testtry
+ $sim $valgrind $vjs ./pcretest -q $bmode $testdata/testinput12 testtry
if [ $? = 0 ] ; then
$cf $testdata/testoutput12 testtry
if [ $? != 0 ] ; then exit 1; fi
cp -f $testdata/saved16 testsaved16
cp -f $testdata/saved32 testsaved32
for opt in "" "-s" $jitopt; do
- $sim $valgrind ./pcretest -q $bmode $opt $testdata/testinput14 testtry
+ $sim $valgrind ${opt:+$vjs} ./pcretest -q $bmode $opt $testdata/testinput14 testtry
if [ $? = 0 ] ; then
$cf $testdata/testoutput14 testtry
if [ $? != 0 ] ; then exit 1; fi
echo " Skipped because UTF-$bits support is not available"
else
for opt in "" "-s" $jitopt; do
- $sim $valgrind ./pcretest -q $bmode $opt $testdata/testinput15 testtry
+ $sim $valgrind ${opt:+$vjs} ./pcretest -q $bmode $opt $testdata/testinput15 testtry
if [ $? = 0 ] ; then
$cf $testdata/testoutput15 testtry
if [ $? != 0 ] ; then exit 1; fi
echo " Skipped because Unicode property support is not available"
else
for opt in "" "-s" $jitopt; do
- $sim $valgrind ./pcretest -q $bmode $opt $testdata/testinput16 testtry
+ $sim $valgrind ${opt:+$vjs} ./pcretest -q $bmode $opt $testdata/testinput16 testtry
if [ $? = 0 ] ; then
$cf $testdata/testoutput16 testtry
if [ $? != 0 ] ; then exit 1; fi
echo " Skipped when running 8-bit tests"
else
for opt in "" "-s" $jitopt; do
- $sim $valgrind ./pcretest -q $bmode $opt $testdata/testinput17 testtry
+ $sim $valgrind ${opt:+$vjs} ./pcretest -q $bmode $opt $testdata/testinput17 testtry
if [ $? = 0 ] ; then
$cf $testdata/testoutput17 testtry
if [ $? != 0 ] ; then exit 1; fi
echo " Skipped because UTF-$bits support is not available"
else
for opt in "" "-s" $jitopt; do
- $sim $valgrind ./pcretest -q $bmode $opt $testdata/testinput18 testtry
+ $sim $valgrind ${opt:+$vjs} ./pcretest -q $bmode $opt $testdata/testinput18 testtry
if [ $? = 0 ] ; then
$cf $testdata/testoutput18-$bits testtry
if [ $? != 0 ] ; then exit 1; fi
echo " Skipped because Unicode property support is not available"
else
for opt in "" "-s" $jitopt; do
- $sim $valgrind ./pcretest -q $bmode $opt $testdata/testinput19 testtry
+ $sim $valgrind ${opt:+$vjs} ./pcretest -q $bmode $opt $testdata/testinput19 testtry
if [ $? = 0 ] ; then
$cf $testdata/testoutput19 testtry
if [ $? != 0 ] ; then exit 1; fi