#!/bin/sh # memory regression suite. # runs some tests, with some define combinations and stores it in .result and .data files. # # TODO: need to check write perms to the .testbox/* (mixed web/cli perms) # TODO: need to add the ploticus path #if [ -d .testbox/page_data -a ! -w .testbox/page_data/AllPages ]; then # rm -rf .testbox/test_*.*db* #fi db=dba level="level=2" tests="test=SetupWiki test=AllPagesTest test=DumpHtml" prefix=$1 if [ -z $prefix ]; then prefix="439dba"; fi today=`date` for define in USECACHE ENABLE_USER_NEW; do file1="${prefix}_${define}_true" file2="${prefix}_${define}_false" php -Cq -d register_argc_argv=1 test.php -d${define}=true level=2 debug=9 db=$db $tests | tee ${file1}.result ./prepare_pl ${file1} -nopl #pl -png -o ${file1}.png ${file1}.ploticus php -Cq -d register_argc_argv=1 test.php -d${define}=false level=2 debug=9 db=$db $tests | tee ${file2}.result ./prepare_pl ${file2} -nopl #pl -png -o ${file2}.png ${file2}.ploticus done # get the relevant mem numbers (testsetupwiki, test99dumphtml) # combine the results and display the graph ./combine_define.pl $prefix echo "" >> "${prefix}_combine_define.data" #pl -png -o all_$db.png -prefab vbars data=all_$db.data delim=tab x=2 y=1 xstep=2 barwidth=line ylbl="memory (kb)" title="$db $title" xlbl="consecutive tests" stubvert=yes ygrid=yes ylbldet="adjust=-0.1,0" xlbldet="adjust=0,-1.2" # vals=yes