]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
ensure nightly regression tests can (optionally) run perf tests
authorPhilippe Waroquiers <philippe.waroquiers@skynet.be>
Fri, 27 Sep 2013 18:10:29 +0000 (18:10 +0000)
committerPhilippe Waroquiers <philippe.waroquiers@skynet.be>
Fri, 27 Sep 2013 18:10:29 +0000 (18:10 +0000)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13580

nightly/README.txt
nightly/bin/nightly

index c4f292b6c28bb5a753207fb07d417ee92434b968..4ab9d21dae44ba49eef6c8c6f61e559ed8c3cd09 100644 (file)
@@ -86,6 +86,18 @@ To set up nightly testing for a machine, do the following.
     - ABT_JOBS: allows parallel builds -- it's passed as the argument to
       "make -j" when building Valgrind and the tests.  The default is 1.
 
+    - ABT_PERF: unset or set to "" mean 'do not run perf tests' (default value)
+                set to "--vg=../valgrind-new" (run perf tests for new tree)
+                set to "--vg=../valgrind-new --vg=../valgrind-old"
+                (run  perf tests for "new" and for "24 hours ago",
+                 to compare the performances between the 2 trees).
+      
+    - ABT_PERF_TOOLS: --tools=.... option of perf/vg_perf.
+      (default value: all non experimental tools)
+
+    - ABT_PERF_REPS: --reps=... option of perf/vg_perf
+      (default value: --reps=3)
+
     Note that the appropriate syntax to use in this file will depend on the
     shell from which the $DIR/bin/nightly script is run (which in turn may
     depend on what shell is used by cron or any similar program).
index 9e35d4ff2a83bd2d1583c49d5c28c66c35e54430..6057951d67da2045dcf66a0889f9935504c946a8 100755 (executable)
@@ -116,6 +116,13 @@ if [ "${ABT_RUN_REGTEST}" = "" ]; then
   ABT_RUN_REGTEST="make regtest"
 fi
 
+if [ "${ABT_PERF_TOOLS}" = "" ]; then
+  ABT_PERF_TOOLS="--tools=none,memcheck,callgrind,helgrind,cachegrind,drd,massif"
+fi
+if [ "${ABT_PERF_REPS}" = "" ]; then
+  ABT_PERF_REPS="--reps=3"
+fi
+
 
 #----------------------------------------------------------------------------
 # Check out, build, test
@@ -184,6 +191,15 @@ for logfile in old new ; do
    )
 done
 
+# if requested, run regression tests and produce results in perflogfile.out
+if [ "${ABT_PERF}" != "" ]; then
+   cd valgrind-new
+   echo ${ABT_PERF_TOOLS} ${ABT_PERF_REPS} ${ABT_PERF} > ../perflogfile
+   (time perl perf/vg_perf ${ABT_PERF_TOOLS} ${ABT_PERF_REPS} ${ABT_PERF} perf) >> ../perflogfile 2>&1
+   cd ..
+fi
+
+
 #----------------------------------------------------------------------------
 # Prepare results and send
 #----------------------------------------------------------------------------
@@ -257,6 +273,11 @@ if [ $changed != 0 ] ; then
    echo                                                     >> final
 fi
 
+# add perf results if requested
+if [ "${ABT_PERF}" != "" ]; then
+   cat perflogfile                                             >> final
+fi
+
 # Gather up the diffs (at most the first 100 lines for each one) into a
 # single file.
 MAX_LINES=100