[pitivi] validate: Show more info when gst-validate-launcher missing
- From: Alexandru Băluț <alexbalut src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pitivi] validate: Show more info when gst-validate-launcher missing
- Date: Wed, 9 Nov 2016 13:13:52 +0000 (UTC)
commit 933ac9759f7e6499aee66b71f52f37fd07d2e7c9
Author: Alexandru Băluț <alexandru balut gmail com>
Date: Tue Oct 25 17:20:49 2016 +0200
validate: Show more info when gst-validate-launcher missing
Used "which" instead of running the command directly because it prints
the PATH in which it searched.
Reviewed-by: Thibault Saunier <tsaunier gnome org>
Differential Revision: https://phabricator.freedesktop.org/D1428
tests/validate-tests/runtests | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)
---
diff --git a/tests/validate-tests/runtests b/tests/validate-tests/runtests
index cbd2a03..e42fb65 100755
--- a/tests/validate-tests/runtests
+++ b/tests/validate-tests/runtests
@@ -8,9 +8,12 @@ import sys
GST_VALIDATE_LAUNCHER_COMMAND = "gst-validate-launcher"
-if (os.system(GST_VALIDATE_LAUNCHER_COMMAND + " -h > %s 2>&1" % os.devnull) != 0):
- print("Make sure to install gst-validate:
http://cgit.freedesktop.org/gstreamer/gst-devtools/tree/validate/"
- " before running the testsuite")
+try:
+ subprocess.check_call("which %s" % GST_VALIDATE_LAUNCHER_COMMAND, shell=True)
+except subprocess.CalledProcessError as e:
+ print("ERROR: Cannot find %s: %s" % (GST_VALIDATE_LAUNCHER_COMMAND, e))
+ print("Make sure to install gst-devtools:")
+ print(" http://cgit.freedesktop.org/gstreamer/gst-devtools/tree/validate/")
sys.exit(127)
path = os.path.abspath(os.path.join(os.path.dirname(__file__))) # pylint: disable=invalid-name
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]