From 377418423df7be4eec6fff2c20d9ee767eccba7b Mon Sep 17 00:00:00 2001 From: Sami Vaarala Date: Thu, 16 Jan 2014 23:09:05 +0200 Subject: [PATCH] add valgrind support to underscore_test --- underscore_test | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/underscore_test b/underscore_test index 9f55b157..5926634b 100755 --- a/underscore_test +++ b/underscore_test @@ -1,8 +1,22 @@ #!/bin/sh +if [ "$1" = "valgrind" ]; then + VALGRIND=1 + CMD=$2 + TEST=$3 +else + VALGRIND=0 + CMD=$1 + TEST=$2 +fi + cat underscore-test-shim.js \ underscore/underscore.js \ - $2 \ + $TEST \ > /tmp/duk-underscore-test.js -$1 /tmp/duk-underscore-test.js +if [ x"$VALGRIND" = "x1" ]; then + valgrind $CMD /tmp/duk-underscore-test.js +else + $CMD /tmp/duk-underscore-test.js +fi