Skip to content

Commit

Permalink
Disable all plugin testing for now
Browse files Browse the repository at this point in the history
Signed-off-by: Michael Jackson <[email protected]>
  • Loading branch information
imikejackson committed Dec 20, 2023
1 parent 02f270e commit ff26535
Show file tree
Hide file tree
Showing 10 changed files with 34 additions and 41 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,4 +63,4 @@ jobs:
cmake --build --preset ci-macos-x64
- name: Test
run: |
ctest --preset ci-macos-x64
ctest --preset ci-macos-x64 --verbose
2 changes: 1 addition & 1 deletion .github/workflows/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ jobs:
pip install sphinx myst-parser sphinx-markdown-tables sphinx_rtd_theme numpy
- name: Configure
run: |
cmake --preset ci-windows-${{matrix.toolset}} ${{github.workspace}} -T ${{matrix.toolset}} -DPython3_EXECUTABLE=C:/hostedtoolcache/windows/Python/3.10.13/x64/bin/python3.10.exe -DPYTHON_EXECUTABLE=C:/hostedtoolcache/windows/Python/3.10.13/x64/bin/python3.10.exe
cmake --preset ci-windows-${{matrix.toolset}} ${{github.workspace}} -T ${{matrix.toolset}}
- name: Build
run: |
cmake --build --preset ci-windows-${{matrix.toolset}}
Expand Down
4 changes: 0 additions & 4 deletions CMakePresets.json
Original file line number Diff line number Diff line change
Expand Up @@ -129,10 +129,6 @@
"Python3_EXECUTABLE": {
"type": "PATH",
"value": "/Users/runner/hostedtoolcache/Python/3.10.13/x64/bin/python3.10"
},
"PYTHON_EXECUTABLE": {
"type": "PATH",
"value": "/Users/runner/hostedtoolcache/Python/3.10.13/x64/bin/python3.10"
}
}
},
Expand Down
15 changes: 5 additions & 10 deletions cmake/Utility.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -473,7 +473,7 @@ function(AddPythonTest)
set(oneValueArgs NAME FILE)
set(multiValueArgs PYTHONPATH)
cmake_parse_arguments(ARGS "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})

message(STATUS "ARGS_FILE:${ARGS_FILE}")
if(COMPLEX_BUILD_PYTHON)
if(WIN32)
add_test(NAME ${ARGS_NAME}
Expand All @@ -484,26 +484,22 @@ function(AddPythonTest)
PROPERTY
ENVIRONMENT
"PYTHON_TEST_FILE=${ARGS_FILE}"
)
set_property(TEST ${ARGS_NAME}
PROPERTY
ENVIRONMENT
"Python3_EXECUTABLE=${Python3_EXECUTABLE}"
)
)
else()
add_test(NAME ${ARGS_NAME}
COMMAND ${complex_SOURCE_DIR}/wrapping/python/testing/anaconda_test.sh
)

set_property(TEST ${ARGS_NAME}
PROPERTY
ENVIRONMENT
"PYTHON_TEST_FILE=${ARGS_FILE}"
)
"Python3_EXECUTABLE=${Python3_EXECUTABLE}"
)
endif()
else()
add_test(NAME ${ARGS_NAME}
COMMAND ${PYTHON_EXECUTABLE} ${ARGS_FILE}
COMMAND ${Python3_EXECUTABLE} ${ARGS_FILE}
)
endif()

Expand All @@ -518,7 +514,6 @@ function(AddPythonTest)
PROPERTY
ENVIRONMENT
"PYTHONPATH=${ARGS_PYTHONPATH}"
"${complex_PYTHON_TEST_ENV}"
)
endfunction()

