From d491369d97454fb750de745c5b85e3e41f4a29c2 Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Wed, 19 Jul 2023 16:05:25 +0200 Subject: move valgrind.sh to scripts/ --- scripts/valgrind.sh | 18 ++++++++++++++++++ src/valgrind.sh | 18 ------------------ test/CMakeLists.txt | 2 +- 3 files changed, 19 insertions(+), 19 deletions(-) create mode 100755 scripts/valgrind.sh delete mode 100755 src/valgrind.sh diff --git a/scripts/valgrind.sh b/scripts/valgrind.sh new file mode 100755 index 0000000..db05a1d --- /dev/null +++ b/scripts/valgrind.sh @@ -0,0 +1,18 @@ +#!/usr/bin/env bash + +set -o errexit -o nounset -o pipefail +shopt -s inherit_errexit lastpipe + +if ! command -v valgrind &> /dev/null; then + echo 'Please make sure valgrind is available.' >&2 + exit 1 +fi + +exec valgrind -q \ + --error-exitcode=10 \ + --leak-check=full \ + --show-leak-kinds=all \ + --track-origins=yes \ + --track-fds=yes \ + --trace-children=yes \ + "$@" diff --git a/src/valgrind.sh b/src/valgrind.sh deleted file mode 100755 index db05a1d..0000000 --- a/src/valgrind.sh +++ /dev/null @@ -1,18 +0,0 @@ -#!/usr/bin/env bash - -set -o errexit -o nounset -o pipefail -shopt -s inherit_errexit lastpipe - -if ! command -v valgrind &> /dev/null; then - echo 'Please make sure valgrind is available.' >&2 - exit 1 -fi - -exec valgrind -q \ - --error-exitcode=10 \ - --leak-check=full \ - --show-leak-kinds=all \ - --track-origins=yes \ - --track-fds=yes \ - --trace-children=yes \ - "$@" diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index dd7f6f6..6ae03e6 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -28,7 +28,7 @@ add_python_tests(python_tests_stress add_python_tests(python_tests_valgrind Python3::Interpreter -m pytest ${python_test_args} -m "not stress and not flame_graph" - --valgrind "${CMAKE_CURRENT_SOURCE_DIR}/../src/valgrind.sh") + --valgrind "${CMAKE_CURRENT_SOURCE_DIR}/../scripts/valgrind.sh") if(NOT DEFINED FLAME_GRAPHS_DIR) set(FLAME_GRAPHS_DIR "${CMAKE_CURRENT_SOURCE_DIR}") -- cgit v1.2.3