From 78b8cb514538e0028fbbd7bb913239e71b6496f3 Mon Sep 17 00:00:00 2001 From: fanasina Date: Mon, 12 Feb 2024 12:12:54 +0100 Subject: [PATCH] create valgrind script cmd --- ytest_t/example/_valgrind_.sh | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 ytest_t/example/_valgrind_.sh diff --git a/ytest_t/example/_valgrind_.sh b/ytest_t/example/_valgrind_.sh new file mode 100644 index 0000000..3598aad --- /dev/null +++ b/ytest_t/example/_valgrind_.sh @@ -0,0 +1,18 @@ +#!/bin/sh + +if [ "$#" -ge 2 ] ; then +valgrind --leak-check=full \ + --show-leak-kinds=all \ + --track-origins=yes \ + --verbose \ + --log-file=$2 \ + $1 +fi + +if [ "$#" -eq 1 ] ; then +valgrind --leak-check=full \ + --show-leak-kinds=all \ + --track-origins=yes \ + --verbose \ + $1 +fi