[asterisk-commits] tzafrir: trunk r326636 - /trunk/contrib/scripts/live_ast

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Thu Jul 7 04:50:02 CDT 2011


Author: tzafrir
Date: Thu Jul  7 04:49:54 2011
New Revision: 326636

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=326636
Log:
live_ast: valgrind: run asterisk under valgrind

Adds a new sub-command, "valgrind" to live_ast. It runs asterisk under
valgrind. The extra command-line parameters are passed to Asterisk as
usual, and parameters to valgrind are passed through LIVE_AST_VALGRIND_ARGS
in live.conf .

Review: https://reviewboard.asterisk.org/r/1109/

Modified:
    trunk/contrib/scripts/live_ast

Modified: trunk/contrib/scripts/live_ast
URL: http://svnview.digium.com/svn/asterisk/trunk/contrib/scripts/live_ast?view=diff&rev=326636&r1=326635&r2=326636
==============================================================================
--- trunk/contrib/scripts/live_ast (original)
+++ trunk/contrib/scripts/live_ast Thu Jul  7 04:49:54 2011
@@ -98,6 +98,10 @@
 # live_ast will edit makeopts to use that second copy after ./configure
 # is run.
 #LIVE_AST_BRISTUFFED_LIBPRI=yes
+#
+# LIVE_AST_VALGRIND_ARGS:
+# Parameters to pass to valgrind if using the 'valgrind' command.
+#LIVE_AST_VALGRIND_ARGS="-v --leak-check=full --suppressions=contrib/valgrind.supp --log-file=valgrind.log"
 #
 # LIVE_AST_FOR_SYSTEM
 # When generating asterisk.conf, use most components from the installed 
@@ -235,6 +239,10 @@
   set_ld_env
   $AST_BIN -C $AST_CONF "$@"
   ;;
+valgrind)
+  set_ld_env
+  valgrind $LIVE_AST_VALGRIND_ARGS $AST_BIN -C $AST_CONF "$@"
+  ;;
 rsync)
   remote_host="$1"
   remote_dir="$2"
@@ -262,6 +270,7 @@
   echo "$0 samples              make samples"
   echo "$0 run [params]         asterisk [params]"
   echo "$0 gdb                  gdb asterisk"
+  echo "$0 valgrind             valgrind asterisk"
   echo "$0 rsync [user@]host dir  copy files over to [user@]host:dir"
   echo "$0 gen-live-asterisk    regenerate the wrapper ./live/asterisk"
   echo "$0 conf-file            create live.conf if it does not exist"




More information about the asterisk-commits mailing list