X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/e85fdc5e3b4e74c39e0255980cc7c15c1759c276..cc309f0bc25802386a5f6d8bf2cfc487139ca1e3:/teshsuite/smpi/MBI/RMAArgGenerator.py diff --git a/teshsuite/smpi/MBI/RMAArgGenerator.py b/teshsuite/smpi/MBI/RMAArgGenerator.py index c459dfa7fc..5e4279440d 100755 --- a/teshsuite/smpi/MBI/RMAArgGenerator.py +++ b/teshsuite/smpi/MBI/RMAArgGenerator.py @@ -1,7 +1,7 @@ #! /usr/bin/python3 import os import sys -from generator_utils import * +import generator_utils as gen template = """// @{generatedby}@ /* ///////////////////////// The MPI Bugs Initiative //////////////////////// @@ -75,8 +75,8 @@ int main(int argc, char **argv) { """ -for e in epoch: - for p in rma: +for e in gen.epoch: + for p in gen.rma: patterns = {} patterns = {'e': e, 'p': p} patterns['origin'] = "MBI" @@ -84,10 +84,10 @@ for e in epoch: patterns['rmafeature'] = 'Yes' patterns['p'] = p patterns['e'] = e - patterns['epoch'] = epoch[e]("1") - patterns['finEpoch'] = finEpoch[e]("1") - patterns['init'] = init[p]("1") - patterns['operation'] = operation[p]("1") + patterns['epoch'] = gen.epoch[e]("1") + patterns['finEpoch'] = gen.finEpoch[e]("1") + patterns['init'] = gen.init[p]("1") + patterns['operation'] = gen.operation[p]("1") patterns['change_arg'] = "" # Generate a code with a null type @@ -97,7 +97,7 @@ for e in epoch: replace['outcome'] = 'ERROR: InvalidDatatype' replace['change_arg'] = 'type = MPI_DATATYPE_NULL;' replace['errormsg'] = '@{p}@ at @{filename}@:@{line:MBIERROR}@ has MPI_DATATYPE_NULL as a type' - make_file(template, f'InvalidParam_BufferNullCond_{e}_{p}_nok.c', replace) + gen.make_file(template, f'InvalidParam_BufferNullCond_{e}_{p}_nok.c', replace) # Generate a code with an invalid type replace = patterns @@ -106,4 +106,4 @@ for e in epoch: replace['outcome'] = 'ERROR: InvalidDatatype' replace['change_arg'] = 'MPI_Type_contiguous (2, MPI_INT, &type); MPI_Type_commit(&type);MPI_Type_free(&type); /* MBIERROR2 */' replace['errormsg'] = 'Invalid Datatype in @{p}@ at @{filename}@:@{line:MBIERROR}@' - make_file(template, f'InvalidParam_DatatypeCond_{e}_{p}_nok.c', replace) + gen.make_file(template, f'InvalidParam_DatatypeCond_{e}_{p}_nok.c', replace)