diff options
author | Klement Sekera <ksekera@cisco.com> | 2021-03-25 14:03:44 +0100 |
---|---|---|
committer | Damjan Marion <dmarion@me.com> | 2021-04-28 18:35:46 +0000 |
commit | ea6236b376c397f5519ff2763702818a4bfe46d9 (patch) | |
tree | 4c1896e015647df81f32b573fa82edaff55397f4 /test/framework.py | |
parent | edca8c6e753380f12d23e9ee4e0a9be4e24c43a8 (diff) |
tests: add worker count to class description
While running test:
==============================================================================
NAT44ED Test Case
==============================================================================
==>
==============================================================================
NAT44ED Test Case [main thread only]
==============================================================================
==============================================================================
NAT44ED Test Case [1 worker thread]
==============================================================================
==============================================================================
NAT44ED Test Case [4 worker threads]
==============================================================================
Type: improvement
Signed-off-by: Klement Sekera <ksekera@cisco.com>
Change-Id: I61904b411ff1b58700564698079dc4c07cea5c5e
Diffstat (limited to 'test/framework.py')
-rw-r--r-- | test/framework.py | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/test/framework.py b/test/framework.py index 1cbd814aa8d..a628207d40a 100644 --- a/test/framework.py +++ b/test/framework.py @@ -1517,7 +1517,7 @@ class VppTestResult(unittest.TestResult): if not test_doc: raise Exception("No doc string for test '%s'" % test.id()) - test_title = test_doc.splitlines()[0] + test_title = test_doc.splitlines()[0].rstrip() test_title = colorize(test_title, GREEN) if test.is_tagged_run_solo(): test_title = colorize(f"SOLO RUN: {test_title}", YELLOW) @@ -1528,6 +1528,14 @@ class VppTestResult(unittest.TestResult): test_title = colorize( f"FIXME with VPP workers: {test_title}", RED) + if hasattr(test, 'vpp_worker_count'): + if test.vpp_worker_count == 0: + test_title += " [main thread only]" + elif test.vpp_worker_count == 1: + test_title += " [1 worker thread]" + else: + test_title += f" [{test.vpp_worker_count} worker threads]" + if test.__class__.skipped_due_to_cpu_lack: test_title = colorize( f"{test_title} [skipped - not enough cpus, " |