Commit 519bb41
ENH: Auto-cleanup BigIO test outputs and enforce serial execution
Add ITK_REMOVE_BIGIO_FILES_ON_SUCCESS (advanced, default ON) that
automatically removes multi-gigabyte BigIO test output files after
test completion using CTest fixtures. Files are removed after the
test finishes regardless of pass or fail — set the option OFF to
always retain output files for debugging.
NOTE: FIXTURES_CLEANUP tests run unconditionally per CMake semantics:
"Cleanup tests will execute even if setup or regular tests for that
fixture fail or are skipped." The option name reflects the historical
intent; the description clarifies the actual runtime behavior.
Additionally ensure all BigIO tests (>1 GB output) run serially via
RUN_SERIAL to prevent concurrent disk exhaustion.
New CMake function itk_add_bigio_test_cleanup() uses CTest FIXTURES
to wire up SETUP (main test) and CLEANUP (file removal) phases.
For .mhd files, companion .raw/.zraw files are also removed.
The companion cleanup test is named <test_name>_cleanup; to include
it in filtered reruns omit strict anchors (ctest -R <test_name>
rather than ctest -R "^<test_name>$").
Affected modules:
- IO/Meta: LargeMetaImageWriteReadTest 1-4 (.mhd + .raw)
- IO/TIFF: LargeTIFFImageWriteReadTest 1-4 (.tif)
- IO/ImageBase: LargeImageWriteReadTest 2D/3D, WriteConvertRead (.mha)
These 11 tests produce up to 47 GB of temporary files total.
Without cleanup, they can exhaust disk space on CI runners
(GitHub Actions ubuntu-22.04 has 146 GB total).
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>1 parent b94cca5 commit 519bb41
File tree
4 files changed
+117
-56
lines changed- CMake
- Modules/IO
- ImageBase/test
- Meta/test
- TIFF/test
4 files changed
+117
-56
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
337 | 337 | | |
338 | 338 | | |
339 | 339 | | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
55 | | - | |
56 | | - | |
57 | | - | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | 55 | | |
62 | 56 | | |
63 | 57 | | |
| |||
67 | 61 | | |
68 | 62 | | |
69 | 63 | | |
70 | | - | |
71 | | - | |
72 | | - | |
73 | | - | |
74 | | - | |
75 | | - | |
76 | 64 | | |
77 | 65 | | |
78 | 66 | | |
| |||
83 | 71 | | |
84 | 72 | | |
85 | 73 | | |
| 74 | + | |
| 75 | + | |
86 | 76 | | |
| 77 | + | |
| 78 | + | |
87 | 79 | | |
88 | 80 | | |
89 | 81 | | |
90 | 82 | | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
91 | 98 | | |
92 | 99 | | |
93 | 100 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
482 | 482 | | |
483 | 483 | | |
484 | 484 | | |
485 | | - | |
| 485 | + | |
486 | 486 | | |
487 | 487 | | |
488 | 488 | | |
| |||
494 | 494 | | |
495 | 495 | | |
496 | 496 | | |
| 497 | + | |
| 498 | + | |
497 | 499 | | |
498 | 500 | | |
499 | 501 | | |
| |||
519 | 521 | | |
520 | 522 | | |
521 | 523 | | |
| 524 | + | |
| 525 | + | |
| 526 | + | |
| 527 | + | |
522 | 528 | | |
523 | 529 | | |
524 | 530 | | |
| |||
532 | 538 | | |
533 | 539 | | |
534 | 540 | | |
535 | | - | |
| 541 | + | |
536 | 542 | | |
537 | 543 | | |
538 | 544 | | |
| |||
542 | 548 | | |
543 | 549 | | |
544 | 550 | | |
| 551 | + | |
| 552 | + | |
545 | 553 | | |
546 | 554 | | |
547 | 555 | | |
| |||
551 | 559 | | |
552 | 560 | | |
553 | 561 | | |
554 | | - | |
555 | | - | |
556 | | - | |
557 | | - | |
558 | | - | |
559 | | - | |
560 | | - | |
561 | | - | |
| 562 | + | |
562 | 563 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
486 | 486 | | |
487 | 487 | | |
488 | 488 | | |
489 | | - | |
| 489 | + | |
490 | 490 | | |
491 | 491 | | |
492 | 492 | | |
| |||
496 | 496 | | |
497 | 497 | | |
498 | 498 | | |
| 499 | + | |
| 500 | + | |
499 | 501 | | |
500 | 502 | | |
501 | 503 | | |
| |||
505 | 507 | | |
506 | 508 | | |
507 | 509 | | |
508 | | - | |
509 | | - | |
510 | | - | |
511 | | - | |
512 | | - | |
513 | | - | |
514 | | - | |
515 | | - | |
516 | 510 | | |
517 | 511 | | |
518 | 512 | | |
| |||
521 | 515 | | |
522 | 516 | | |
523 | 517 | | |
524 | | - | |
525 | | - | |
526 | | - | |
527 | | - | |
528 | | - | |
529 | | - | |
530 | | - | |
531 | | - | |
532 | 518 | | |
533 | 519 | | |
534 | 520 | | |
| |||
537 | 523 | | |
538 | 524 | | |
539 | 525 | | |
540 | | - | |
541 | | - | |
542 | | - | |
543 | | - | |
544 | | - | |
545 | | - | |
546 | | - | |
547 | | - | |
| 526 | + | |
| 527 | + | |
| 528 | + | |
| 529 | + | |
548 | 530 | | |
549 | 531 | | |
550 | 532 | | |
| |||
558 | 540 | | |
559 | 541 | | |
560 | 542 | | |
561 | | - | |
| 543 | + | |
562 | 544 | | |
563 | 545 | | |
564 | 546 | | |
| |||
568 | 550 | | |
569 | 551 | | |
570 | 552 | | |
| 553 | + | |
| 554 | + | |
571 | 555 | | |
572 | 556 | | |
573 | 557 | | |
| |||
577 | 561 | | |
578 | 562 | | |
579 | 563 | | |
580 | | - | |
581 | | - | |
582 | | - | |
583 | | - | |
584 | | - | |
585 | | - | |
586 | | - | |
587 | | - | |
| 564 | + | |
588 | 565 | | |
589 | 566 | | |
590 | 567 | | |
| |||
0 commit comments