Skip to content

Commit 74ab726

Browse files
committed
test: Run Cinema 4D 2026 integ tests on GPU.
Signed-off-by: Karthik Bekal Pattathana <133984042+karthikbekalp@users.noreply.github.com>
1 parent f0bbea6 commit 74ab726

3 files changed

Lines changed: 53 additions & 46 deletions

File tree

.github/workflows/integ_windows.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jobs:
3030
(github.ref == 'refs/heads/mainline' ||
3131
github.ref == 'refs/heads/feature/ci-tests')
3232
name: Integration Tests (Windows, Cinema 4D ${{ inputs.c4d_version }})
33-
runs-on: windows-latest
33+
runs-on: ${{ inputs.c4d_version == '2026' && 'aws-deadline_windows-2025_gpu-t4-4-core' || 'windows-latest' }}
3434
timeout-minutes: 60
3535
permissions:
3636
id-token: write

test/integ/submitter_ui.py

Lines changed: 44 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,10 @@ def _take_selection(element: xa11y.Element) -> str:
174174
return ""
175175

176176

177+
def _take_selection_matches(element: xa11y.Element | None, *, selection: str) -> bool:
178+
return element is not None and _take_selection(element) == selection
179+
180+
177181
def _take_combo_index(elements: list[xa11y.Element]) -> int:
178182
"""Return the one-based index of the visible Takes combo box."""
179183
visible = [
@@ -222,18 +226,49 @@ def _activate_take_option(option: xa11y.Locator, selection: str) -> None:
222226
xa11y.input_sim().click(option_element)
223227

224228

225-
def _wait_for_take_selection(combo: xa11y.Locator, selection: str) -> None:
226-
"""Confirm a highlighted Qt combo row when activation did not commit it."""
229+
def _open_take_combo(combo: xa11y.Locator) -> None:
230+
combo_actions = set(combo.element().actions)
231+
if "show_menu" in combo_actions:
232+
combo.show_menu()
233+
elif "expand" in combo_actions:
234+
combo.expand()
235+
else:
236+
combo.press()
237+
238+
239+
def _take_option(combo: xa11y.Locator, selection: str) -> xa11y.Locator:
240+
option_selector = (
241+
f"list_item[name='{selection}'], "
242+
f"table_row[name='{selection}'], "
243+
f"static_text[name='{selection}']"
244+
)
245+
option = combo.descendant(option_selector).first()
246+
try:
247+
option.wait_visible(timeout=3.0)
248+
except xa11y.TimeoutError:
249+
pid = combo.element().pid
250+
if pid is None:
251+
raise AssertionError("Take combo does not expose its application PID") from None
252+
option = xa11y.App.by_pid(pid).locator(option_selector).first()
253+
option.wait_visible(timeout=10.0)
254+
return option
227255

228-
def is_selected(element):
229-
return element is not None and _take_selection(element) == selection
230256

257+
def _wait_for_take_selection(combo: xa11y.Locator, selection: str) -> None:
258+
"""Confirm a highlighted Qt combo row when activation did not commit it."""
231259
try:
232-
combo.wait_until(is_selected, timeout=1.0)
260+
combo.wait_until(
261+
partial(_take_selection_matches, selection=selection),
262+
timeout=1.0,
263+
)
233264
return
234265
except xa11y.TimeoutError:
235-
xa11y.input_sim().press("Enter")
236-
combo.wait_until(is_selected, timeout=10.0)
266+
pass
267+
xa11y.input_sim().press("Enter")
268+
combo.wait_until(
269+
partial(_take_selection_matches, selection=selection),
270+
timeout=10.0,
271+
)
237272

238273

239274
def _job_specific_text_field(dialog: xa11y.Locator, nth: int) -> xa11y.Locator:
@@ -343,28 +378,9 @@ def select_takes(dialog: xa11y.Locator, selection: str) -> None:
343378
if current == selection:
344379
return
345380

346-
combo_actions = set(combo.element().actions)
347-
if "show_menu" in combo_actions:
348-
combo.show_menu()
349-
elif "expand" in combo_actions:
350-
combo.expand()
351-
else:
352-
combo.press()
381+
_open_take_combo(combo)
353382

354-
option_selector = (
355-
f"list_item[name='{selection}'], "
356-
f"table_row[name='{selection}'], "
357-
f"static_text[name='{selection}']"
358-
)
359-
option = combo.descendant(option_selector).first()
360-
try:
361-
option.wait_visible(timeout=3.0)
362-
except xa11y.TimeoutError:
363-
pid = combo.element().pid
364-
if pid is None:
365-
raise AssertionError("Take combo does not expose its application PID") from None
366-
option = xa11y.App.by_pid(pid).locator(option_selector).first()
367-
option.wait_visible(timeout=10.0)
383+
option = _take_option(combo, selection)
368384

369385
_activate_take_option(option, selection)
370386
_wait_for_take_selection(combo, selection)

test/integ/test_cinema4d.py

Lines changed: 8 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -631,23 +631,14 @@ def _run_integ_case(
631631
rmtree(actual_dir, ignore_errors=True)
632632

633633

634-
# Keep the Redshift cases running in Windows CI, but do not block the workflow
635-
# on their intermittent render failures. All Redshift cases are affected in
636-
# Cinema 4D 2024 and 2025; the textured case is also affected in Cinema 4D 2026.
637-
# This is a Cinema 4D issue and we have a ticket with Maxon to add a fix.
638-
_XFAIL_REDSHIFT_2024_2025_IN_CI = pytest.mark.xfail(
634+
# Reliable Redshift rendering requires a GPU. Unlike standard runners, GPU
635+
# runners are billed, so Windows CI runs Redshift only for the latest supported
636+
# Cinema 4D version, 2026, and skips the 2024 and 2025 cases.
637+
_SKIP_REDSHIFT_2024_2025_IN_CI = pytest.mark.skipif(
639638
sys.platform == "win32"
640639
and os.environ.get("CI") == "true"
641640
and os.environ.get("C4D_VERSION") in {"2024", "2025"},
642-
reason="Redshift rendering can fail with Cinema 4D 2024 and 2025",
643-
strict=False,
644-
)
645-
_XFAIL_REDSHIFT_TEXTURED_IN_CI = pytest.mark.xfail(
646-
sys.platform == "win32"
647-
and os.environ.get("CI") == "true"
648-
and os.environ.get("C4D_VERSION") in {"2024", "2025", "2026"},
649-
reason="Redshift textured rendering can fail with Cinema 4D 2024, 2025, and 2026",
650-
strict=False,
641+
reason="Redshift requires a billed GPU runner, so CI runs it only for the latest Cinema 4D version (2026)",
651642
)
652643
_SKIP_OCIO_2024 = pytest.mark.skipif(
653644
os.environ.get("C4D_VERSION", "2026") == "2024",
@@ -683,9 +674,9 @@ def _run_integ_case(
683674
"physical_multi_takes",
684675
"physical_tiles_multi_takes",
685676
"phy_apos_path",
686-
pytest.param("redshift", marks=_XFAIL_REDSHIFT_2024_2025_IN_CI),
687-
pytest.param("redshift_textured", marks=_XFAIL_REDSHIFT_TEXTURED_IN_CI),
688-
pytest.param("redshift_tiles", marks=_XFAIL_REDSHIFT_2024_2025_IN_CI),
677+
pytest.param("redshift", marks=_SKIP_REDSHIFT_2024_2025_IN_CI),
678+
pytest.param("redshift_textured", marks=_SKIP_REDSHIFT_2024_2025_IN_CI),
679+
pytest.param("redshift_tiles", marks=_SKIP_REDSHIFT_2024_2025_IN_CI),
689680
]
690681

691682
_TAKE_SELECTIONS = [

0 commit comments

Comments
 (0)