Commit 4b6571b
committed
Refactor renderer bootstrap and test utilities
Introduce centralized cleanup lambdas in imiv_app.cpp to simplify failure paths and unify renderer window/device cleanup. Factor OCIO texture blueprint construction in imiv_ocio.cpp into a reusable append_texture_blueprint helper. In Metal renderer (imiv_renderer_metal.mm) add a render_preview lambda to consolidate OCIO vs non-OCIO preview rendering and reduce duplicated calls.
Refactor multiple test/utility Python scripts to reuse a new imiv_test_utils module: move many common helpers (path discovery, env loading, command builders, timing/logging, program resolution, defaults) into imiv_test_utils and update imiv_backend_verify.py, imiv_ocio_config_source_regression.py, imiv_ocio_missing_fallback_regression.py, imiv_ux_actions_regression.py, and others to import and use those utilities. Replace ad-hoc subprocess/run helpers with shared run_timed_logged_process, run_capture_output, script_command, generic_smoke_runner_command, and standardized error handling via fail().
Overall this cleans up error/cleanup handling in C++ code and consolidates Python test tooling to reduce duplication and improve maintainability.
Signed-off-by: Vlad <shaamaan@gmail.com>1 parent c0a9461 commit 4b6571b
8 files changed
Lines changed: 469 additions & 705 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
429 | 429 | | |
430 | 430 | | |
431 | 431 | | |
432 | | - | |
433 | | - | |
434 | | - | |
435 | | - | |
436 | | - | |
437 | | - | |
| 432 | + | |
| 433 | + | |
438 | 434 | | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
439 | 441 | | |
440 | 442 | | |
441 | 443 | | |
442 | 444 | | |
443 | 445 | | |
| 446 | + | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
444 | 454 | | |
445 | 455 | | |
446 | 456 | | |
447 | | - | |
448 | | - | |
449 | | - | |
450 | | - | |
451 | | - | |
452 | | - | |
| 457 | + | |
453 | 458 | | |
454 | 459 | | |
455 | 460 | | |
456 | | - | |
457 | | - | |
458 | | - | |
459 | | - | |
460 | | - | |
461 | | - | |
462 | | - | |
| 461 | + | |
463 | 462 | | |
464 | 463 | | |
465 | 464 | | |
| |||
468 | 467 | | |
469 | 468 | | |
470 | 469 | | |
471 | | - | |
472 | | - | |
473 | | - | |
474 | | - | |
475 | | - | |
476 | | - | |
477 | | - | |
| 470 | + | |
478 | 471 | | |
479 | 472 | | |
480 | 473 | | |
| |||
494 | 487 | | |
495 | 488 | | |
496 | 489 | | |
497 | | - | |
498 | | - | |
499 | | - | |
500 | | - | |
501 | | - | |
502 | | - | |
503 | | - | |
504 | | - | |
| 490 | + | |
505 | 491 | | |
506 | 492 | | |
507 | 493 | | |
| |||
822 | 808 | | |
823 | 809 | | |
824 | 810 | | |
825 | | - | |
| 811 | + | |
826 | 812 | | |
827 | 813 | | |
828 | | - | |
| 814 | + | |
| 815 | + | |
| 816 | + | |
829 | 817 | | |
830 | 818 | | |
831 | 819 | | |
832 | 820 | | |
833 | 821 | | |
834 | 822 | | |
835 | 823 | | |
836 | | - | |
837 | | - | |
838 | | - | |
839 | | - | |
| 824 | + | |
| 825 | + | |
840 | 826 | | |
841 | 827 | | |
842 | 828 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
328 | 328 | | |
329 | 329 | | |
330 | 330 | | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
331 | 352 | | |
332 | 353 | | |
333 | 354 | | |
| |||
342 | 363 | | |
343 | 364 | | |
344 | 365 | | |
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 | | - | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
370 | 377 | | |
371 | 378 | | |
372 | 379 | | |
| |||
379 | 386 | | |
380 | 387 | | |
381 | 388 | | |
382 | | - | |
383 | | - | |
384 | | - | |
385 | | - | |
386 | | - | |
387 | | - | |
388 | | - | |
389 | | - | |
390 | | - | |
391 | | - | |
392 | | - | |
393 | | - | |
394 | | - | |
395 | | - | |
396 | | - | |
397 | | - | |
398 | | - | |
399 | | - | |
400 | | - | |
401 | | - | |
402 | | - | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
403 | 398 | | |
404 | 399 | | |
405 | 400 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1863 | 1863 | | |
1864 | 1864 | | |
1865 | 1865 | | |
1866 | | - | |
| 1866 | + | |
| 1867 | + | |
| 1868 | + | |
| 1869 | + | |
| 1870 | + | |
| 1871 | + | |
| 1872 | + | |
| 1873 | + | |
| 1874 | + | |
| 1875 | + | |
| 1876 | + | |
| 1877 | + | |
| 1878 | + | |
| 1879 | + | |
1867 | 1880 | | |
1868 | 1881 | | |
1869 | 1882 | | |
1870 | 1883 | | |
1871 | | - | |
1872 | | - | |
1873 | | - | |
1874 | | - | |
1875 | | - | |
1876 | | - | |
1877 | | - | |
1878 | | - | |
1879 | | - | |
1880 | | - | |
| 1884 | + | |
| 1885 | + | |
| 1886 | + | |
| 1887 | + | |
| 1888 | + | |
1881 | 1889 | | |
1882 | 1890 | | |
1883 | | - | |
| 1891 | + | |
1884 | 1892 | | |
1885 | 1893 | | |
1886 | | - | |
1887 | 1894 | | |
1888 | 1895 | | |
1889 | 1896 | | |
1890 | 1897 | | |
1891 | 1898 | | |
1892 | | - | |
1893 | | - | |
1894 | | - | |
1895 | | - | |
1896 | | - | |
1897 | | - | |
1898 | | - | |
1899 | | - | |
1900 | | - | |
| 1899 | + | |
| 1900 | + | |
| 1901 | + | |
| 1902 | + | |
| 1903 | + | |
1901 | 1904 | | |
1902 | 1905 | | |
1903 | 1906 | | |
| |||
0 commit comments