diff --git a/llvm/utils/lit/lit/display.py b/llvm/utils/lit/lit/display.py index 7de5a298d2302..1cdabd57371d9 100644 --- a/llvm/utils/lit/lit/display.py +++ b/llvm/utils/lit/lit/display.py @@ -2,7 +2,7 @@ def create_display(opts, tests, total_tests, workers): - if opts.quiet: + if opts.quiet and not (opts.showOutput or opts.showAllOutput): return NopDisplay() num_tests = len(tests) @@ -97,6 +97,7 @@ def update(self, test): show_result = ( test.isFailure() or self.opts.showAllOutput + or self.opts.showOutput or (not self.opts.quiet and not self.opts.succinct) ) if show_result: diff --git a/llvm/utils/lit/tests/shtest-output-printing.py b/llvm/utils/lit/tests/shtest-output-printing.py index 129cff981eb5b..728d2b2442507 100644 --- a/llvm/utils/lit/tests/shtest-output-printing.py +++ b/llvm/utils/lit/tests/shtest-output-printing.py @@ -3,6 +3,10 @@ # RUN: not %{lit} -v %{inputs}/shtest-output-printing > %t.out # RUN: FileCheck --input-file %t.out --match-full-lines %s # +# Check that -q doesn't override -v +# RUN: not %{lit} -v -q %{inputs}/shtest-output-printing > %t.out +# RUN: FileCheck --input-file %t.out --match-full-lines %s +# # END. # CHECK: -- Testing: {{.*}}