Commit c206d1f
committed
ci-scripts: fix same-named-addon-module shadowing; honour module-level SkipTest
Two real defects the fork CI run surfaced, both pre-existing (the original
runner failed identically) but newly hit by the post-merge addon set:
1. Same-name shadowing. The worker appends the addon's directory to sys.path
so its tests can import sibling modules by bare name (WebSearch's
'from models import …'). But most addons also ship <Addon>/<Addon>.py, and
once <Addon>/ is on sys.path that regular module wins the bare name over the
namespace-package directory — so loading the dotted test name
<Addon>.tests.test_x died with "module '<Addon>' has no attribute 'tests'".
11 real addons failed this way (CalculateEstimatedDates, WebSearch,
libaccess, …). Import the addon package from the repo root FIRST, pinning it
in sys.modules, before the addon dir joins sys.path; the dotted load then
resolves and the bare sibling imports still work. Reproduced and killed with
a synthetic same-named-module fixture.
2. A module-level 'raise SkipTest(...)' — an addon's own "needs a display /
PyGObject" guard — was classified as a code bug and failed the run. It is an
explicit opt-out and is now honoured as a skip on every platform, regardless
of declared-dep satisfiability.
The load classifier gained a third outcome (skip | dep | other) and now reads
the terminal exception out of unittest's wrapped-ImportError message, so a
wrapped SkipTest/SyntaxError is classified by what actually happened.1 parent 2a2f778 commit c206d1f
2 files changed
Lines changed: 88 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
31 | | - | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
32 | 34 | | |
33 | 35 | | |
34 | 36 | | |
| |||
46 | 48 | | |
47 | 49 | | |
48 | 50 | | |
| 51 | + | |
49 | 52 | | |
50 | 53 | | |
51 | 54 | | |
| |||
85 | 88 | | |
86 | 89 | | |
87 | 90 | | |
88 | | - | |
| 91 | + | |
| 92 | + | |
89 | 93 | | |
90 | | - | |
| 94 | + | |
91 | 95 | | |
92 | 96 | | |
93 | 97 | | |
94 | 98 | | |
95 | 99 | | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
96 | 113 | | |
97 | 114 | | |
98 | 115 | | |
| |||
121 | 138 | | |
122 | 139 | | |
123 | 140 | | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
124 | 148 | | |
125 | 149 | | |
126 | 150 | | |
| |||
187 | 211 | | |
188 | 212 | | |
189 | 213 | | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
190 | 228 | | |
191 | 229 | | |
192 | 230 | | |
| |||
202 | 240 | | |
203 | 241 | | |
204 | 242 | | |
205 | | - | |
| 243 | + | |
206 | 244 | | |
207 | 245 | | |
208 | 246 | | |
209 | 247 | | |
210 | | - | |
| 248 | + | |
211 | 249 | | |
212 | 250 | | |
213 | 251 | | |
| |||
276 | 314 | | |
277 | 315 | | |
278 | 316 | | |
279 | | - | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
280 | 323 | | |
281 | 324 | | |
282 | 325 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
228 | 228 | | |
229 | 229 | | |
230 | 230 | | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
231 | 270 | | |
232 | 271 | | |
233 | 272 | | |
| |||
0 commit comments