# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
-# --- options ---
+ADD_SUBDIRECTORY(data)
# additional include directories
INCLUDE_DIRECTORIES(
TARGET_LINK_LIBRARIES(TestXAO ${_link_LIBRARIES})
SALOME_GENERATE_TESTS_ENVIRONMENT(tests_env)
+SET(TEST_INSTALL_DIRECTORY ${SALOME_INSTALL_SCRIPT_SCRIPTS}/test/xao)
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})
# Application tests
-SET(TEST_INSTALL_DIRECTORY ${SALOME_INSTALL_SCRIPT_SCRIPTS}/test/xao)
INSTALL(TARGETS TestXAO RUNTIME DESTINATION ${TEST_INSTALL_DIRECTORY})
INSTALL(FILES CTestTestfileInstall.cmake
#
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")
public:
static std::string getTestFilePath(const std::string& fileName)
{
- std::string dataDir = getenv("GEOM_SRC_DIR");
- dataDir += "/src/XAO/tests/data/";
- dataDir += fileName;
+ std::string dataDir = "";
+ char* geomSrcDir = getenv("XAO_DATA_DIR");
+ if (geomSrcDir != NULL)
+ {
+ dataDir = geomSrcDir;
+#if defined _WIN32 || defined __CYGWIN__
+ dataDir += "\\";
+#else
+ dataDir += "/";
+#endif
+ dataDir += fileName;
+ }
+
return dataDir;
}
--- /dev/null
+# 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})