Repository navigation
Commit dbb33b6
test(helpers): keep the EGL device probe from importing pyglet.gl (#3027)
* test(helpers): keep the EGL device probe from importing pyglet.gl
select_headless_egl_device_for_cuda runs before the graphics tests set
pyglet.options["headless_device"]. Importing pyglet.gl there creates
pyglet's shadow window, which in headless mode opens the EGL display on
device 0 and caches it, so the later headless_device assignment has no
effect and the GL context lands on EGL device 0 again (#2864).
Match MissingFunctionException by module and name instead, as
is_gl_context_unavailable already does, and add a subprocess test that
asserts the probe leaves pyglet.gl unimported.
Follow-up to #3020.
Co-Authored-By: Claude Fable 5.1 <[email protected]>
* test(graphics): hand the probe child the test-helpers package path
CI does not install cuda_python_test_helpers; the parent imports it only
through the conftest sys.path fallback, which the -c child does not
inherit, so test_egl_device_probe_does_not_import_pyglet_gl failed in
every Linux row with ModuleNotFoundError. The child now gets a PYTHONPATH
that names the parent directory of the package the parent imported, and
a failure reports the child's stderr.
Co-Authored-By: Claude Fable 5.1 <[email protected]>
---------
Co-authored-by: Claude Fable 5.1 <[email protected]>1 parent 8c66b43 commit dbb33b6
2 files changed
Lines changed: 61 additions & 6 deletions
File tree
- cuda_core/tests
- cuda_python_test_helpers/cuda_python_test_helpers
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
| 11 | + | |
10 | 12 | | |
| 13 | + | |
11 | 14 | | |
12 | 15 | | |
13 | 16 | | |
| |||
18 | 21 | | |
19 | 22 | | |
20 | 23 | | |
| 24 | + | |
21 | 25 | | |
22 | 26 | | |
23 | 27 | | |
| |||
71 | 75 | | |
72 | 76 | | |
73 | 77 | | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
74 | 111 | | |
75 | 112 | | |
76 | 113 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
16 | 20 | | |
17 | 21 | | |
18 | 22 | | |
19 | 23 | | |
20 | 24 | | |
21 | 25 | | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
22 | 36 | | |
23 | 37 | | |
24 | 38 | | |
| |||
39 | 53 | | |
40 | 54 | | |
41 | 55 | | |
42 | | - | |
43 | 56 | | |
44 | 57 | | |
45 | 58 | | |
| |||
50 | 63 | | |
51 | 64 | | |
52 | 65 | | |
53 | | - | |
54 | | - | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
55 | 71 | | |
56 | 72 | | |
57 | 73 | | |
| |||
66 | 82 | | |
67 | 83 | | |
68 | 84 | | |
69 | | - | |
70 | | - | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
71 | 89 | | |
72 | 90 | | |
73 | 91 | | |
| |||
0 commit comments