From: Quentin Schulz <quentin.sch...@cherry.de>

The summary is printed even when quiet is passed if an error happens.
However, in the case when only one patch is passed to patchtest, this
summary isn't useful at all. That is the case for b4 with patchtest used
for b4 prep --check, where patchtest will be executed on each patch
individually so this summary will be redundant.

Signed-off-by: Quentin Schulz <quentin.sch...@cherry.de>
---
 meta/lib/patchtest/patchtest_parser.py | 4 ++++
 scripts/patchtest                      | 4 +++-
 2 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/meta/lib/patchtest/patchtest_parser.py 
b/meta/lib/patchtest/patchtest_parser.py
index 
66c54628466b0234f8492f0a7d8ddbe59f5f7582..27ab1d464a58c5747f400921e8388029996d483b
 100644
--- a/meta/lib/patchtest/patchtest_parser.py
+++ b/meta/lib/patchtest/patchtest_parser.py
@@ -73,6 +73,10 @@ class PatchtestParser(object):
                             action='store_true',
                             help='Only output error messages')
 
+        parser.add_argument('--no-summary',
+                            action='store_true',
+                            help='Do not output summary of tests')
+
         parser.add_argument('--log-results', 
                             action='store_true', 
                             help='Enable logging to a file matching the target 
patch name with ".testresult" appended')
diff --git a/scripts/patchtest b/scripts/patchtest
index 
6efd69465ef8d8dc6fa459d05220ccd08ca28536..82ce665c1a5c950dfaf02cda9ed70b935a9bfe25
 100755
--- a/scripts/patchtest
+++ b/scripts/patchtest
@@ -165,7 +165,9 @@ def run(patch, logfile=None):
     postmerge_resultklass = getResult(patch, True, logfile)
     postmerge_result = _runner(postmerge_resultklass, 'test')
 
-    print_result_message(premerge_result, postmerge_result)
+    if not PatchtestParser.no_summary:
+        print_result_message(premerge_result, postmerge_result)
+
     return premerge_result or postmerge_result
 
 def print_result_message(preresult, postresult):

-- 
2.48.1

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#210663): 
https://lists.openembedded.org/g/openembedded-core/message/210663
Mute This Topic: https://lists.openembedded.org/mt/110973478/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to