From: GERALD NICOLAS Date: Mon, 26 Apr 2021 09:12:52 +0000 (+0200) Subject: lacncements des 1ers cas-tests X-Git-Tag: V9_7_0rc1~5^2~6 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=17c79a5fcf3b726b9beb583d93b238dc3da54d31;p=modules%2Fsmesh.git lacncements des 1ers cas-tests --- diff --git a/doc/salome/examples/blocFissure_01_without_session.py b/doc/salome/examples/blocFissure_01_without_session.py index 0be55d4c6..224f917e5 100644 --- a/doc/salome/examples/blocFissure_01_without_session.py +++ b/doc/salome/examples/blocFissure_01_without_session.py @@ -7,39 +7,32 @@ Gérald NICOLAS +33.1.78.19.43.52 """ -__revision__ = "V02.01" +__revision__ = "V02.02" import os -import tempfile import sys -# Fichier de diagnostic -LOGFILE = os.path.join(tempfile.gettempdir(),"blocFissure.log") -if os.path.isfile(LOGFILE): - os.remove(LOGFILE) - # Lancement des cas-tests import salome salome.standalone() salome.salome_init() -from blocFissure.materielCasTests import genereMateriel - -from blocFissure.CasTests import execution_Cas +from blocFissure.CasTests import blocFissureTest +BLOCFISSURE_TEST = blocFissureTest(["cubeAngle", "cubeAngle2", "cubeCoin", "cubeMilieu", "cubeTransverse"]) +TEXTE = BLOCFISSURE_TEST.lancement() +del BLOCFISSURE_TEST # Diagnostic ERREUR = 0 -if os.path.isfile(LOGFILE): - with open(LOGFILE, 'r') as FICHIER: - LES_LIGNES = FICHIER.readlines() - for LIGNE in LES_LIGNES: +if TEXTE: + for LIGNE in TEXTE: #print (LIGNE[:-1]) if ( "NOOK" in LIGNE ): - MESSAGE_ERREUR = LIGNE + MESSAGE_ERREUR = TEXTE ERREUR = int(LIGNE.split()[-1]) break else: - MESSAGE_ERREUR = "Impossible de trouver le fichier de diagnostic {}".format(LOGFILE) + MESSAGE_ERREUR = "Impossible de trouver le diagnostic de la procédure de tests." ERREUR = -1 if ERREUR: diff --git a/doc/salome/examples/tests.set b/doc/salome/examples/tests.set index 99000efd5..531a85c51 100644 --- a/doc/salome/examples/tests.set +++ b/doc/salome/examples/tests.set @@ -46,7 +46,7 @@ SET(BAD_TESTS test_smeshplugin_mg_tetra_parallele.py test_smeshplugins.py MGAdaptTests_without_session.py - blocFissure_without_session.py + blocFissure_01_without_session.py ) SET(GOOD_TESTS diff --git a/src/Tools/blocFissure/CasTests/blocFissureTest.py b/src/Tools/blocFissure/CasTests/blocFissureTest.py index ef550f868..a0ccc2121 100644 --- a/src/Tools/blocFissure/CasTests/blocFissureTest.py +++ b/src/Tools/blocFissure/CasTests/blocFissureTest.py @@ -17,7 +17,7 @@ # # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # -__revision__ = "V02.01" +__revision__ = "V03.01" """Lancement des cas-tests de blocFissure""" @@ -533,24 +533,3 @@ if __name__ == "__main__" : sys.stdout.write(TEXTE) del BLOCFISSURE_TEST - - #sys.exit(0) - - -#while True: - - #import sys - #print ("arguments = '{}'".format(sys.argv[1:])) - - #L_PROBLEMES, D_AUX = caract_l_problemes() - - #if ( len(L_PROBLEMES) != len(TORUN) ): - #TEXTE = "\nNombre de problèmes définis : {}\n".format(len(L_PROBLEMES)) - #TEXTE += "Longueur de la liste 'TORUN' : {}\n".format(len(TORUN)) - #TEXTE += "\t==> Incohérence de programmation à corriger dans {}".format(__name__) - #print (TEXTE) - #break - - #calcul_tout (L_PROBLEMES, D_AUX) - - #break