Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add integration test for python_modular
- Loading branch information
Showing
6 changed files
with
79 additions
and
25 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,12 @@ | ||
MACRO(GET_PYTHON_ENV) | ||
LIST(APPEND PYTHON_ENV_VARS GDB="gdb -x ${CMAKE_SOURCE_DIR}/src/.gdb --args") | ||
LIST(APPEND PYTHON_ENV_VARS PYTHON=${PYTHON_EXECUTABLE}) | ||
LIST(APPEND PYTHON_ENV_VARS PYTHONPATH=${CMAKE_INSTALL_PREFIX}/${PYTHON_PACKAGES_PATH}) | ||
if(WIN32) | ||
LIST(APPEND PYTHON_ENV_VARS PATH=${CMAKE_INSTALL_PREFIX}/lib;$ENV{PATH}) | ||
elseif(APPLE) | ||
LIST(APPEND PYTHON_ENV_VARS DYLD_LIBRARY_PATH=${CMAKE_INSTALL_PREFIX}/lib:$ENV{DYLD_LIBRARY_PATH}) | ||
else() | ||
LIST(APPEND PYTHON_ENV_VARS LD_LIBRARY_PATH=${CMAKE_INSTALL_PREFIX}/lib:$ENV{LD_LIBRARY_PATH}) | ||
endif() | ||
ENDMACRO() |
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,22 @@ | ||
# Generate the list of integration tests | ||
FILE(GLOB_RECURSE INTEGRATION_TESTS data/*.m) | ||
FILE(READ blacklist INTEGRATION_BLACKLIST) | ||
STRING(REGEX REPLACE ";" "\\\\;" INTEGRATION_BLACKLIST "${INTEGRATION_BLACKLIST}") | ||
STRING(REGEX REPLACE "\n" ";" INTEGRATION_BLACKLIST "${INTEGRATION_BLACKLIST}") | ||
|
||
unset(_tmp) | ||
FOREACH(IB ${INTEGRATION_BLACKLIST}) | ||
list(APPEND _tmp ${CMAKE_CURRENT_SOURCE_DIR}/data/${IB}) | ||
ENDFOREACH() | ||
set(INTEGRATION_BLACKLIST ${_tmp}) | ||
|
||
LIST(REMOVE_ITEM INTEGRATION_TESTS ${INTEGRATION_BLACKLIST}) | ||
unset(INTEGRATION_BLACKLIST) | ||
|
||
IF (PythonModular) | ||
add_subdirectory(python_modular) | ||
ENDIF() | ||
|
||
|
||
|
||
unset(INTEGRATION_TESTS) |
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 |
---|---|---|
@@ -1,12 +1,12 @@ | ||
../data/distribution/HMM_1en10_60_4_1_0_6_3_False_CUBE.m | ||
../data/classifier/SVMSGD_0017_1en05_1_True.m | ||
../data/classifier/SVMSGD_023_1en05_1_True.m | ||
../data/classifier/SVMSGD_15_1en05_1_True.m | ||
../data/classifier/SVMSGD_30_1en05_16_True.m | ||
../data/classifier/SVMSGD_30_1en05_1_True.m | ||
../data/classifier/SubGradientSVM_0017_1en05_1_05_False.m | ||
../data/classifier/SubGradientSVM_15_1en05_1_05_False.m | ||
../data/classifier/SubGradientSVM_023_1en05_1_05_False.m | ||
../data/classifier/SubGradientSVM_30_1en05_1_05_False.m | ||
../data/kernel/Poly_1_0_10_3_6_01_False_False_CUBE_1_FK.m | ||
../data/kernel/Poly_1_0_10_3_6_01_False_False_CUBE_1_TOP.m | ||
distribution/HMM_1en10_60_4_1_0_6_3_False_CUBE.m | ||
classifier/SVMSGD_0017_1en05_1_True.m | ||
classifier/SVMSGD_023_1en05_1_True.m | ||
classifier/SVMSGD_15_1en05_1_True.m | ||
classifier/SVMSGD_30_1en05_16_True.m | ||
classifier/SVMSGD_30_1en05_1_True.m | ||
classifier/SubGradientSVM_0017_1en05_1_05_False.m | ||
classifier/SubGradientSVM_15_1en05_1_05_False.m | ||
classifier/SubGradientSVM_023_1en05_1_05_False.m | ||
classifier/SubGradientSVM_30_1en05_1_05_False.m | ||
kernel/Poly_1_0_10_3_6_01_False_False_CUBE_1_FK.m | ||
kernel/Poly_1_0_10_3_6_01_False_False_CUBE_1_TOP.m |
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,17 @@ | ||
INCLUDE(PythonEnvironment) | ||
GET_PYTHON_ENV() | ||
|
||
FOREACH(TEST_SRC ${INTEGRATION_TESTS}) | ||
STRING(REGEX REPLACE ".*/(.*).m" "\\1" TEST_NAME ${TEST_SRC}) | ||
add_test(NAME integration-python_modular-${TEST_NAME} | ||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} | ||
COMMAND ${PYTHON_EXECUTABLE} test_one.py ${TEST_SRC}) | ||
set_property(TEST integration-python_modular-${TEST_NAME} PROPERTY | ||
ENVIRONMENT "${PYTHON_ENV_VARS}") | ||
ENDFOREACH() | ||
|
||
add_test(NAME integration-python_modular-tester | ||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} | ||
COMMAND ${PYTHON_EXECUTABLE} tester.py) | ||
set_property(TEST integration-python_modular-tester PROPERTY | ||
ENVIRONMENT "${PYTHON_ENV_VARS}") |