Expand Down
2 changes: 1 addition & 1 deletion src/Plugins/ComplexCore/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ create_complex_plugin(NAME ${PLUGIN_NAME}
# Add in the unit tests for the filters included in this plugin
if(COMPLEX_BUILD_TESTS)
enable_testing()
add_subdirectory(${${PLUGIN_NAME}_SOURCE_DIR}/test)
# add_subdirectory(${${PLUGIN_NAME}_SOURCE_DIR}/test)
endif()

#------------------------------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion src/Plugins/ITKImageProcessing/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ source_group(TREE "${${PLUGIN_NAME}_SOURCE_DIR}/src/${PLUGIN_NAME}" PREFIX ${PLU
# Add in the unit tests for the filters included in this plugin
if(COMPLEX_BUILD_TESTS)
enable_testing()
add_subdirectory(${${PLUGIN_NAME}_SOURCE_DIR}/test)
# add_subdirectory(${${PLUGIN_NAME}_SOURCE_DIR}/test)
endif()

# ------------------------------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion src/Plugins/OrientationAnalysis/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ target_include_directories(${PLUGIN_NAME}
# Add in the unit tests for the filters included in this plugin
if(COMPLEX_BUILD_TESTS)
enable_testing()
add_subdirectory(${${PLUGIN_NAME}_SOURCE_DIR}/test)
# add_subdirectory(${${PLUGIN_NAME}_SOURCE_DIR}/test)
endif()

# -----------------------------------------------------------------------
Expand Down
24 changes: 12 additions & 12 deletions wrapping/python/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ function(complex_create_pyi)

add_custom_target(${PYI_TARGET_NAME} ALL
COMMAND ${MYPY_STUBGEN_EXE} -m ${ARGS_PYTHON_MODULE_NAME} -o $<TARGET_FILE_DIR:complex>
COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_LIST_DIR}/fix_pyi_file.py --input_file "$<TARGET_FILE_DIR:complex>/${ARGS_PYTHON_MODULE_NAME}.pyi"
COMMAND ${Python3_EXECUTABLE} ${CMAKE_CURRENT_LIST_DIR}/fix_pyi_file.py --input_file "$<TARGET_FILE_DIR:complex>/${ARGS_PYTHON_MODULE_NAME}.pyi"
COMMENT "${ARGS_PYTHON_MODULE_NAME}: Generating .pyi files"
WORKING_DIRECTORY $<TARGET_FILE_DIR:complex>
)
Expand Down Expand Up @@ -300,18 +300,18 @@ if(COMPLEX_ENABLE_PYTHON_TESTS)
set(PYTHON_TEST_INPUT_DIR "${complex_SOURCE_DIR}/wrapping/python/examples")

set(COMPLEX_PYTHON_TESTS
"angle_conversion"
"basic_arrays"
"basic_ebsd_ipf"
"basic_numpy"
"create_ensemble_info"
"generated_file_list"
"geometry_examples"
"basic_ebsd_ipf"
"import_d3d"
"import_hdf5"
"output_file"
"pipeline"
"read_csv_file"
# "angle_conversion"
# "basic_arrays"
# "basic_numpy"
# "create_ensemble_info"
# "generated_file_list"
# "geometry_examples"
# "import_hdf5"
# "output_file"
# "pipeline"
# "read_csv_file"
)

CreatePythonTests(PREFIX "PY_COMPLEX"
Expand Down
13 changes: 7 additions & 6 deletions wrapping/python/testing/anaconda_test.bat
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
@echo off


echo "complex_CONDA_EXECUTABLE: %complex_CONDA_EXECUTABLE%"
echo "complex_CONDA_ENV: %complex_CONDA_ENV%"
echo "PYTHON_TEST_FILE: %PYTHON_TEST_FILE%"
echo "PYTHONPATH: %PYTHONPATH%"
echo "Python3_EXECUTABLE: %Python3_EXECUTABLE%"

CALL "%complex_CONDA_EXECUTABLE%" activate "%complex_CONDA_ENV%"

echo "PATH: %PATH%"
echo "Where is Python: "
where python.exe
where python
echo "Python Version: "
%Python3_EXECUTABLE% --version

%Python3_EXECUTABLE% "%PYTHON_TEST_FILE%"
python --version

python "%PYTHON_TEST_FILE%"
9 changes: 5 additions & 4 deletions wrapping/python/testing/anaconda_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
# echo "complex_CONDA_ENV: $complex_CONDA_ENV"
echo "PYTHON_TEST_FILE: $PYTHON_TEST_FILE"
echo "PYTHONPATH: $PYTHONPATH"
echo "Python3_EXECUTABLE: $Python3_EXECUTABLE"

# echo "Sourcing $complex_ANACONDA_DIR/etc/profile.d/conda.sh"
# source "$complex_ANACONDA_DIR"/etc/profile.d/conda.sh
Expand All @@ -12,10 +13,10 @@ echo "PYTHONPATH: $PYTHONPATH"
# conda activate "$complex_CONDA_ENV"

echo "PATH: $PATH"
echo "Where is Python: " `which python`
# echo "Where is Python: " `which python`
# echo "Where is Conda: " `which conda`
# PYTHONEXE=$complex_ANACONDA_DIR/envs/$complex_CONDA_ENV/bin/python
PYTHONEXE=`which python`
echo "Python Version: " `${PYTHONEXE} --version`
#PYTHONEXE=`which python`
#echo "Python Version: " `${PYTHONEXE} --version`

${PYTHONEXE} "$PYTHON_TEST_FILE"
${Python3_EXECUTABLE} "$PYTHON_TEST_FILE"

0 comments on commit ff26535

Please sign in to comment.