Merge pull request 'Fixed valgrind python script' (#553) from gaisser/fsfw:gaisser_build_script into development
fsfw/fsfw/pipeline/head This commit looks good Details

Reviewed-on: #553
This commit is contained in:
Ulrich Mohr 2022-02-14 15:27:04 +01:00
commit a5adeb333c
1 changed files with 4 additions and 1 deletions

View File

@ -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("..")