2021-04-19 14:46:49 +05:00
|
|
|
#!/usr/bin/env python
|
|
|
|
# -*- coding: utf-8 -*-
|
|
|
|
"""Tests de blocFissure ; en standalone
|
|
|
|
|
|
|
|
Copyright 2021 EDF
|
|
|
|
Gérald NICOLAS
|
|
|
|
+33.1.78.19.43.52
|
|
|
|
"""
|
|
|
|
|
2021-04-26 14:12:52 +05:00
|
|
|
__revision__ = "V02.02"
|
2021-04-19 14:46:49 +05:00
|
|
|
|
|
|
|
import os
|
|
|
|
import sys
|
|
|
|
|
|
|
|
# Lancement des cas-tests
|
|
|
|
import salome
|
|
|
|
salome.standalone()
|
|
|
|
salome.salome_init()
|
|
|
|
|
2021-04-26 14:12:52 +05:00
|
|
|
from blocFissure.CasTests import blocFissureTest
|
|
|
|
BLOCFISSURE_TEST = blocFissureTest(["cubeAngle", "cubeAngle2", "cubeCoin", "cubeMilieu", "cubeTransverse"])
|
|
|
|
TEXTE = BLOCFISSURE_TEST.lancement()
|
|
|
|
del BLOCFISSURE_TEST
|
2021-04-19 14:46:49 +05:00
|
|
|
|
|
|
|
# Diagnostic
|
|
|
|
ERREUR = 0
|
2021-04-26 14:12:52 +05:00
|
|
|
if TEXTE:
|
|
|
|
for LIGNE in TEXTE:
|
2021-04-19 14:46:49 +05:00
|
|
|
#print (LIGNE[:-1])
|
|
|
|
if ( "NOOK" in LIGNE ):
|
2021-04-26 14:12:52 +05:00
|
|
|
MESSAGE_ERREUR = TEXTE
|
2021-04-19 14:46:49 +05:00
|
|
|
ERREUR = int(LIGNE.split()[-1])
|
|
|
|
break
|
|
|
|
else:
|
2021-04-26 14:12:52 +05:00
|
|
|
MESSAGE_ERREUR = "Impossible de trouver le diagnostic de la procédure de tests."
|
2021-04-19 14:46:49 +05:00
|
|
|
ERREUR = -1
|
|
|
|
|
|
|
|
if ERREUR:
|
|
|
|
sys.stderr.write(MESSAGE_ERREUR)
|
|
|
|
#raise Exception(MESSAGE_ERREUR)
|
|
|
|
assert(False)
|