From: Cédric Aguerre Date: Mon, 18 Jul 2016 12:59:48 +0000 (+0200) Subject: [MEDCalc] test script must exit with actual unittest runner status X-Git-Tag: V8_1_0b1~23 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=9e81f374729b2eea764291c3c2f99ef448260677;p=modules%2Fmed.git [MEDCalc] test script must exit with actual unittest runner status --- diff --git a/src/MEDCalc/test/gui/CMakeLists.txt b/src/MEDCalc/test/gui/CMakeLists.txt index cb6df7349..188391e28 100644 --- a/src/MEDCalc/test/gui/CMakeLists.txt +++ b/src/MEDCalc/test/gui/CMakeLists.txt @@ -41,7 +41,7 @@ SET(TEST_INSTALL_DIRECTORY ${SALOME_MED_INSTALL_TEST}/MEDCalc/gui) SALOME_INSTALL_SCRIPTS(test_qttesting.py ${TEST_INSTALL_DIRECTORY}) SALOME_INSTALL_SCRIPTS(${CMAKE_CURRENT_BINARY_DIR}/medcalc_testutils.py ${TEST_INSTALL_DIRECTORY}) -SALOME_INSTALL_SCRIPTS("${_test_scripts}" ${SALOME_INSTALL_PYTHON}/tests) +SALOME_INSTALL_SCRIPTS("${_test_scripts}" ${SALOME_INSTALL_PYTHON}/tests/gui) INSTALL(FILES ${_test_scenarii} DESTINATION ${SALOME_MED_INSTALL_RES_DATA}/tests/gui/scenarios) INSTALL(FILES ${_test_baselines} DESTINATION ${SALOME_MED_INSTALL_RES_DATA}/tests/gui/baselines) diff --git a/src/MEDCalc/test/gui/medcalc_testutils.py.in b/src/MEDCalc/test/gui/medcalc_testutils.py.in index bcdf7f9a3..0b50e06c5 100644 --- a/src/MEDCalc/test/gui/medcalc_testutils.py.in +++ b/src/MEDCalc/test/gui/medcalc_testutils.py.in @@ -24,7 +24,7 @@ def __getRootDir(): return rootDir def GetScriptDir(): - relativeDir = "@SALOME_INSTALL_PYTHON@/tests" + relativeDir = "@SALOME_INSTALL_PYTHON@/tests/gui" return os.path.join(__getRootDir(), relativeDir) def GetScenarioDir(): diff --git a/src/MEDCalc/test/gui/test_qttesting.py b/src/MEDCalc/test/gui/test_qttesting.py index e059b853b..1983febb9 100644 --- a/src/MEDCalc/test/gui/test_qttesting.py +++ b/src/MEDCalc/test/gui/test_qttesting.py @@ -18,7 +18,7 @@ # # Author: A. Bruneton (CEA) -import unittest, os, shutil +import unittest, os, shutil, sys from posixpath import basename class MEDGUITest(unittest.TestCase): @@ -117,5 +117,7 @@ if __name__ == "__main__": suite.addTest(MEDGUITest('testScalarMap')) suite.addTest(MEDGUITest('testScalarMap2')) # suite.addTest(MEDGUITest('testIsoContour')) - unittest.TextTestRunner().run(suite) + runner = unittest.TextTestRunner() + ret = not runner.run(suite).wasSuccessful() + sys.exit(ret)