CSIT-1139: Implement parallel test execution
The implementation of parallel test execution in VPP Test Framework. - VPPTestCase test methods are grouped together - tests are running in separate processes - VPP instances spawned by tests are assigned to different cores - output from these processes is redirected through pipes and printed out testcase by testcase - TEST_JOBS env var is used to specify the number of parallel processes - improved test summary - a bit of code cleanup Change-Id: I9ca93904d9fe2c3daf980500c64a8611838ae28c Signed-off-by: juraj.linkes <juraj.linkes@pantheon.tech>
This commit is contained in:

committed by
Dave Barach

parent
99ddcc3f8b
commit
184870ac5a
15
test/log.py
15
test/log.py
@ -38,8 +38,9 @@ else:
|
||||
log_level = 40
|
||||
|
||||
handler = logging.StreamHandler(sys.stdout)
|
||||
handler.setFormatter(ColorFormatter(fmt='%(asctime)s,%(msecs)03d %(message)s',
|
||||
datefmt="%H:%M:%S"))
|
||||
color_formatter = ColorFormatter(fmt='%(asctime)s,%(msecs)03d %(message)s',
|
||||
datefmt="%H:%M:%S")
|
||||
handler.setFormatter(color_formatter)
|
||||
handler.setLevel(log_level)
|
||||
|
||||
global_logger = logging.getLogger()
|
||||
@ -54,6 +55,16 @@ def getLogger(name):
|
||||
logger.setLevel(logging.DEBUG)
|
||||
return logger
|
||||
|
||||
|
||||
def get_parallel_logger(stream):
|
||||
logger = logging.getLogger('parallel_logger_{}'.format(stream))
|
||||
logger.propagate = False
|
||||
handler = logging.StreamHandler(stream)
|
||||
handler.setFormatter(color_formatter)
|
||||
handler.setLevel(log_level)
|
||||
logger.addHandler(handler)
|
||||
return logger
|
||||
|
||||
# Static variables to store color formatting strings.
|
||||
#
|
||||
# These variables (RED, GREEN, YELLOW and LPURPLE) are used to configure
|
||||
|
Reference in New Issue
Block a user