(gdb)
| 193 | |
| 194 | @pytest.fixture(scope='session') |
| 195 | def gdb_arrow(gdb): |
| 196 | if 'deb' not in pa.build_info.cpp_build_info.build_type: |
| 197 | pytest.skip("Arrow C++ debug symbols not available") |
| 198 | if pa.build_info.build_type != 'debug': |
| 199 | pytest.skip("PyArrow C++ not built in debug mode") |
| 200 | |
| 201 | skip_if_gdb_script_unavailable() |
| 202 | gdb.run_command(f"source {gdb_script}") |
| 203 | |
| 204 | lib_path_var = 'PATH' if sys.platform == 'win32' else 'LD_LIBRARY_PATH' |
| 205 | lib_path = os.environ.get(lib_path_var) |
| 206 | if lib_path: |
| 207 | # GDB starts the inferior process in a pristine shell, need |
| 208 | # to propagate the library search path to find the Arrow DLL |
| 209 | gdb.run_command(f"set env {lib_path_var} {lib_path}") |
| 210 | |
| 211 | code = "from pyarrow.lib import _gdb_test_session; _gdb_test_session()" |
| 212 | out = gdb.run_command(f"run -c '{code}'") |
| 213 | assert ("Trace/breakpoint trap" in out or |
| 214 | "received signal" in out), out |
| 215 | gdb.select_frame("arrow::gdb::TestSession") |
| 216 | return gdb |
| 217 | |
| 218 | |
| 219 | def test_gdb_session(gdb): |
nothing calls this directly
no test coverage detected