Skip to content

Commit fee34e2

Browse files
committed
STYLE: Consolidate BigIO test scheduling-property blocks
Consolidate scattered set_tests_properties / set_property calls for BigIO large-image tests into unified blocks per test group. ImageBase: merge three separate RESOURCE_LOCK MEMORY_SIZE blocks into one set_tests_properties covering all three tests; add BigIO/RUNS_LONG labels for CTest filtering. TIFF: consolidate four separate set_property(... APPEND ... RUN_SERIAL) calls (one per test) into the existing set_tests_properties blocks. No behavioral change — RUN_SERIAL was already set for all four tests. Meta: consolidate test4's separate set_property(... RUN_SERIAL) into its set_tests_properties block. No behavioral change for test4. Tests 1-3 retain MEMORY_SIZE-only serialization (no RUN_SERIAL added because the MEMORY_SIZE resource lock already serializes memory- intensive tests while permitting non-memory tests to run concurrently, which matters for nightly valgrind/coverage builds).
1 parent fe35b68 commit fee34e2

File tree

3 files changed

+37
-56
lines changed

3 files changed

+37
-56
lines changed

Modules/IO/ImageBase/test/CMakeLists.txt

Lines changed: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -52,12 +52,6 @@ if("${ITK_COMPUTER_MEMORY_SIZE}" GREATER 16)
5252
${ITK_TEST_OUTPUT_DIR}/itkLargeImageWriteConvertReadTest.mha
5353
30000L
5454
)
55-
set_tests_properties(
56-
itkLargeImageWriteConvertReadTest
57-
PROPERTIES
58-
RESOURCE_LOCK
59-
MEMORY_SIZE
60-
)
6155

6256
itk_add_test(
6357
NAME itkLargeImageWriteReadTest_2D
@@ -67,12 +61,6 @@ if("${ITK_COMPUTER_MEMORY_SIZE}" GREATER 16)
6761
${ITK_TEST_OUTPUT_DIR}/itkLargeImageWriteReadTest_2D.mha
6862
30000L
6963
)
70-
set_tests_properties(
71-
itkLargeImageWriteReadTest_2D
72-
PROPERTIES
73-
RESOURCE_LOCK
74-
MEMORY_SIZE
75-
)
7664

7765
itk_add_test(
7866
NAME itkLargeImageWriteReadTest_3D
@@ -83,11 +71,28 @@ if("${ITK_COMPUTER_MEMORY_SIZE}" GREATER 16)
8371
30000L
8472
4L
8573
)
74+
75+
# BigIO tests produce multi-gigabyte files; MEMORY_SIZE lock serializes them
8676
set_tests_properties(
77+
itkLargeImageWriteConvertReadTest
78+
itkLargeImageWriteReadTest_2D
8779
itkLargeImageWriteReadTest_3D
8880
PROPERTIES
8981
RESOURCE_LOCK
9082
MEMORY_SIZE
83+
LABELS
84+
"BigIO;RUNS_LONG"
85+
)
86+
87+
# Clean up BigIO output files after successful completion
88+
itk_add_bigio_test_cleanup(
89+
itkLargeImageWriteConvertReadTest ${ITK_TEST_OUTPUT_DIR}/itkLargeImageWriteConvertReadTest.mha
90+
)
91+
itk_add_bigio_test_cleanup(
92+
itkLargeImageWriteReadTest_2D ${ITK_TEST_OUTPUT_DIR}/itkLargeImageWriteReadTest_2D.mha
93+
)
94+
itk_add_bigio_test_cleanup(
95+
itkLargeImageWriteReadTest_3D ${ITK_TEST_OUTPUT_DIR}/itkLargeImageWriteReadTest_3D.mha
9196
)
9297
endif()
9398

Modules/IO/Meta/test/CMakeLists.txt

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -482,7 +482,7 @@ if("${ITK_COMPUTER_MEMORY_SIZE}" GREATER 5)
482482
50000L
483483
)
484484

485-
# Due to the large memory requirements this tests must be run one by one
485+
# Due to the large memory requirements these tests must be run one by one
486486
set_tests_properties(
487487
itkLargeMetaImageWriteReadTest1
488488
itkLargeMetaImageWriteReadTest2
@@ -519,6 +519,10 @@ if("${ITK_COMPUTER_MEMORY_SIZE}" GREATER 5)
519519
LABELS
520520
RUNS_LONG
521521
)
522+
# Clean up BigIO output files after successful completion
523+
itk_add_bigio_test_cleanup(itkLargeMetaImageWriteReadTest1 ${ITK_TEST_OUTPUT_DIR}/LargeImage01.mhd)
524+
itk_add_bigio_test_cleanup(itkLargeMetaImageWriteReadTest2 ${ITK_TEST_OUTPUT_DIR}/LargeImage02.mhd)
525+
itk_add_bigio_test_cleanup(itkLargeMetaImageWriteReadTest3 ${ITK_TEST_OUTPUT_DIR}/LargeImage03.mhd)
522526
endif()
523527

524528
if("${ITK_COMPUTER_MEMORY_SIZE}" GREATER 12)
@@ -532,7 +536,7 @@ if("${ITK_COMPUTER_MEMORY_SIZE}" GREATER 12)
532536
70000L
533537
)
534538

