Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
activate pedantic mode for MBI
[simgrid.git] / teshsuite / smpi / MBI / MBI.py
index bed5d75..953e616 100755 (executable)
@@ -9,7 +9,6 @@
 
 import sys
 import os
-import re
 
 from MBIutils import *
 import simgrid
@@ -31,10 +30,10 @@ simgrid = simgrid.Tool()
 
 (name, path, binary, filename) = sys.argv
 for test in parse_one_code(filename):
-    execcmd = re.sub("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", test['cmd'])
-    execcmd = re.sub('\${EXE}', binary, execcmd)
-    execcmd = re.sub('\$zero_buffer', "--cfg=smpi/buffering:zero", execcmd)
-    execcmd = re.sub('\$infty_buffer', "--cfg=smpi/buffering:infty", execcmd)
+    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 --cfg=smpi/pedantic:true")
+    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')
@@ -46,4 +45,4 @@ for test in parse_one_code(filename):
     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']}).")
-        sys.exit(1)
\ No newline at end of file
+        sys.exit(1)