Mentions légales du service

Skip to content
Snippets Groups Projects
Commit bbe34f3c authored by Nicolas Bellot's avatar Nicolas Bellot Committed by hhakim
Browse files

test matlab en premier

parent 3216a58e
No related branches found
No related tags found
No related merge requests found
...@@ -15,6 +15,49 @@ if(BUILD_OPENBLAS) ...@@ -15,6 +15,49 @@ if(BUILD_OPENBLAS)
endif() endif()
##############################################################################
# Testing with CTest
# CTest is a testing tool distributed as a part of CMake.
# Running the differents binary created in this project
##############################################################################
# Critical time, which fixe the limit time of the process
set(TIMEOUT_MEG 8000)
set(TIMEOUT_COMP 100)
# MATLAB TEST
if(BUILD_MATLAB_MEX_FILES)
add_test(NAME FAUST_HIER_MEX COMMAND matlab -nojvm -r "try;testpass=0;addpath('${FAUST_BIN_TEST_BIN_DIR}','${FAUST_BIN_TEST_TOOLS_DIR}');set_path;hier_fact_test('config_compared_hierarchical_fact',9402,1); catch ME ;testpass=-1;disp(getReport(ME)); end ; exit(testpass)" )
add_test(NAME FAUST_MEG_MEX COMMAND matlab -nojvm -r "try;testpass=0;addpath('${FAUST_BIN_TEST_BIN_DIR}','${FAUST_BIN_TEST_TOOLS_DIR}');set_path;hier_fact_test('config_MEG',22450,100);catch ME ;testpass=-1;disp(getReport(ME)); end ; exit(testpass)")
add_test(NAME FAUST_HADAMARD_MEX COMMAND matlab -nojvm -r "try;testpass=0;addpath('${FAUST_BIN_TEST_BIN_DIR}','${FAUST_BIN_TEST_TOOLS_DIR}');set_path;hier_fact_test('config_HADAMARD',5941,1);catch ME ;testpass=-1;disp(getReport(ME)); end ; exit(testpass)")
add_test(NAME DEMO_MATLAB COMMAND matlab -nodesktop -r "try;testpass=0;addpath('${FAUST_MATLAB_INSTALL_DIR}');setup_FAUST;run_all_demo;catch ME ;testpass=-1;disp(getReport(ME)); end ; exit(testpass)")
add_test(NAME MATLAB_FAUST COMMAND matlab -nojvm -r "try;testpass=0;addpath('${FAUST_BIN_TEST_BIN_DIR}','${FAUST_BIN_TEST_TOOLS_DIR}');set_path;test_matlab_faust;catch ME ;testpass=-1;disp(getReport(ME)); end ; exit(testpass)")
# limit the time of the process in case of bug...
#CTEST_FULL_OUTPUT
set_tests_properties(FAUST_HIER_MEX FAUST_HADAMARD_MEX PROPERTIES TIMEOUT 100)
set_tests_properties(DEMO_MATLAB PROPERTIES TIMEOUT 6000)
set_tests_properties(MATLAB_FAUST PROPERTIES TIMEOUT 15)
set_tests_properties(FAUST_MEG_MEX PROPERTIES TIMEOUT ${TIMEOUT_MEG})
endif()
####### IF THE MATIO LIBRARY IS AVAILABLE ELSE WE USE TXT OR XML DATA ####### ####### IF THE MATIO LIBRARY IS AVAILABLE ELSE WE USE TXT OR XML DATA #######
if(MATIO_LIB_FILE AND MATIO_INC_DIR AND BUILD_READ_MAT_FILE) # AND HDF5_LIB_FILE) if(MATIO_LIB_FILE AND MATIO_INC_DIR AND BUILD_READ_MAT_FILE) # AND HDF5_LIB_FILE)
...@@ -60,20 +103,14 @@ if (BUILD_MATLAB_MEX_FILES) ...@@ -60,20 +103,14 @@ if (BUILD_MATLAB_MEX_FILES)
foreach(matlabtest hier_fact_test.m test_matlab_faust.m) foreach(matlabtest hier_fact_test.m test_matlab_faust.m)
configure_file(${FAUST_SRC_TEST_SRC_DIR}/${matlabtest} ${FAUST_BIN_TEST_BIN_DIR}/${matlabtest} COPYONLY) configure_file(${FAUST_SRC_TEST_SRC_DIR}/${matlabtest} ${FAUST_BIN_TEST_BIN_DIR}/${matlabtest} @ONLY)
endforeach() endforeach()
endif(BUILD_MATLAB_MEX_FILES) endif(BUILD_MATLAB_MEX_FILES)
##############################################################################
# Testing with CTest
# CTest is a testing tool distributed as a part of CMake.
# Running the differents binary created in this project
##############################################################################
# Critical time, which fixe the limit time of the process
set(TIMEOUT_MEG 8000)
set(TIMEOUT_COMP 100)
# MATLAB input format # MATLAB input format
...@@ -121,23 +158,7 @@ endif(BUILD_READ_XML_FILE) ...@@ -121,23 +158,7 @@ endif(BUILD_READ_XML_FILE)
if(BUILD_MATLAB_MEX_FILES)
add_test(NAME FAUST_HIER_MEX COMMAND matlab -nojvm -r "try;testpass=0;addpath('${FAUST_BIN_TEST_BIN_DIR}','${FAUST_BIN_TEST_TOOLS_DIR}');set_path;hier_fact_test('config_compared_hierarchical_fact',9402,1); catch ME ;testpass=-1;disp(getReport(ME)); end ; exit(testpass)" )
add_test(NAME FAUST_MEG_MEX COMMAND matlab -nojvm -r "try;testpass=0;addpath('${FAUST_BIN_TEST_BIN_DIR}','${FAUST_BIN_TEST_TOOLS_DIR}');set_path;hier_fact_test('config_MEG',22450,100);catch ME ;testpass=-1;disp(getReport(ME)); end ; exit(testpass)")
add_test(NAME FAUST_HADAMARD_MEX COMMAND matlab -nojvm -r "try;testpass=0;addpath('${FAUST_BIN_TEST_BIN_DIR}','${FAUST_BIN_TEST_TOOLS_DIR}');set_path;hier_fact_test('config_HADAMARD',5941,1);catch ME ;testpass=-1;disp(getReport(ME)); end ; exit(testpass)")
add_test(NAME DEMO_MATLAB COMMAND matlab -nodesktop -r "try;testpass=0;addpath('${FAUST_MATLAB_INSTALL_DIR}');setup_FAUST;run_all_demo;catch ME ;testpass=-1;disp(getReport(ME)); end ; exit(testpass)")
add_test(NAME MATLAB_FAUST COMMAND matlab -nojvm -r "try;testpass=0;addpath('${FAUST_BIN_TEST_BIN_DIR}','${FAUST_BIN_TEST_TOOLS_DIR}');set_path;test_matlab_faust;catch ME ;testpass=-1;disp(getReport(ME)); end ; exit(testpass)")
# limit the time of the process in case of bug...
#CTEST_FULL_OUTPUT
set_tests_properties(FAUST_HIER_MEX FAUST_HADAMARD_MEX PROPERTIES TIMEOUT 100)
set_tests_properties(DEMO_MATLAB PROPERTIES TIMEOUT 6000)
set_tests_properties(FAUST_MEG_MEX PROPERTIES TIMEOUT ${TIMEOUT_MEG})
endif()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment