Skip to content

Commit 61f9a44

Browse files
Add reasons to tests
1 parent c648597 commit 61f9a44

File tree

1 file changed

+24
-28
lines changed

1 file changed

+24
-28
lines changed

numba_dppy/tests/test_debug_dppy_numba.py

Lines changed: 24 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,8 @@ def spawn(self):
6262
env["NUMBA_EXTEND_VARIABLE_LIFETIMES"] = "1"
6363

6464
self.child = pexpect.spawn("gdb-oneapi -q python", env=env, encoding="utf-8")
65-
# if config.DEBUG:
66-
self.child.logfile = sys.stdout
65+
if config.DEBUG:
66+
self.child.logfile = sys.stdout
6767

6868
def setup_gdb(self):
6969
self.child.expect("(gdb)", timeout=5)
@@ -126,17 +126,13 @@ def script_path(script):
126126

127127
@pytest.fixture()
128128
def app(request):
129-
# run_gdb = gdb()
130-
# yield run_gdb
131-
# run_gdb.teardown_gdb()
132129
return gdb()
133130

134131

135132
def test_dummy():
136133
assert True
137134

138135

139-
@pytest.mark.xfail(raises=pexpect.TIMEOUT)
140136
@pytest.mark.parametrize("api", ["numba", "numba-dppy"])
141137
def test_breakpoint_row_number(app, api):
142138
app.breakpoint("dppy_numba_basic.py:25")
@@ -146,23 +142,23 @@ def test_breakpoint_row_number(app, api):
146142
app.child.expect(r"25\s+param_c = param_a \+ 10")
147143

148144

149-
# # commands/backtrace
150-
# @pytest.mark.xfail(raises=pexpect.TIMEOUT)
151-
# def test_backtrace(app):
152-
# app.breakpoint("simple_dppy_func.py:23")
153-
# app.run("simple_dppy_func.py")
145+
# commands/backtrace
146+
@pytest.mark.xfail(raises=pexpect.TIMEOUT, reasos="CI fails")
147+
def test_backtrace(app):
148+
app.breakpoint("simple_dppy_func.py:23")
149+
app.run("simple_dppy_func.py")
154150

155-
# app.child.expect(r"Thread .* hit Breakpoint .* at simple_dppy_func.py:23")
156-
# app.child.expect(r"23\s+result = a_in_func \+ b_in_func")
151+
app.child.expect(r"Thread .* hit Breakpoint .* at simple_dppy_func.py:23")
152+
app.child.expect(r"23\s+result = a_in_func \+ b_in_func")
157153

158-
# app.backtrace()
154+
app.backtrace()
159155

160-
# app.child.expect(r"#0.*__main__::func_sum .* at simple_dppy_func.py:23")
161-
# app.child.expect(r"#1.*__main__::kernel_sum .* at simple_dppy_func.py:30")
156+
app.child.expect(r"#0.*__main__::func_sum .* at simple_dppy_func.py:23")
157+
app.child.expect(r"#1.*__main__::kernel_sum .* at simple_dppy_func.py:30")
162158

163159

164160
# commands/break_conditional
165-
@pytest.mark.xfail(raises=pexpect.TIMEOUT)
161+
@pytest.mark.xfail(raises=pexpect.TIMEOUT, reasos="CI fails")
166162
def test_break_conditional(app):
167163
app.breakpoint("simple_sum.py:24 if i == 1")
168164
app.run("simple_sum.py")
@@ -175,7 +171,7 @@ def test_break_conditional(app):
175171
app.child.expect(r"\$1 = 1")
176172

177173

178-
@pytest.mark.xfail(raises=pexpect.TIMEOUT)
174+
@pytest.mark.xfail(raises=pexpect.TIMEOUT, reason="Need a Numba with PR7177")
179175
def test_break_conditional_with_func_arg(app):
180176
app.breakpoint("simple_dppy_func.py:23 if a_in_func == 3")
181177
app.run("simple_dppy_func.py")
@@ -189,7 +185,7 @@ def test_break_conditional_with_func_arg(app):
189185

190186

