Merge branch 'format' into 'master'

Format tracetools_test

See merge request micro-ROS/ros2_tracing!13
This commit is contained in:
Christophe Bedard 2019-06-24 06:24:49 +00:00
commit 91d5977b46
10 changed files with 20 additions and 17 deletions

View file

@ -18,7 +18,6 @@ from tracetools_test.case import TraceTestCase
class TestIntra(TraceTestCase):
def __init__(self, *args) -> None:
super().__init__(
*args,

View file

@ -21,7 +21,6 @@ VERSION_REGEX = r'^[0-9]\.[0-9]\.[0-9]$'
class TestNode(TraceTestCase):
def __init__(self, *args) -> None:
super().__init__(
*args,

View file

@ -18,7 +18,6 @@ from tracetools_test.case import TraceTestCase
class TestPublisher(TraceTestCase):
def __init__(self, *args) -> None:
super().__init__(
*args,

View file

@ -18,7 +18,6 @@ from tracetools_test.case import TraceTestCase
class TestService(TraceTestCase):
def __init__(self, *args) -> None:
super().__init__(
*args,

View file

@ -18,7 +18,6 @@ from tracetools_test.case import TraceTestCase
class TestServiceCallback(TraceTestCase):
def __init__(self, *args) -> None:
super().__init__(
*args,

View file

@ -18,7 +18,6 @@ from tracetools_test.case import TraceTestCase
class TestSubscription(TraceTestCase):
def __init__(self, *args) -> None:
super().__init__(
*args,

View file

@ -18,7 +18,6 @@ from tracetools_test.case import TraceTestCase
class TestSubscriptionCallback(TraceTestCase):
def __init__(self, *args) -> None:
super().__init__(
*args,

View file

@ -18,7 +18,6 @@ from tracetools_test.case import TraceTestCase
class TestTimer(TraceTestCase):
def __init__(self, *args) -> None:
super().__init__(
*args,

View file

@ -48,7 +48,7 @@ class TraceTestCase(unittest.TestCase):
nodes: List[str],
base_path: str = '/tmp',
events_kernel: List[str] = None,
package: str = 'tracetools_test'
package: str = 'tracetools_test',
) -> None:
"""Constructor."""
print(f'methodName={args[0]}')

View file

@ -41,7 +41,7 @@ def run_and_trace(
ros_events: List[str],
kernel_events: List[str],
package_name: str,
node_names: List[str]
node_names: List[str],
) -> Tuple[int, str]:
"""
Run a node while tracing.
@ -107,8 +107,19 @@ def get_trace_events(trace_directory: str) -> List[DictEvent]:
# List of ignored CTF fields
_IGNORED_FIELDS = [
'content_size', 'cpu_id', 'events_discarded', 'id', 'packet_size', 'packet_seq_num',
'stream_id', 'stream_instance_id', 'timestamp_end', 'timestamp_begin', 'magic', 'uuid', 'v'
'content_size',
'cpu_id',
'events_discarded',
'id',
'packet_size',
'packet_seq_num',
'stream_id',
'stream_instance_id',
'timestamp_end',
'timestamp_begin',
'magic',
'uuid',
'v',
]
_DISCARD = 'events_discarded'