mirror of
https://git.salome-platform.org/gitpub/modules/geom.git
synced 2024-12-26 17:30:35 +05:00
XAO test fixed to work in salome test
This commit is contained in:
parent
b59b99da3e
commit
7a3c2d25cc
@ -17,7 +17,7 @@
|
|||||||
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||||
#
|
#
|
||||||
|
|
||||||
# --- options ---
|
ADD_SUBDIRECTORY(data)
|
||||||
|
|
||||||
# additional include directories
|
# additional include directories
|
||||||
INCLUDE_DIRECTORIES(
|
INCLUDE_DIRECTORIES(
|
||||||
@ -57,15 +57,15 @@ ADD_EXECUTABLE(TestXAO ${TestXAO_SOURCES})
|
|||||||
TARGET_LINK_LIBRARIES(TestXAO ${_link_LIBRARIES})
|
TARGET_LINK_LIBRARIES(TestXAO ${_link_LIBRARIES})
|
||||||
|
|
||||||
SALOME_GENERATE_TESTS_ENVIRONMENT(tests_env)
|
SALOME_GENERATE_TESTS_ENVIRONMENT(tests_env)
|
||||||
|
SET(TEST_INSTALL_DIRECTORY ${SALOME_INSTALL_SCRIPT_SCRIPTS}/test/xao)
|
||||||
|
|
||||||
ADD_TEST(TestXAO TestXAO)
|
ADD_TEST(TestXAO TestXAO)
|
||||||
SET_TESTS_PROPERTIES(TestXAO PROPERTIES ENVIRONMENT "GEOM_SRC_DIR=${PROJECT_SOURCE_DIR};${tests_env}")
|
SET_TESTS_PROPERTIES(TestXAO PROPERTIES ENVIRONMENT "XAO_DATA_DIR=${TEST_INSTALL_DIRECTORY}/data;${tests_env}")
|
||||||
|
|
||||||
INSTALL(TARGETS TestXAO DESTINATION ${SALOME_INSTALL_BINS})
|
INSTALL(TARGETS TestXAO DESTINATION ${SALOME_INSTALL_BINS})
|
||||||
|
|
||||||
# Application tests
|
# Application tests
|
||||||
|
|
||||||
SET(TEST_INSTALL_DIRECTORY ${SALOME_INSTALL_SCRIPT_SCRIPTS}/test/xao)
|
|
||||||
INSTALL(TARGETS TestXAO RUNTIME DESTINATION ${TEST_INSTALL_DIRECTORY})
|
INSTALL(TARGETS TestXAO RUNTIME DESTINATION ${TEST_INSTALL_DIRECTORY})
|
||||||
|
|
||||||
INSTALL(FILES CTestTestfileInstall.cmake
|
INSTALL(FILES CTestTestfileInstall.cmake
|
||||||
|
@ -18,4 +18,6 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
ADD_TEST(GEOM_TestXAO python ${SALOME_TEST_DRIVER} ${TIMEOUT} TestXAO)
|
ADD_TEST(GEOM_TestXAO python ${SALOME_TEST_DRIVER} ${TIMEOUT} TestXAO)
|
||||||
SET_TESTS_PROPERTIES(GEOM_TestXAO PROPERTIES LABELS "${COMPONENT_NAME}")
|
SET_TESTS_PROPERTIES(GEOM_TestXAO PROPERTIES
|
||||||
|
LABELS "${COMPONENT_NAME}"
|
||||||
|
ENVIRONMENT "XAO_DATA_DIR=$ENV{ABSOLUTE_APPLI_PATH}/bin/salome/test/GEOM/xao/data")
|
||||||
|
@ -30,9 +30,19 @@ namespace XAO
|
|||||||
public:
|
public:
|
||||||
static std::string getTestFilePath(const std::string& fileName)
|
static std::string getTestFilePath(const std::string& fileName)
|
||||||
{
|
{
|
||||||
std::string dataDir = getenv("GEOM_SRC_DIR");
|
std::string dataDir = "";
|
||||||
dataDir += "/src/XAO/tests/data/";
|
char* geomSrcDir = getenv("XAO_DATA_DIR");
|
||||||
|
if (geomSrcDir != NULL)
|
||||||
|
{
|
||||||
|
dataDir = geomSrcDir;
|
||||||
|
#if defined _WIN32 || defined __CYGWIN__
|
||||||
|
dataDir += "\\";
|
||||||
|
#else
|
||||||
|
dataDir += "/";
|
||||||
|
#endif
|
||||||
dataDir += fileName;
|
dataDir += fileName;
|
||||||
|
}
|
||||||
|
|
||||||
return dataDir;
|
return dataDir;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
29
src/XAO/tests/data/CMakeLists.txt
Normal file
29
src/XAO/tests/data/CMakeLists.txt
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
# Copyright (C) 2012-2017 CEA/DEN, EDF R&D, OPEN CASCADE
|
||||||
|
#
|
||||||
|
# This library is free software; you can redistribute it and/or
|
||||||
|
# modify it under the terms of the GNU Lesser General Public
|
||||||
|
# License as published by the Free Software Foundation; either
|
||||||
|
# version 2.1 of the License, or (at your option) any later version.
|
||||||
|
#
|
||||||
|
# This library is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
# Lesser General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU Lesser General Public
|
||||||
|
# License along with this library; if not, write to the Free Software
|
||||||
|
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
|
#
|
||||||
|
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||||
|
#
|
||||||
|
|
||||||
|
SET(XAO_DATA_FILES
|
||||||
|
Box_1.brep
|
||||||
|
Box_2.brep
|
||||||
|
Cut_2.brep
|
||||||
|
test.xao
|
||||||
|
)
|
||||||
|
|
||||||
|
# --- rules ---
|
||||||
|
SET(XAO_DATA_DIR ${SALOME_INSTALL_SCRIPT_SCRIPTS}/test/xao/data)
|
||||||
|
INSTALL(FILES ${XAO_DATA_FILES} DESTINATION ${XAO_DATA_DIR})
|
Loading…
Reference in New Issue
Block a user