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): class TestIntra(TraceTestCase):
def __init__(self, *args) -> None: def __init__(self, *args) -> None:
super().__init__( super().__init__(
*args, *args,

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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