Why so many test messages?
See original GitHub issueHi,
I’m writing a cocotb test that will loop through a list of test functions and call them. The test looks like this:
@cocotb.test()
async def test_08_factory_tests(dut):
"""Tests different aspects of the factory"""
tc08 = t08.s08_factory_classes_TestCase()
methods = inspect.getmembers(t08.s08_factory_classes_TestCase)#, predicate=inspect.ismethod)
for mm in methods:
(name,function) = mm
if name.startswith("test_"):
test = getattr(tc08, name)
tc08.setUp()
print(f"**** Running: {name}")
test()
tc08.tearDown()
The functions run if they start with “test_”
def test_no_assert(self):
pass
def test_no_assert2(self):
pass
Strangely, when I run this all the messages from cocotb get repeated once per function, even though they are all in one test:
**** Running: test_no_assert
**** Running: test_no_assert2
1000.00ns INFO cocotb.regression regression.py:364 in _score_test Test Passed: test_08_factory_tests
INFO: regression.py(364)[cocotb.regression]: Test Passed: test_08_factory_tests
INFO: regression.py(364)[cocotb.regression]: Test Passed: test_08_factory_tests
1000.00ns INFO cocotb.regression regression.py:487 in _log_test_summary Passed 1 tests (0 skipped)
INFO: regression.py(487)[cocotb.regression]: Passed 1 tests (0 skipped)
INFO: regression.py(487)[cocotb.regression]: Passed 1 tests (0 skipped)
And then later
INFO: regression.py(557)[cocotb.regression]: **********************************************************************************************
** TEST PASS/FAIL SIM TIME(NS) REAL TIME(S) RATIO(NS/S) **
**********************************************************************************************
** tinyalu_cocotb.test_08_factory_tests PASS 1000.00 0.00 1533566.36 **
**********************************************************************************************
INFO: regression.py(557)[cocotb.regression]: **********************************************************************************************
** TEST PASS/FAIL SIM TIME(NS) REAL TIME(S) RATIO(NS/S) **
**********************************************************************************************
** tinyalu_cocotb.test_08_factory_tests PASS 1000.00 0.00 1533566.36 **
This is filling up my log with a lot of garbage. Any idea why this is happening?
Issue Analytics
- State:
- Created 2 years ago
- Comments:13 (13 by maintainers)
Top Results From Across the Web
How To Stop Spam Texts - Kaspersky
Spam text messages are annoying & can often be a scam. ... Not only are unwanted text messages extremely annoying, but in many...
Read more >Getting more spam texts and emails? Here's how to fix it
You get spam messages because someone gets access to your email address or phone number. Think about how often you provide your phone...
Read more >Getting more spam text messages? How to avoid and report ...
Getting more spam text messages? How to avoid and report the latest schemes · First, never open the link · Do research before...
Read more >Protect Against Smishing, Spam Text Messages, and ... - Verizon
Spam text messages can be identified by poor grammar, misspelled words and awkward use of language. Real text messages from legitimate businesses will...
Read more >2022 Spam Text Statistics: Are Spam Texts on the Rise?
Spam texts are definitely on the rise. While COVID-19 and the TRACED Act have contributed to the rising text spam rates, the growth...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
That is, I would recommend doing at the top of your file:
and then inside your
__init__
, replacingIf you attach the handlers to
uvm_root_logger
, then you also don’t need to copy them to every logger.Done. Thanks again!