From 76eedece5c391c08410fc430c3c95cab46ae6b01 Mon Sep 17 00:00:00 2001 From: Thibault Saunier Date: Fri, 17 Apr 2015 19:56:17 +0200 Subject: [PATCH] validate:launcher: Error out if valgrind is not available on the system Summary: When the user wants to use valgrind, make sure it is present on the system before doing anything Reviewers: gdesmott Differential Revision: http://phabricator.freedesktop.org/D104 --- validate/launcher/main.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/validate/launcher/main.py b/validate/launcher/main.py index 74a442e5a1..61f47df7ac 100644 --- a/validate/launcher/main.py +++ b/validate/launcher/main.py @@ -275,6 +275,14 @@ class LauncherConfig(Loggable): self.testsuites_dir == DEFAULT_TESTSUITES_DIR: self.testsuites_dir = os.path.join(self.main_dir, self.clone_dir, "testsuites") + if self.valgrind: + try: + subprocess.check_output("valgrind --help", shell=True) + except subprocess.CalledProcessError: + printc("Want to use valgrind, but not avalaible on the system", + Colors.FAIL) + return False + return True def set_http_server_dir(self, path):