191187
# commands/break_file_func
192-
@pytest.mark.xfail(raises=pexpect.TIMEOUT)
188+
@pytest.mark.xfail(raises=pexpect.TIMEOUT, reasos="CI fails")
193189
def test_break_file_function(app):
194190
app.breakpoint("simple_sum.py:data_parallel_sum")
195191
app.run("simple_sum.py")
@@ -199,7 +195,7 @@ def test_break_file_function(app):
199195

200196

201197
# commands/break_func
202-
@pytest.mark.xfail(raises=pexpect.TIMEOUT)
198+
@pytest.mark.xfail(raises=pexpect.TIMEOUT, reasos="CI fails")
203199
def test_break_function(app):
204200
app.breakpoint("data_parallel_sum")
205201
app.run("simple_sum.py")
@@ -209,7 +205,7 @@ def test_break_function(app):
209205

210206

211207
# commands/break_nested_func
212-
@pytest.mark.xfail(raises=pexpect.TIMEOUT)
208+
@pytest.mark.xfail(raises=pexpect.TIMEOUT, reasos="CI fails")
213209
def test_break_nested_function(app):
214210
app.breakpoint("simple_dppy_func.py:func_sum")
215211
app.run("simple_dppy_func.py")
@@ -218,7 +214,7 @@ def test_break_nested_function(app):
218214
app.child.expect(r"23\s+result = a_in_func \+ b_in_func")
219215

220216

221-
@pytest.mark.xfail(raises=pexpect.TIMEOUT)
217+
@pytest.mark.xfail(raises=pexpect.TIMEOUT, reason="Need a Numba with PR7177")
222218
def test_info_args(app):
223219
app.breakpoint("simple_dppy_func.py:29")
224220
app.run("simple_dppy_func.py")
@@ -243,7 +239,7 @@ def test_info_args(app):
243239

244240

245241
# commands/info_func
246-
@pytest.mark.xfail(raises=pexpect.TIMEOUT)
242+
@pytest.mark.xfail(raises=pexpect.TIMEOUT, reasos="CI fails")
247243
def test_info_functions(app):
248244
app.breakpoint("simple_sum.py:23")
249245
app.run("simple_sum.py")
@@ -253,11 +249,11 @@ def test_info_functions(app):
253249

254250
app.info_functions("data_parallel_sum")
255251

256-
app.child.expect(r"21:\s+i8 \*+__main__::data_parallel_sum\(.*\);")
252+
app.child.expect(r"22: \s+ .*__main__::data_parallel_sum\(.*\)")
257253

258254

259255
# commands/local_variables_0
260-
@pytest.mark.xfail(raises=pexpect.TIMEOUT)
256+
@pytest.mark.xfail(raises=pexpect.TIMEOUT, reason="Need a Numba with PR7177")
261257
def test_local_variables(app):
262258
app.breakpoint("sum_local_vars.py:26")
263259
app.run("sum_local_vars.py")
@@ -294,7 +290,7 @@ def test_local_variables(app):
294290

295291

296292
# commands/next
297-
@pytest.mark.xfail(raises=pexpect.TIMEOUT)
293+
@pytest.mark.xfail(raises=pexpect.TIMEOUT, reasos="CI fails")
298294
def test_next(app):
299295
app.breakpoint("simple_dppy_func.py:30")
300296
app.run("simple_dppy_func.py")
@@ -311,7 +307,7 @@ def test_next(app):
311307

312308

313309
# commands/step_dppy_func
314-
@pytest.mark.xfail(raises=pexpect.TIMEOUT)
310+
@pytest.mark.xfail(raises=pexpect.TIMEOUT, reasos="CI fails")
315311
def test_step(app):
316312
app.breakpoint("simple_dppy_func.py:30")
317313
app.run("simple_dppy_func.py")
@@ -329,7 +325,7 @@ def test_step(app):
329325

330326

331327
# commands/stepi
332-
@pytest.mark.xfail(raises=pexpect.TIMEOUT)
328+
@pytest.mark.xfail(raises=pexpect.TIMEOUT, reasos="CI fails")
333329
def test_stepi(app):
334330
app.breakpoint("simple_dppy_func.py:30")
335331
app.run("simple_dppy_func.py")

0 commit comments

Comments
 (0)