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:
juraj.linkes
2018-07-16 14:22:01 +02:00
committed by Dave Barach
parent 99ddcc3f8b
commit 184870ac5a
6 changed files with 749 additions and 301 deletions

View File

@ -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