From 074ef29b86409568783f6c2ac11f0f086eda9bf4 Mon Sep 17 00:00:00 2001 From: Steffen Gaisser Date: Mon, 14 Feb 2022 15:19:47 +0100 Subject: [PATCH] Fixed valgrind python script --- scripts/helper.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/helper.py b/scripts/helper.py index 4e8a62b4..68693c40 100755 --- a/scripts/helper.py +++ b/scripts/helper.py @@ -143,7 +143,10 @@ def handle_tests_type(args, build_dir_list: list): if which("valgrind") is None: print("Please install valgrind first") sys.exit(1) - os.chdir(UNITTEST_FOLDER_NAME) + if os.path.split(os.getcwd())[1] != UNITTEST_FOLDER_NAME: + # If we are in a different directory we try to switch into it but + # this might fail + os.chdir(UNITTEST_FOLDER_NAME) os.system("valgrind --leak-check=full ./fsfw-tests") os.chdir("..")