mb: Implement 'quiet' flag in mb lookup

This is a partial port of https://chromium-review.googlesource.com/1576022
Needed because recipes assume the flag exists.

Example error (unnoticed until now because it's silently ignored):
https://logs.chromium.org/logs/webrtc/buildbucket/cr-buildbucket.appspot.com/8911948550157608800/+/steps/lookup_GN_args/0/stdout

Bug: chromium:955062
Change-Id: Id3707903dd5747c13bba05df76f799fb523a6faa
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/139248
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Oleh Prypin <oprypin@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28123}
This commit is contained in:
Oleh Prypin
2019-05-31 13:25:39 +02:00
committed by Commit Bot
parent cecf87ff29
commit d7e2fb3309
2 changed files with 15 additions and 4 deletions

View File

@ -776,6 +776,11 @@ class UnitTest(unittest.TestCase):
def test_lookup(self):
self.check(['lookup', '-c', 'debug_goma'], ret=0)
def test_quiet_lookup(self):
self.check(['lookup', '-c', 'debug_goma', '--quiet'], ret=0,
out=('is_debug = true\n'
'use_goma = true\n'))
def test_lookup_goma_dir_expansion(self):
self.check(['lookup', '-c', 'rel_bot', '-g', '/foo'], ret=0,
out=('\n'