diff --git a/scripts/Infrastructure/Instruction.py b/scripts/Infrastructure/Instruction.py index 39de122549749e810d1f33b5d6971d15956c6b23..866627f301c42ce3a9ce0f5d3b6ffee8f4b88113 100644 --- a/scripts/Infrastructure/Instruction.py +++ b/scripts/Infrastructure/Instruction.py @@ -21,6 +21,9 @@ class Instruction(object): def set_has_error(self, has_error: bool = True): self._has_error = has_error + def has_error(self): + return self._has_error + def get_identifier(self) -> str: return self._identifier diff --git a/scripts/Infrastructure/Template.py b/scripts/Infrastructure/Template.py index 1fbe42f4197a86aff2c84c14a7c2a71e6a349603..d836d084dc884bfdbeb4e56e9b036723ffb10864 100644 --- a/scripts/Infrastructure/Template.py +++ b/scripts/Infrastructure/Template.py @@ -7,13 +7,7 @@ from scripts.Infrastructure.Instruction import Instruction from scripts.Infrastructure.MPICall import MPICall from scripts.Infrastructure.CorrectParameter import CorrectParameterFactory -template = """// @{generatedby}@ -/* ///////////////////////// The MPI Bug Bench //////////////////////// - - Description: @{desc}@ - - Version of MPI: @{version}@ - +""" THIS BLOCK IS CURRENTLY NOT USED: BEGIN_MPI_FEATURES P2P!basic: @{p2pfeature}@ @@ -25,6 +19,13 @@ BEGIN_MPI_FEATURES COLL!tools: Yes RMA: Lacking END_MPI_FEATURES +""" + +template = """/* ///////////////////////// The MPI Bug Bench //////////////////////// + + Description: @{desc}@ + + Version of MPI: @{version}@ BEGIN_MBB_TESTS $ mpirun -np @{min_num_ranks}@ ${EXE} @@ -123,6 +124,16 @@ class TemplateManager: code_string = "" current_rank = 'all' + has_error = False + for i in self._instructions: + if i.has_error(): + has_error = True + + short_short_descr = self._descr_short.split("-")[0] + outcome_str = "OK" + if has_error: + outcome_str = "ERROR " + short_short_descr + instr_copy = [] if self._allow_reorder: # "bucket-sort" the instructions to group those from different ranks together @@ -186,10 +197,12 @@ class TemplateManager: return (template .replace("@{min_num_ranks}@", str(self._min_ranks)) + .replace("@{outcome}@", outcome_str) .replace("@{stack_vars}@", stack_vars_str) .replace("@{mpi_init}@", init_string) .replace("@{mpi_finalize}@", finalize_string) .replace("@{desc}@", self._descr_full) + .replace("@{errormsg}@", self._descr_short) .replace("@{version}@", version) .replace("@{test_code}@", code_string))