twister: error if valgrind executable not found
if --enable-valgrind is selected but no valgrind executable can be found in PATH, exit with an error Signed-off-by: Mikkel Jakobsen <mikkel.aunsbjerg@escolifesciences.com>
This commit is contained in:
parent
9314f6e527
commit
78aa424f69
2 changed files with 5 additions and 1 deletions
|
@ -578,7 +578,7 @@ class BinaryHandler(Handler):
|
|||
command = [self.binary]
|
||||
|
||||
run_valgrind = False
|
||||
if self.valgrind and shutil.which("valgrind"):
|
||||
if self.valgrind:
|
||||
command = ["valgrind", "--error-exitcode=2",
|
||||
"--leak-check=full",
|
||||
"--suppressions=" + ZEPHYR_BASE + "/scripts/valgrind.supp",
|
||||
|
|
|
@ -882,6 +882,10 @@ def main():
|
|||
logger.error("west-flash requires device-testing to be enabled")
|
||||
sys.exit(1)
|
||||
|
||||
if options.enable_valgrind and not shutil.which("valgrind"):
|
||||
logger.error("valgrind enabled but valgrind executable not found")
|
||||
sys.exit(1)
|
||||
|
||||
if options.coverage:
|
||||
options.enable_coverage = True
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue