Skip to content

Commit

Permalink
BUG: Set test resource lock on all tests using "dcmqrscp" executable
Browse files Browse the repository at this point in the history
This will prevent the following test from all running in parallel with
a `dcmqrscp` executable configured to listen on the same port.

Tests either using "dcmqrscp" executable directly or through the
`ctkDICOMTester` helper class:

* ctkDICOMApplicationTest1
* ctkDICOMQueryTest2
* ctkDICOMRetrieveTest2
* ctkDICOMTesterTest1
* ctkDICOMTesterTest2
  • Loading branch information
jcfr committed Jan 18, 2024
1 parent 791803c commit 0ae6d19
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Applications/Testing/Cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -66,4 +66,7 @@ if(CTK_APP_ctkDICOMQuery AND CTK_APP_ctkDICOMRetrieve)
)

set_property(TEST ${testname} PROPERTY ENVIRONMENT_MODIFICATION "${CTK_TEST_LAUNCH_BUILD_ENVIRONMENT_MODIFICATION}")

set_property(TEST ${testname} PROPERTY RESOURCE_LOCK "dcmqrscp")

endif()
4 changes: 4 additions & 0 deletions Libs/DICOM/Core/Testing/Cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -59,13 +59,15 @@ SIMPLE_TEST( ctkDICOMQueryTest2
${CTKData_DIR}/Data/DICOM/MRHEAD/000055.IMA
${CTKData_DIR}/Data/DICOM/MRHEAD/000056.IMA
)
set_property(TEST "ctkDICOMQueryTest2" PROPERTY RESOURCE_LOCK "dcmqrscp")

# ctkDICOMRetrieve
SIMPLE_TEST( ctkDICOMRetrieveTest1)
SIMPLE_TEST( ctkDICOMRetrieveTest2
${CTKData_DIR}/Data/DICOM/MRHEAD/000055.IMA
${CTKData_DIR}/Data/DICOM/MRHEAD/000056.IMA
)
set_property(TEST "ctkDICOMRetrieveTest2" PROPERTY RESOURCE_LOCK "dcmqrscp")

# ctkDICOMCore
SIMPLE_TEST( ctkDICOMCoreTest1
Expand All @@ -75,7 +77,9 @@ SIMPLE_TEST( ctkDICOMCoreTest1

# ctkDICOMTester
SIMPLE_TEST( ctkDICOMTesterTest1 )
set_property(TEST "ctkDICOMTesterTest1" PROPERTY RESOURCE_LOCK "dcmqrscp")
SIMPLE_TEST( ctkDICOMTesterTest2
${CTKData_DIR}/Data/DICOM/MRHEAD/000055.IMA
${CTKData_DIR}/Data/DICOM/MRHEAD/000056.IMA
)
set_property(TEST "ctkDICOMTesterTest2" PROPERTY RESOURCE_LOCK "dcmqrscp")

0 comments on commit 0ae6d19

Please sign in to comment.