2 # Copyright (C) 2019 EfficiOS Inc.
4 # This program is free software; you can redistribute it and/or
5 # modify it under the terms of the GNU General Public License
6 # as published by the Free Software Foundation; only version 2
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 # GNU General Public License for more details.
14 # You should have received a copy of the GNU General Public License
15 # along with this program; if not, write to the Free Software
16 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
25 @unittest.skip('depends on Python bindings, which are broken')
26 class LttngUtilsDebugInfoTestCase(unittest
.TestCase
):
27 def test_debug_info(self
):
28 debug_info_data_path
= os
.environ
['BT_DEBUG_INFO_PATH']
29 trace_path
= os
.path
.join(debug_info_data_path
, 'trace')
30 target_prefix
= os
.path
.join(debug_info_data_path
, '..', '..')
31 src
= bt2
.ComponentSpec('ctf', 'fs', trace_path
)
32 flt
= bt2
.ComponentSpec(
33 'lttng-utils', 'debug-info', {'target-prefix': target_prefix
}
35 it
= bt2
.TraceCollectionNotificationIterator(src
, flt
, [bt2
.EventNotification
])
37 debug_info
= notifs
[2].event
['debug_info']
38 self
.assertEqual(debug_info
['bin'], 'libhello_so+0x14d4')
39 self
.assertEqual(debug_info
['func'], 'foo+0xa9')
40 self
.assertEqual(debug_info
['src'], 'libhello.c:7')
41 debug_info
= notifs
[3].event
['debug_info']
42 self
.assertEqual(debug_info
['bin'], 'libhello_so+0x15a6')
43 self
.assertEqual(debug_info
['func'], 'bar+0xa9')
44 self
.assertEqual(debug_info
['src'], 'libhello.c:13')
This page took 0.052399 seconds and 5 git commands to generate.