From a0487332cf60c3e891943309937167616cff644d Mon Sep 17 00:00:00 2001 From: mkr Date: Mon, 17 Aug 2015 12:12:33 +0300 Subject: [PATCH] Run tests on Windows platform. --- doc/salome/examples/testme.py | 12 +++++++++++- src/SMESHUtils/SMESH_MeshAlgos.cxx | 2 +- src/StdMeshers/StdMeshers_RadialQuadrangle_1D2D.cxx | 6 +++--- 3 files changed, 15 insertions(+), 5 deletions(-) diff --git a/doc/salome/examples/testme.py b/doc/salome/examples/testme.py index 510a408f8..cd74c4495 100755 --- a/doc/salome/examples/testme.py +++ b/doc/salome/examples/testme.py @@ -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): diff --git a/src/SMESHUtils/SMESH_MeshAlgos.cxx b/src/SMESHUtils/SMESH_MeshAlgos.cxx index a5171703b..e589289e8 100644 --- a/src/SMESHUtils/SMESH_MeshAlgos.cxx +++ b/src/SMESHUtils/SMESH_MeshAlgos.cxx @@ -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); diff --git a/src/StdMeshers/StdMeshers_RadialQuadrangle_1D2D.cxx b/src/StdMeshers/StdMeshers_RadialQuadrangle_1D2D.cxx index 03395bd10..e9aab2b29 100644 --- a/src/StdMeshers/StdMeshers_RadialQuadrangle_1D2D.cxx +++ b/src/StdMeshers/StdMeshers_RadialQuadrangle_1D2D.cxx @@ -930,7 +930,7 @@ bool StdMeshers_RadialQuadrangle_1D2D::Compute(SMESH_Mesh& aMesh, //cout<<"Angles.Length() = "<