Skip to content

Commit 5ffabee

Browse files
Anthony Leonardo GracioAnthonyLeonardoGracio
authored andcommitted
V624-007: Fix valgrind testsuite
Use a bash script wrapper to run the ALS with valgrind and all its needed arguments. This is needed in order to spawn the process successfully in the test runner.
1 parent 567d5b4 commit 5ffabee

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

testsuite/testsuite.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -69,10 +69,7 @@ def set_up(self):
6969

7070
# Absolute paths to programs that test drivers can use
7171
if self.env.options.valgrind_memcheck:
72-
self.env.als = "{} {} {}".format(
73-
self.lookup_program("valgrind"),
74-
" ".join(VALGRIND_OPTIONS).format(base=self.env.repo_base),
75-
self.lookup_program('server', 'ada_language_server'))
72+
self.env.als = os.path.join(self.env.repo_base, 'testsuite', 'valgrind_wrapper.sh')
7673
self.env.wait_factor = 40 # valgrind is slow
7774
else:
7875
self.env.als = self.lookup_program('server', 'ada_language_server')

testsuite/valgrind_wrapper.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#!/usr/bin/env sh
2+
3+
# This is a wrapper to run the Ada Language Sever with valgrind
4+
# and all the needed arguments from the testsuite.
5+
6+
dir_path=$(dirname $0)
7+
valgrind --quiet --tool=memcheck --leak-check=full --suppressions=$dir_path/leaks.supp $dir_path/../.obj/server/ada_language_server $@

0 commit comments

Comments
 (0)