diff options
author | Nicolas "Pixel" Noble <pixel@nobis-crew.org> | 2015-05-13 02:34:06 +0200 |
---|---|---|
committer | Nicolas "Pixel" Noble <pixel@nobis-crew.org> | 2015-05-13 02:36:37 +0200 |
commit | 99768acc51b778b5ebcdc12b398bf323201e4df0 (patch) | |
tree | aa88a1bf4fecef64a05db38fa9fafd2f36b80e4f /tools/run_tests | |
parent | 60a7e8de089e0207f38307b3a1d48f2933a468ff (diff) |
Prevents run_tests from spamming.
Diffstat (limited to 'tools/run_tests')
-rwxr-xr-x | tools/run_tests/jobset.py | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/tools/run_tests/jobset.py b/tools/run_tests/jobset.py index 286b81dc3e..28b7d30371 100755 --- a/tools/run_tests/jobset.py +++ b/tools/run_tests/jobset.py @@ -62,7 +62,7 @@ else: def shuffle_iteratable(it): """Return an iterable that randomly walks it""" # take a random sampling from the passed in iterable - # we take an element with probablity 1/p and rapidly increase + # we take an element with probability 1/p and rapidly increase # p as we take elements - this gives us a somewhat random set of values before # we've seen all the values, but starts producing values without having to # compute ALL of them at once, allowing tests to start a little earlier @@ -111,11 +111,15 @@ _TAG_COLOR = { } -def message(tag, message, explanatory_text=None, do_newline=False): +def message(tag, msg, explanatory_text=None, do_newline=False): + if message.old_tag == tag and message.old_msg == msg and not explanatory_text: + return + message.old_tag = tag + message.old_msg = msg if platform.system() == 'Windows': if explanatory_text: print explanatory_text - print '%s: %s' % (tag, message) + print '%s: %s' % (tag, msg) return try: sys.stdout.write('%s%s%s\x1b[%d;%dm%s\x1b[0m: %s%s' % ( @@ -125,12 +129,14 @@ def message(tag, message, explanatory_text=None, do_newline=False): _COLORS[_TAG_COLOR[tag]][1], _COLORS[_TAG_COLOR[tag]][0], tag, - message, + msg, '\n' if do_newline or explanatory_text is not None else '')) sys.stdout.flush() except: pass +message.old_tag = "" +message.old_msg = "" def which(filename): if '/' in filename: |