Skip to content

Commit

Permalink
Refs #4316: Re-enabling SliceViewer python test but disabled for RHEL5
Browse files Browse the repository at this point in the history
  • Loading branch information
Janik Zikovsky committed Dec 22, 2011
1 parent 2f04bbf commit 43dfb46
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 13 deletions.
9 changes: 4 additions & 5 deletions Code/Mantid/MantidPlot/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -813,7 +813,7 @@ set ( MANTIDPLOT_TEST_PY_FILES
MantidPlotSliceViewerTest.py
)

if ( 1 )
if ( 0 )
message (STATUS "Your CMAKE_SYSTEM string is '${CMAKE_SYSTEM}'")
message (STATUS "Your CMAKE_SYSTEM_NAME string is '${CMAKE_SYSTEM_NAME}'")
message (STATUS "Your CMAKE_BINARY_DIR string is '${CMAKE_BINARY_DIR}'")
Expand All @@ -839,11 +839,10 @@ else ()
foreach ( PYFILE ${MANTIDPLOT_TEST_PY_FILES} )
# Add the test. Name of test = name of the file
ADD_TEST( ${PYFILE} ${MANTIDPLOT_PATH} -xq ${CMAKE_CURRENT_SOURCE_DIR}/test/${PYFILE} )
# Add an environment property so that the script can find the source of xmlrunner
# Append to the path for MacOS
#set_tests_properties( ${PYFILE} PROPERTIES ENVIRONMENT "MANTID_SOURCE=${CMAKE_SOURCE_DIR};PATH=$ENV{PATH}:${CMAKE_LIBRARY_OUTPUT_DIRECTORY}")

# Add an environment property MANTID_SOURCE so that the script can find the source of xmlrunner
# Append to the path and set MANTIDPATH for MacOS' MantidPlot to run
set_tests_properties( ${PYFILE} PROPERTIES ENVIRONMENT "PATH=$ENV{PATH}:${CMAKE_LIBRARY_OUTPUT_DIRECTORY};MANTIDPATH=${CMAKE_LIBRARY_OUTPUT_DIRECTORY};MANTID_SOURCE=${CMAKE_SOURCE_DIR}")

endforeach ()
endif()

Expand Down
21 changes: 13 additions & 8 deletions Code/Mantid/MantidQt/SliceViewer/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -128,14 +128,19 @@ endif ()
# Unit tests setup
###########################################################################

# python unit tests
#if ( PYUNITTEST_FOUND )
if ( 0 )
pyunittest_add_test ( SliceViewerTest.py ${TEST_PY_FILES} "" )
add_dependencies ( SliceViewerTest.py MantidQt Algorithms )
add_dependencies ( GUITests SliceViewerTest.py )
# Add to the 'UnitTests' group in VS
set_property ( TARGET SliceViewerTest.py PROPERTY FOLDER "UnitTests" )
# Check system version
if ( ${CMAKE_SYSTEM} MATCHES ".*\\.el5" )
# This is RHEL5. GUI tests hang on this platform for some reason
message ( "RHEL5 hangs on GUI tests. Disabling MantidQt SliceViewer python tests." )
else ()

if ( PYUNITTEST_FOUND )
pyunittest_add_test ( SliceViewerTest.py ${TEST_PY_FILES} "" )
add_dependencies ( SliceViewerTest.py MantidQt Algorithms )
add_dependencies ( GUITests SliceViewerTest.py )
# Add to the 'UnitTests' group in VS
set_property ( TARGET SliceViewerTest.py PROPERTY FOLDER "UnitTests" )
endif ()
endif ()

###########################################################################
Expand Down

0 comments on commit 43dfb46

Please sign in to comment.