2021-04-26 21:31:41 +05:00
|
|
|
#!/usr/bin/env python
|
|
|
|
# -*- coding: utf-8 -*-
|
|
|
|
"""Tests de blocFissure ; en standalone
|
|
|
|
|
|
|
|
Cas tests basés sur les matériels :
|
|
|
|
. decoupeCylindre
|
|
|
|
. disque_perce
|
|
|
|
. fissureGauche
|
2021-04-27 19:17:18 +05:00
|
|
|
. fissureGauche_2
|
2021-04-26 21:31:41 +05:00
|
|
|
+ ellipse, ellipse_disque, ellipse_probleme
|
|
|
|
|
2024-06-03 15:59:18 +05:00
|
|
|
Copyright 2021-2024 CEA, EDF
|
2021-04-26 21:31:41 +05:00
|
|
|
Gérald NICOLAS
|
|
|
|
+33.1.78.19.43.52
|
|
|
|
"""
|
|
|
|
|
2021-04-27 19:17:18 +05:00
|
|
|
__revision__ = "V02.04"
|
2021-04-26 21:31:41 +05:00
|
|
|
|
|
|
|
import os
|
|
|
|
import sys
|
|
|
|
|
|
|
|
# Lancement des cas-tests
|
|
|
|
import salome
|
|
|
|
salome.standalone()
|
2021-08-12 14:38:10 +05:00
|
|
|
salome.salome_init_without_session()
|
2021-04-26 21:31:41 +05:00
|
|
|
|
|
|
|
from blocFissure.CasTests.blocFissureTest import blocFissureTest
|
2021-04-27 19:17:18 +05:00
|
|
|
BLOCFISSURE_TEST = blocFissureTest(["cylindre", "cylindre_2", "disquePerce", "faceGauche","ellipse_1", "ellipse_2"])
|
|
|
|
#BLOCFISSURE_TEST = blocFissureTest(["cylindre", "cylindre_2", "disquePerce", "faceGauche","ellipse_1", "ellipse_2", "faceGauche_2"])
|
2021-04-26 21:31:41 +05:00
|
|
|
MESSAGE_ERREUR = BLOCFISSURE_TEST.lancement()
|
2021-04-27 19:17:18 +05:00
|
|
|
#sys.stdout.write(MESSAGE_ERREUR)
|
2021-04-26 21:31:41 +05:00
|
|
|
del BLOCFISSURE_TEST
|
|
|
|
|
|
|
|
# Diagnostic
|
|
|
|
if MESSAGE_ERREUR:
|
|
|
|
if ( "NOOK" in MESSAGE_ERREUR ):
|
|
|
|
LAUX = MESSAGE_ERREUR.split()
|
|
|
|
ERREUR = int(LAUX[LAUX.index("NOOK")+2])
|
|
|
|
else:
|
|
|
|
ERREUR = 0
|
|
|
|
else:
|
|
|
|
MESSAGE_ERREUR = "Impossible de trouver le diagnostic de la procédure de tests."
|
|
|
|
ERREUR = -1
|
|
|
|
|
|
|
|
if ERREUR:
|
|
|
|
sys.stderr.write(MESSAGE_ERREUR)
|
|
|
|
#raise Exception(MESSAGE_ERREUR)
|
|
|
|
assert(False)
|
|
|
|
|