X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/35317483141206500c570aeed414e1c214aa62cb..a46b20e2007bf3a1a675ea590511672f051d38da:/teshsuite/smpi/MBI/MBI.py diff --git a/teshsuite/smpi/MBI/MBI.py b/teshsuite/smpi/MBI/MBI.py index 9c384a4048..e04fc4e047 100755 --- a/teshsuite/smpi/MBI/MBI.py +++ b/teshsuite/smpi/MBI/MBI.py @@ -1,6 +1,6 @@ #! /usr/bin/env python3 -# Copyright 2021-2022. The SimGrid Team. All rights reserved. +# Copyright 2021-2022. The SimGrid Team. All rights reserved. # This program is free software; you can redistribute it and/or modify it # under the terms of the license (GNU LGPL) which comes with this package. @@ -10,8 +10,8 @@ import sys import os -from MBIutils import * -import simgrid +import MBIutils as mbi +import simgrid as sg if len(sys.argv) != 4: print(f"Usage: MBI.py binary source (received: {sys.argv})") @@ -26,23 +26,22 @@ if not os.path.exists("cluster.xml"): outfile.write('\n') -simgrid = simgrid.Tool() +simgrid = sg.Tool() (name, path, binary, filename) = sys.argv -for test in parse_one_code(filename): - execcmd = test['cmd'].replace("mpirun", f"{path}/smpi_script/bin/smpirun -wrapper '{path}/bin/simgrid-mc --log=mc_safety.t:info' -platform ./cluster.xml -analyze --cfg=smpi/finalization-barrier:on --cfg=smpi/list-leaks:10 --cfg=model-check/max-depth:10000") +for test in mbi.parse_one_code(filename): + execcmd = test['cmd'].replace("mpirun", f"{path}/smpi_script/bin/smpirun -wrapper '{path}/bin/simgrid-mc --log=mc_safety.t:info' -platform ./cluster.xml -analyze --cfg=smpi/barrier-finalization:on --cfg=smpi/list-leaks:10 --cfg=model-check/max-depth:10000") execcmd = execcmd.replace('${EXE}', binary) execcmd = execcmd.replace('$zero_buffer', "--cfg=smpi/buffering:zero") execcmd = execcmd.replace('$infty_buffer', "--cfg=smpi/buffering:infty") if os.path.exists(f'{filename}.txt'): os.remove(f'{filename}.txt') - run_cmd(buildcmd="", execcmd=execcmd, cachefile=filename, filename=filename, binary=binary, timeout=300, batchinfo="", read_line_lambda=None) - outcome = simgrid.parse(filename) + mbi.run_cmd(buildcmd="", execcmd=execcmd, cachefile=filename, filename=filename, binary=binary, timeout=300, batchinfo="", read_line_lambda=None) - (res_category, elapsed, diagnostic, outcome) = categorize(simgrid, "simgrid", filename, test['expect']) + (res_category, elapsed, diagnostic, outcome) = mbi.categorize(simgrid, "simgrid", filename, test['expect']) if res_category != "TRUE_NEG" and res_category != "TRUE_POS": print("XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\n") - print(f"SimGrid gave the wrong result ({outcome} instead of {test['expect']}).") + print(f"SimGrid gave the wrong result on {binary} ({outcome} instead of {test['detail']}).\nExpected diagnostic: {test['diagnostic']}") sys.exit(1)