Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

re-enable some CIL tests depending on SIRF allocate() #846

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions .github/workflows/test_cil.sh
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
#!/usr/bin/env bash
[ -f .bashrc ] && . .bashrc
[ -f .bashrc ] && . .bashrc # sets paths to gadgetron & python
set -euxo pipefail

mkdir cil_sirf_test
touch cil_sirf_test/__init__.py
DEFAULT_CIL_TAG=$(/opt/conda/bin/python -c 'import cil; print(f"v{cil.version.version}" if cil.version.commit_hash == "-1" else cil.version.commit_hash[1:])' | tail -n1)
DEFAULT_CIL_TAG=$(python -c 'import cil; print(f"v{cil.version.version}" if cil.version.commit_hash == "-1" else cil.version.commit_hash[1:])' | tail -n1)
DEFAULT_CIL_TAG=master # TODO: revert after CIL 24.0.0 release https://github.com/TomographicImaging/CIL/issues/1732
for fname in test_SIRF.py utils.py testclass.py; do
curl -fsSL https://raw.githubusercontent.com/TomographicImaging/CIL/$DEFAULT_CIL_TAG/Wrappers/Python/test/$fname > cil_sirf_test/$fname
done

$SIRF_PATH/../../INSTALL/bin/gadgetron >& ~/gadgetron.log&
/opt/conda/bin/python -m unittest discover -v ./cil_sirf_test -k GradientPET -k BlockDataContainer
gadgetron >& ~/gadgetron.log&
python -m unittest discover -v ./cil_sirf_test
ret=$?
for i in $(jobs -p); do kill -n 15 $i || : ; done 2>/dev/null # kill gadgetron
exit $ret
2 changes: 1 addition & 1 deletion SuperBuild/External_CIL.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ if(NOT ( DEFINED "USE_SYSTEM_${externalProjName}" AND "${USE_SYSTEM_${externalPr
COMMAND ${PYTHON_EXECUTABLE} -m unittest discover -p test_run_*.py
WORKING_DIRECTORY ${${proj}_SOURCE_DIR}/Wrappers/Python/test)
add_test(NAME CIL_SIRF_TESTS
COMMAND ${PYTHON_EXECUTABLE} -m unittest discover -p test_SIRF*.py -k GradientPET -k BlockDataContainer
COMMAND ${PYTHON_EXECUTABLE} -m unittest discover -p test_SIRF*.py
WORKING_DIRECTORY ${${proj}_SOURCE_DIR}/Wrappers/Python/test)
add_test(NAME CIL_FRAMEWORK_TESTS_4
COMMAND ${PYTHON_EXECUTABLE} -m unittest discover -p test_Block_*.py
Expand Down
Loading