Run tests on Windows platform.

This commit is contained in:
mkr 2015-08-17 12:12:33 +03:00 committed by vsr
parent c149fe2963
commit a0487332cf
3 changed files with 15 additions and 5 deletions

View File

@ -24,11 +24,21 @@ import unittest, sys, os
class SalomeSession(object):
def __init__(self, script):
import runSalome
sys.argv = ["runSalome.py"]
run_script = "runSalome.py"
if sys.platform == 'win32':
module_dir = os.getenv("KERNEL_ROOT_DIR")
if module_dir: run_script = os.path.join(module_dir, "bin", "salome", run_script)
pass
sys.argv = [run_script]
sys.argv += ["--terminal"]
sys.argv += ["--modules=GEOM,MED,SMESH"]
sys.argv += ["%s" % script]
if sys.platform == 'win32':
main_module_path = sys.modules['__main__'].__file__
sys.modules['__main__'].__file__ = ''
clt, d = runSalome.main()
if sys.platform == 'win32':
sys.modules['__main__'].__file__ = main_module_path
return
def __del__(self):

View File

@ -1537,7 +1537,7 @@ SMESH_MeshAlgos::FindFaceInSet(const SMDS_MeshNode* n1,
int* n2ind)
{
int i1, i2;
int i1 = 0, i2 = 0;
const SMDS_MeshElement* face = 0;
SMDS_ElemIteratorPtr invElemIt = n1->GetInverseElementIterator(SMDSAbs_Face);

View File

@ -930,7 +930,7 @@ bool StdMeshers_RadialQuadrangle_1D2D::Compute(SMESH_Mesh& aMesh,
//cout<<"Angles.Length() = "<<Angles.Length()<<" Points.Length() = "<<Points.Length()<<endl;
//cout<<"Nodes1.size() = "<<Nodes1.size()<<" Pnts2d1.Length() = "<<Pnts2d1.Length()<<endl;
for(; i<Angles.Length(); i++) {
vector< const SMDS_MeshNode* > tmpNodes(Nodes1.size());
vector< const SMDS_MeshNode* > tmpNodes;
gp_Trsf aTrsf;
gp_Ax1 theAxis(P0,gp_Dir(Axis));
aTrsf.SetRotation( theAxis, Angles.Value(i) );
@ -948,10 +948,10 @@ bool StdMeshers_RadialQuadrangle_1D2D::Compute(SMESH_Mesh& aMesh,
aTrsf2d.Transforms( cx, cy );
// set node on face
meshDS->SetNodeOnFace( node, faceID, cx, cy );
tmpNodes[j-1] = node;
tmpNodes.push_back(node);
}
// create faces
tmpNodes[Points.Length()] = CNodes[i];
tmpNodes.push_back( CNodes[i] );
// quad
for(j=0; j<Nodes1.size()-1; j++) {
SMDS_MeshFace* MF;