X-Git-Url: http://bilbo.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/d54ee83ca241b15158d729e23d462a3d210d81bd..6e0d0f6c1580aceb13c060bbf95cbe9000cf6bbd:/teshsuite/smpi/MBI/MBIutils.py diff --git a/teshsuite/smpi/MBI/MBIutils.py b/teshsuite/smpi/MBI/MBIutils.py index 416219538b..c422cca055 100644 --- a/teshsuite/smpi/MBI/MBIutils.py +++ b/teshsuite/smpi/MBI/MBIutils.py @@ -33,7 +33,7 @@ class AbstractTool: """ # pass - def run(self, execcmd, filename, binary, num_id, timeout): + def run(self, execcmd, filename, binary, num_id, timeout, batchinfo): """Compile that test code and anaylse it with the Tool if needed (a cache system should be used)""" # pass @@ -57,6 +57,7 @@ possible_details = { # 'OutOfInitFini':'BInitFini', 'CommunicatorLeak':'BResLeak', 'DatatypeLeak':'BResLeak', 'GroupLeak':'BResLeak', 'OperatorLeak':'BResLeak', 'TypeLeak':'BResLeak', 'RequestLeak':'BResLeak', 'MissingStart':'BReqLifecycle', 'MissingWait':'BReqLifecycle', + 'MissingEpoch':'BEpochLifecycle','DoubleEpoch':'BEpochLifecycle', 'LocalConcurrency':'BLocalConcurrency', # scope: communicator 'CallMatching':'DMatch', @@ -73,6 +74,7 @@ error_scope = { 'BResLeak':'single process', # 'BInitFini':'single process', 'BReqLifecycle':'single process', + 'BEpochLifecycle':'single process', 'BLocalConcurrency':'single process', 'CMatch':'multi-processes', 'DRace':'multi-processes', @@ -136,7 +138,14 @@ def parse_one_code(filename): if detail not in possible_details: raise ValueError( f"\n{filename}:{line_num}: MBI parse error: Detailled outcome {detail} is not one of the allowed ones.") - test = {'filename': filename, 'id': test_num, 'cmd': cmd, 'expect': expect, 'detail': detail} + + nextline = next(input_file) + m = re.match('[ |]*(.*)', nextline) + if not m: + raise ValueError(f"\n{filename}:{line_num}: MBI parse error: Expected diagnostic of the test not found.\n") + diagnostic = m.group(1) + + test = {'filename': filename, 'id': test_num, 'cmd': cmd, 'expect': expect, 'detail': detail, 'diagnostic': diagnostic} res.append(test.copy()) test_num += 1 line_num += 1 @@ -260,7 +269,6 @@ def run_cmd(buildcmd, execcmd, cachefile, filename, binary, timeout, batchinfo, pid = process.pid pgid = os.getpgid(pid) # We need that to forcefully kill subprocesses when leaving - outcome = None while True: if poll_obj.poll(5): # Something to read? Do check the timeout status every 5 sec if not line = process.stdout.readline() @@ -271,7 +279,6 @@ def run_cmd(buildcmd, execcmd, cachefile, filename, binary, timeout, batchinfo, if read_line_lambda != None: read_line_lambda(line, process) if time.time() - start_time > timeout: - outcome = 'timeout' with open(f'{cachefile}.timeout', 'w') as outfile: outfile.write(f'{time.time() - start_time} seconds') break