From 0cf5d76836a6499de4e30c4066d8709099ff6331 Mon Sep 17 00:00:00 2001 From: Charles Cabergs Date: Wed, 7 Oct 2020 18:58:12 +0200 Subject: Added memory leak checking --- src/config.py | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) (limited to 'src/config.py') diff --git a/src/config.py b/src/config.py index e77a94d..566ffe8 100644 --- a/src/config.py +++ b/src/config.py @@ -6,7 +6,7 @@ # By: charles +#+ +:+ +#+ # # +#+#+#+#+#+ +#+ # # Created: 2020/07/15 18:24:19 by charles #+# #+# # -# Updated: 2020/10/07 08:07:25 by charles ### ########.fr # +# Updated: 2020/10/07 18:21:46 by cacharle ### ########.fr # # # # ############################################################################ # @@ -16,6 +16,7 @@ import os import shutil +import distutils.spawn # run the bonus tests # can be changed with `export MINISHELL_TEST_BONUS=yes` in your shell rc file. @@ -59,6 +60,7 @@ PATH_VARIABLE = os.path.abspath(EXECUTABLES_PATH) # default test timeout TIMEOUT = 0.5 + LOREM = """ Mollitia asperiores assumenda excepturi et ipsa. Nihil corporis facere aut a rem consequatur. Quas molestiae corporis et quibusdam maiores. Molestiae sed unde aut at sed. @@ -77,13 +79,23 @@ Perspiciatis ut maxime et libero quo voluptas consequatur illum. Pariatur porro LOREM = ' '.join(LOREM.split('\n')) ############################################################################### -# do not edit +# You probably shouldn't edit after # ############################################################################### MINISHELL_PATH = os.path.abspath( os.path.join(MINISHELL_DIR, MINISHELL_EXEC) ) +VALGRIND_CMD = [ + distutils.spawn.find_executable("valgrind"), + # "valgrind", + "--trace-children=no", + "--leak-check=yes", + "--child-silent-after-fork=yes", + "--show-leak-kinds=definite", + MINISHELL_PATH, +] + # 0, 1, 2 VERBOSE_LEVEL = 1 @@ -95,3 +107,7 @@ if TERM_COLS < 40: raise RuntimeError("You're terminal isn't wide enough") PLATFORM = os.uname().sysname + +EXIT_FIRST = False + +CHECK_LEAKS = False -- cgit