-
Notifications
You must be signed in to change notification settings - Fork 122
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refs #4201 Trivial merge has been performed
Merge branch 'master' of https://github.com/mantidproject/mantid Conflicts: Code/Mantid/Framework/MDAlgorithms/src/ConvertToMDEvents.cpp
- Loading branch information
Showing
99 changed files
with
3,041 additions
and
537 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
############################################################################## | ||
# | ||
# This macro will add a list of test suites into the ctest mechanism. The | ||
# ctest name is generated from the name of the | ||
# | ||
############################################################################## | ||
macro( SQUISH_ADD_TEST_SUITE ) | ||
foreach( _test_suite_path ${ARGN} ) | ||
set( testSuite ${CMAKE_CURRENT_SOURCE_DIR}/${_test_suite_path} ) | ||
string( REGEX MATCH "/.+$" _test_suite ${_test_suite_path} ) | ||
string( REGEX REPLACE "/" "" _test_suite ${_test_suite} ) | ||
string( REGEX REPLACE "suite_" "" _test_suite ${_test_suite} ) | ||
set( testName ${_test_suite}SquishTests ) | ||
#message( STATUS "Creating Squish test ${testName}" ) | ||
set( resultFile "${CMAKE_BINARY_DIR}/bin/Testing/TEST-${testName}.xml" ) | ||
add_test(${testName} | ||
${CMAKE_COMMAND} | ||
"-Dsquish_server_executable:STRING=${SQUISH_SERVER_EXECUTABLE}" | ||
"-Dsquish_client_executable:STRING=${SQUISH_CLIENT_EXECUTABLE}" | ||
"-Dsquish_test_suite:STRING=${testSuite}" | ||
"-Dsquish_results_dir:STRING=${CMAKE_BINARY_DIR}/bin/Testing" | ||
"-Dsquish_results_file:STRING=${resultFile}" | ||
"-Dmantid_cmake_modules:STRING=${MANTID_CMAKE_MODULE_PATH}" | ||
-P ${MANTID_CMAKE_MODULE_PATH}/SquishTestScript.cmake | ||
) | ||
set_tests_properties( ${testName} PROPERTIES FAIL_REGULAR_EXPRESSION | ||
"FAILED;ERROR;FATAL" | ||
) | ||
endforeach( ) | ||
endmacro( SQUISH_ADD_TEST_SUITE ) | ||
|
||
############################################################################## | ||
# | ||
# This macro creates an envvars file in the test suite directory. | ||
# | ||
############################################################################## | ||
macro( SQUISH_SUITE_ENVVARS testSuites ) | ||
set( env_file "envvars" ) | ||
# ARGN doesn't like to be used as CMake list | ||
set( pair_list "" ) | ||
foreach( arg ${ARGN} ) | ||
set( pair_list ${pair_list} ${arg} ) | ||
endforeach( arg ) | ||
list( LENGTH pair_list count ) | ||
math( EXPR count "${count}/2" ) | ||
foreach( _test_suite_path ${testSuites} ) | ||
set( testSuite ${CMAKE_CURRENT_SOURCE_DIR}/${_test_suite_path} ) | ||
set( outFile ${testSuite}/${env_file} ) | ||
foreach( i RANGE 0 ${count} 2 ) | ||
math( EXPR index1 "${i}" ) | ||
math( EXPR index2 "${i}+1" ) | ||
list( GET pair_list ${index1} key ) | ||
list( GET pair_list ${index2} value ) | ||
set( key_value_pair "${key}=${value}\n" ) | ||
if( ${i} EQUAL 0 ) | ||
file( WRITE ${outFile} ${key_value_pair} ) | ||
else( ${i} EQUAL 0 ) | ||
file( APPEND ${outFile} ${key_value_pair} ) | ||
endif( ${i} EQUAL 0 ) | ||
endforeach( i RANGE 0 ${count} 2 ) | ||
endforeach( _test_suite_path ${testSuites} ) | ||
endmacro( SQUISH_SUITE_ENVVARS ) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
echo 'Starting the squish server...' | ||
start %1 | ||
|
||
echo 'Running the test suite...' | ||
%2 --testsuite %3 --resultdir %4 --reportgen xmljunit,%5 | ||
set result=%ERRORLEVEL% | ||
|
||
echo 'Stopping the squish server...' | ||
%1 --stop | ||
|
||
exit \b %result% |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#!/bin/sh | ||
echo "Starting" | ||
echo "Starting the squish server...$1 --daemon" | ||
$1 --daemon | ||
|
||
results="xmljunit,${5}" | ||
|
||
echo "Running the test suite...$2 --testsuite $3 --resultdir $4 --reportgen ${results}" | ||
$2 --testsuite $3 --resultdir $4 --reportgen ${results} | ||
returnValue=$? | ||
|
||
echo "Stopping the squish server...$1 --stop" | ||
$1 --stop | ||
|
||
exit $returnValue |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
# | ||
# This script launches a GUI test suite using Squish. You should not call | ||
# the script directly; instead, you should access it via the | ||
# SQUISH_ADD_TEST_SUITE macro. | ||
# | ||
# This script starts the Squish server, launches the test suite on the | ||
# client, and finally stops the squish server. If any of these steps | ||
# fail (including if the tests do not pass) then a fatal error is | ||
# raised. | ||
# | ||
# Based on the SQUISH_ADD_TEST macro | ||
# | ||
cmake_minimum_required(VERSION 2.6 FATAL_ERROR) | ||
|
||
message(STATUS "squish_server_executable='${squish_server_executable}'") | ||
message(STATUS "squish_client_executable='${squish_client_executable}'") | ||
message(STATUS "squish_test_suite='${squish_test_suite}'") | ||
message(STATUS "squish_results_dir='${squish_results_dir}'") | ||
message(STATUS "squish_results_file='${squish_results_file}'") | ||
|
||
# run the test | ||
if (WIN32) | ||
execute_process( | ||
COMMAND ${mantid_cmake_modules}/SquishRunTestSuite.bat ${squish_server_executable} ${squish_client_executable} ${squish_test_suite} ${squish_results_dir} ${squish_results_file} | ||
RESULT_VARIABLE test_rv | ||
) | ||
endif (WIN32) | ||
|
||
if (UNIX) | ||
execute_process( | ||
COMMAND ${mantid_cmake_modules}/SquishRunTestSuite.sh ${squish_server_executable} ${squish_client_executable} ${squish_test_suite} ${squish_results_dir} ${squish_results_file} | ||
RESULT_VARIABLE test_rv | ||
) | ||
endif (UNIX) | ||
|
||
# check for an error with running the test | ||
if(NOT "${test_rv}" STREQUAL "0") | ||
message(FATAL_ERROR "Error running Squish test") | ||
endif(NOT "${test_rv}" STREQUAL "0") | ||
|
||
file(READ ${squish_results_file} error_log) | ||
message(STATUS ${error_log}) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.