535-
# Due to the large memory requirements this tests must be run one by one
539+
# Due to the large memory requirements this test must be run serially
536540
set_tests_properties(
537541
itkLargeMetaImageWriteReadTest4
538542
PROPERTIES
@@ -542,6 +546,8 @@ if("${ITK_COMPUTER_MEMORY_SIZE}" GREATER 12)
542546
MEMORY_SIZE
543547
COST
544548
30
549+
RUN_SERIAL
550+
True
545551
)
546552
set_property(
547553
TEST
@@ -551,12 +557,5 @@ if("${ITK_COMPUTER_MEMORY_SIZE}" GREATER 12)
551557
LABELS
552558
RUNS_LONG
553559
)
554-
set_property(
555-
TEST
556-
itkLargeMetaImageWriteReadTest4
557-
APPEND
558-
PROPERTY
559-
RUN_SERIAL
560-
True
561-
)
560+
itk_add_bigio_test_cleanup(itkLargeMetaImageWriteReadTest4 ${ITK_TEST_OUTPUT_DIR}/LargeImage04.mhd)
562561
endif()

Modules/IO/TIFF/test/CMakeLists.txt

Lines changed: 11 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -486,7 +486,7 @@ if("${ITK_COMPUTER_MEMORY_SIZE}" GREATER 5)
486486
50000L
487487
)
488488

489-
# Due to the large memory requirements this tests must be run one by one
489+
# Due to the large memory requirements these tests must be run one by one
490490
set_tests_properties(
491491
itkLargeTIFFImageWriteReadTest1
492492
itkLargeTIFFImageWriteReadTest2
@@ -496,6 +496,8 @@ if("${ITK_COMPUTER_MEMORY_SIZE}" GREATER 5)
496496
BigIO
497497
RESOURCE_LOCK
498498
MEMORY_SIZE
499+
RUN_SERIAL
500+
True
499501
)
500502
set_property(
501503
TEST
@@ -505,14 +507,6 @@ if("${ITK_COMPUTER_MEMORY_SIZE}" GREATER 5)
505507
LABELS
506508
RUNS_LONG
507509
)
508-
set_property(
509-
TEST
510-
itkLargeTIFFImageWriteReadTest1
511-
APPEND
512-
PROPERTY
513-
RUN_SERIAL
514-
True
515-
)
516510
set_property(
517511
TEST
518512
itkLargeTIFFImageWriteReadTest2
@@ -521,14 +515,6 @@ if("${ITK_COMPUTER_MEMORY_SIZE}" GREATER 5)
521515
LABELS
522516
RUNS_LONG
523517
)
524-
set_property(
525-
TEST
526-
itkLargeTIFFImageWriteReadTest2
527-
APPEND
528-
PROPERTY
529-
RUN_SERIAL
530-
True
531-
)
532518
set_property(
533519
TEST
534520
itkLargeTIFFImageWriteReadTest3
@@ -537,14 +523,10 @@ if("${ITK_COMPUTER_MEMORY_SIZE}" GREATER 5)
537523
LABELS
538524
RUNS_LONG
539525
)
540-
set_property(
541-
TEST
542-
itkLargeTIFFImageWriteReadTest3
543-
APPEND
544-
PROPERTY
545-
RUN_SERIAL
546-
True
547-
)
526+
# Clean up BigIO output files after successful completion
527+
itk_add_bigio_test_cleanup(itkLargeTIFFImageWriteReadTest1 ${ITK_TEST_OUTPUT_DIR}/LargeImage01.tif)
528+
itk_add_bigio_test_cleanup(itkLargeTIFFImageWriteReadTest2 ${ITK_TEST_OUTPUT_DIR}/LargeImage02.tif)
529+
itk_add_bigio_test_cleanup(itkLargeTIFFImageWriteReadTest3 ${ITK_TEST_OUTPUT_DIR}/LargeImage03.tif)
548530
endif()
549531

550532
if("${ITK_COMPUTER_MEMORY_SIZE}" GREATER 12)
@@ -558,7 +540,7 @@ if("${ITK_COMPUTER_MEMORY_SIZE}" GREATER 12)
558540
70000L
559541
)
560542

561-
# Due to the large memory requirements this tests must lock the memory size resource
543+
# Due to the large memory requirements this test must be run serially
562544
set_tests_properties(
563545
itkLargeTIFFImageWriteReadTest4
564546
PROPERTIES
@@ -568,6 +550,8 @@ if("${ITK_COMPUTER_MEMORY_SIZE}" GREATER 12)
568550
MEMORY_SIZE
569551
COST
570552
30
553+
RUN_SERIAL
554+
True
571555
)
572556
set_property(
573557
TEST
@@ -577,14 +561,7 @@ if("${ITK_COMPUTER_MEMORY_SIZE}" GREATER 12)
577561
LABELS
578562
RUNS_LONG
579563
)
580-
set_property(
581-
TEST
582-
itkLargeTIFFImageWriteReadTest4
583-
APPEND
584-
PROPERTY
585-
RUN_SERIAL
586-
True
587-
)
564+
itk_add_bigio_test_cleanup(itkLargeTIFFImageWriteReadTest4 ${ITK_TEST_OUTPUT_DIR}/LargeImage04.tif)
588565
endif()
589566

590567
# expand + RGB image

0 commit comments

Comments
 (0)