]> SALOME platform Git repositories - modules/smesh.git/commitdiff
Salome HOME
Run tests on Windows platform.
authormkr <mkr@opencascade.com>
Mon, 17 Aug 2015 09:12:33 +0000 (12:12 +0300)
committervsr <vsr@opencascade.com>
Tue, 3 Nov 2015 11:52:10 +0000 (14:52 +0300)
doc/salome/examples/testme.py
src/SMESHUtils/SMESH_MeshAlgos.cxx
src/StdMeshers/StdMeshers_RadialQuadrangle_1D2D.cxx

index 510a408f8d5022a28898ee218f664512fbd90834..cd74c44959f351fd6963101670401544f9c44c0c 100755 (executable)
@@ -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):
index a5171703b8f692055813d3ef2a70c29d2d364510..e589289e8094b688313e4870c1ad1786c59eb169 100644 (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);
index 03395bd108806aa396c50e9fd5909e31afeefa6b..e9aab2b2953c5c9b5c73083bb234042592aa457f 100644 (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;