File: add-gdb-test-check.patch

package info (click to toggle)
numba 0.61.2%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 17,316 kB
  • sloc: python: 211,580; ansic: 15,233; cpp: 6,544; javascript: 424; sh: 322; makefile: 173
file content (148 lines) | stat: -rw-r--r-- 4,602 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
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
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
Author: Diane Trout <diane@ghic.org>
Description: Try to get some gdb tests to work by requiring
 NUMBA_OPT=0.
 Also remove a few very unstable gdb tests
Forwarded: No

--- a/numba/tests/gdb/test_array_arg.py
+++ b/numba/tests/gdb/test_array_arg.py
@@ -2,10 +2,11 @@
 from numba import njit, types
 import numpy as np
 from numba.tests.gdb_support import GdbMIDriver
-from numba.tests.support import TestCase, needs_subprocess
+from numba.tests.support import TestCase, needs_subprocess, needs_numba_opt_0
 import unittest
 
 
+@needs_numba_opt_0
 @needs_subprocess
 class Test(TestCase):
 
--- a/numba/tests/gdb/test_basic.py
+++ b/numba/tests/gdb/test_basic.py
@@ -1,10 +1,11 @@
 # NOTE: This test is sensitive to line numbers as it checks breakpoints
 from numba import njit, types
 from numba.tests.gdb_support import GdbMIDriver
-from numba.tests.support import TestCase, needs_subprocess
+from numba.tests.support import TestCase, needs_subprocess, needs_numba_opt_0
 import unittest
 
 
+@needs_numba_opt_0
 @needs_subprocess
 class Test(TestCase):
 
--- a/numba/tests/gdb/test_break_on_symbol.py
+++ b/numba/tests/gdb/test_break_on_symbol.py
@@ -1,7 +1,7 @@
 # NOTE: This test is sensitive to line numbers as it checks breakpoints
 from numba import njit, types
 from numba.tests.gdb_support import GdbMIDriver
-from numba.tests.support import TestCase, needs_subprocess
+from numba.tests.support import TestCase, needs_subprocess, needs_numba_opt_0
 import unittest
 
 
@@ -11,6 +11,7 @@
     return x, z
 
 
+@needs_numba_opt_0
 @needs_subprocess
 class Test(TestCase):
 
--- a/numba/tests/gdb/test_break_on_symbol_version.py
+++ b/numba/tests/gdb/test_break_on_symbol_version.py
@@ -1,7 +1,7 @@
 # NOTE: This test is sensitive to line numbers as it checks breakpoints
 from numba import njit
 from numba.tests.gdb_support import GdbMIDriver
-from numba.tests.support import TestCase, needs_subprocess
+from numba.tests.support import TestCase, needs_subprocess, needs_numba_opt_0
 import unittest
 
 
@@ -25,6 +25,7 @@
     return a, b, c
 
 
+@needs_numba_opt_0
 @needs_subprocess
 class Test(TestCase):
 
--- a/numba/tests/gdb/test_conditional_breakpoint.py
+++ b/numba/tests/gdb/test_conditional_breakpoint.py
@@ -1,10 +1,11 @@
 # NOTE: This test is sensitive to line numbers as it checks breakpoints
 from numba import njit
 from numba.tests.gdb_support import GdbMIDriver
-from numba.tests.support import TestCase, needs_subprocess
+from numba.tests.support import TestCase, needs_subprocess, needs_numba_opt_0
 import unittest
 
 
+@needs_numba_opt_0
 @needs_subprocess
 class Test(TestCase):
 
--- a/numba/tests/gdb/test_pretty_print.py
+++ b/numba/tests/gdb/test_pretty_print.py
@@ -2,12 +2,13 @@
 from numba import njit
 import numpy as np
 from numba.tests.gdb_support import GdbMIDriver, needs_gdb_py3
-from numba.tests.support import TestCase, needs_subprocess
+from numba.tests.support import TestCase, needs_subprocess, needs_numba_opt_0
 from numba.misc.numba_gdbinfo import collect_gdbinfo
 import unittest
 import re
 
 
+@needs_numba_opt_0
 @needs_gdb_py3
 @needs_subprocess
 class Test(TestCase):
--- a/numba/tests/support.py
+++ b/numba/tests/support.py
@@ -231,6 +231,11 @@
 needs_setuptools = unittest.skipUnless(has_setuptools, 'Test needs setuptools')
 
 
+# gdb tests needs NUMBA_OPT=0
+needs_numba_opt_0 = unittest.skipUnless(
+    os.environ.get("NUMBA_OPT") == '0',
+    "gdb tests require NUMBA_OPT level zero")
+
 def ignore_internal_warnings():
     """Use in testing within a ` warnings.catch_warnings` block to filter out
     warnings that are unrelated/internally generated by Numba.
--- a/numba/tests/test_gdb_dwarf.py
+++ b/numba/tests/test_gdb_dwarf.py
@@ -9,6 +9,7 @@
 import unittest
 
 
+@unittest.skip("Isn't working on Debian")
 @linux_only
 @needs_gdb
 @skip_unless_pexpect
--- a/numba/tests/test_debuginfo.py
+++ b/numba/tests/test_debuginfo.py
@@ -302,6 +302,7 @@
         else:
             self.fail('Assertion on DILocalVariable not made')
 
+    @unittest.skip("Unstable under Debian")
     @TestCase.run_test_in_subprocess(envvars=_NUMBA_OPT_0_ENV)
     def test_DILocation_entry_blk(self):
         # Needs a subprocess as jitting literally anything at any point in the
@@ -359,6 +360,7 @@
         # check the uncondition jump instr itself has no metadata
         self.assertTrue(str(ujmp).endswith(target))
 
+    @unittest.skip("Unstable under Debian")
     @TestCase.run_test_in_subprocess(envvars=_NUMBA_OPT_0_ENV)
     def test_DILocation_decref(self):
         """ This tests that decref's generated from `ir.Del`s as variables go