mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2025-04-12 15:07:28 +05:00
Ajout d'un test de non régression pour blocFissure
This commit is contained in:
parent
953204ba55
commit
efd8080634
48
doc/salome/examples/blocFissure_without_session.py
Normal file
48
doc/salome/examples/blocFissure_without_session.py
Normal file
@ -0,0 +1,48 @@
|
|||||||
|
#!/usr/bin/env python
|
||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
"""Tests de blocFissure ; en standalone
|
||||||
|
|
||||||
|
Copyright 2021 EDF
|
||||||
|
Gérald NICOLAS
|
||||||
|
+33.1.78.19.43.52
|
||||||
|
"""
|
||||||
|
|
||||||
|
__revision__ = "V02.01"
|
||||||
|
|
||||||
|
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
|
||||||
|
|
||||||
|
# Diagnostic
|
||||||
|
ERREUR = 0
|
||||||
|
if os.path.isfile(LOGFILE):
|
||||||
|
with open(LOGFILE, 'r') as FICHIER:
|
||||||
|
LES_LIGNES = FICHIER.readlines()
|
||||||
|
for LIGNE in LES_LIGNES:
|
||||||
|
#print (LIGNE[:-1])
|
||||||
|
if ( "NOOK" in LIGNE ):
|
||||||
|
MESSAGE_ERREUR = LIGNE
|
||||||
|
ERREUR = int(LIGNE.split()[-1])
|
||||||
|
break
|
||||||
|
else:
|
||||||
|
MESSAGE_ERREUR = "Impossible de trouver le fichier de diagnostic {}".format(LOGFILE)
|
||||||
|
ERREUR = -1
|
||||||
|
|
||||||
|
if ERREUR:
|
||||||
|
sys.stderr.write(MESSAGE_ERREUR)
|
||||||
|
#raise Exception(MESSAGE_ERREUR)
|
||||||
|
assert(False)
|
@ -46,6 +46,7 @@ SET(BAD_TESTS
|
|||||||
test_smeshplugin_mg_tetra_parallele.py
|
test_smeshplugin_mg_tetra_parallele.py
|
||||||
test_smeshplugins.py
|
test_smeshplugins.py
|
||||||
MGAdaptTests_without_session.py
|
MGAdaptTests_without_session.py
|
||||||
|
blocFissure_without_session.py
|
||||||
)
|
)
|
||||||
|
|
||||||
SET(GOOD_TESTS
|
SET(GOOD_TESTS
|
||||||
|
@ -36,13 +36,14 @@ LOGFILE = os.path.join(tempfile.gettempdir(),"blocFissure.log")
|
|||||||
#initLog.setAlways(LOGFILE) # critical = 50
|
#initLog.setAlways(LOGFILE) # critical = 50
|
||||||
|
|
||||||
# ---tous les cas en séquence, ou les cas sélectionnés ...
|
# ---tous les cas en séquence, ou les cas sélectionnés ...
|
||||||
TORUNOK = [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0] # OK
|
TORUNOK = [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0 ] # OK 19/04/2021
|
||||||
# 0, 1, 2, 3, 4, 5, 6, 7, 8, 9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28
|
# 0, 1, 2, 3, 4, 5, 6, 7, 8, 9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28
|
||||||
#RUNALL = False
|
#RUNALL = False
|
||||||
RUNALL = True
|
RUNALL = True
|
||||||
if RUNALL:
|
if RUNALL:
|
||||||
TORUN = [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]
|
TORUN = [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ]
|
||||||
# 0, 1, 2, 3, 4, 5, 6, 7, 8, 9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28
|
# 0, 1, 2, 3, 4, 5, 6, 7, 8, 9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28
|
||||||
|
TORUN = TORUNOK
|
||||||
else:
|
else:
|
||||||
TORUNPB = list()
|
TORUNPB = list()
|
||||||
for IAUX in TORUNOK:
|
for IAUX in TORUNOK:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user