mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-04-26 06:54:49 +00:00
validate:tools: Add an option to desativate ANSI colors
And enhance some debugging output
This commit is contained in:
parent
eae7e94f44
commit
8697dd3da4
3 changed files with 10 additions and 2 deletions
|
@ -313,7 +313,8 @@ class _TestsLauncher(Loggable):
|
||||||
if tester.init() is True:
|
if tester.init() is True:
|
||||||
self.testers.append(tester)
|
self.testers.append(tester)
|
||||||
else:
|
else:
|
||||||
self.warning("Can not init tester: %s", tester.name)
|
self.warning("Can not init tester: %s -- PATH is %s"
|
||||||
|
% (tester.name, os.environ["PATH"]))
|
||||||
|
|
||||||
def add_options(self, parser):
|
def add_options(self, parser):
|
||||||
for tester in self.testers:
|
for tester in self.testers:
|
||||||
|
|
|
@ -17,6 +17,7 @@
|
||||||
# Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
|
# Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
|
||||||
# Boston, MA 02110-1301, USA.
|
# Boston, MA 02110-1301, USA.
|
||||||
import os
|
import os
|
||||||
|
import utils
|
||||||
import urlparse
|
import urlparse
|
||||||
import loggable
|
import loggable
|
||||||
from optparse import OptionParser
|
from optparse import OptionParser
|
||||||
|
@ -67,6 +68,9 @@ def main():
|
||||||
default=None,
|
default=None,
|
||||||
help="Set the path to which projects should be"
|
help="Set the path to which projects should be"
|
||||||
" renderd")
|
" renderd")
|
||||||
|
parser.add_option("-n", "--no-color", dest="no_color",
|
||||||
|
action="store_true", default=False,
|
||||||
|
help="Set it to output no colored text in the terminal")
|
||||||
loggable.init("GST_VALIDATE_LAUNCHER_DEBUG", True, False)
|
loggable.init("GST_VALIDATE_LAUNCHER_DEBUG", True, False)
|
||||||
|
|
||||||
tests_launcher = _TestsLauncher()
|
tests_launcher = _TestsLauncher()
|
||||||
|
@ -78,6 +82,9 @@ def main():
|
||||||
options.dest = os.path.join(options.logsdir, "rendered")
|
options.dest = os.path.join(options.logsdir, "rendered")
|
||||||
if urlparse.urlparse(options.dest).scheme == "":
|
if urlparse.urlparse(options.dest).scheme == "":
|
||||||
options.dest = path2url(options.dest)
|
options.dest = path2url(options.dest)
|
||||||
|
if options.no_color:
|
||||||
|
utils.desactivate_colors()
|
||||||
|
|
||||||
tests_launcher.set_settings(options, args)
|
tests_launcher.set_settings(options, args)
|
||||||
|
|
||||||
if options.list_tests:
|
if options.list_tests:
|
||||||
|
|
|
@ -48,7 +48,7 @@ class Colors(object):
|
||||||
ENDC = '\033[0m'
|
ENDC = '\033[0m'
|
||||||
|
|
||||||
|
|
||||||
def desactivate_colors(self):
|
def desactivate_colors():
|
||||||
Colors.HEADER = ''
|
Colors.HEADER = ''
|
||||||
Colors.OKBLUE = ''
|
Colors.OKBLUE = ''
|
||||||
Colors.OKGREEN = ''
|
Colors.OKGREEN = ''
|
||||||
|
|
Loading…
Reference in a new issue