Skip to content

Commit

Permalink
Merge pull request #846 from KrisThielemans/reenable_some_CIL_tests
Browse files Browse the repository at this point in the history
re-enable some CIL tests depending on SIRF allocate()
  • Loading branch information
KrisThielemans authored Mar 1, 2024
2 parents ec4ef96 + 1fdf1ab commit 6cc8a2c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
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

0 comments on commit 6cc8a2c

Please sign in to comment.