Skip to content

Conversation

@MaciejKaszynski
Copy link

  • Currently the IP address of the QEMU VM is hard-coded as the parameter has the default value that is never set this adds an optional config field host_ip.
    • This is backward compatible as the default will still be the old IP address.
  • For the QEMU instance also made the second network device optional and dependent on having the host_diagnostic_ip optional configuration field.
  • Made the data_router_config configuration field optional so that if nothing is configured no dlt is created.
  • Made all the targets take in an ECU config as a parameter instead of having each config field as a parameter.

target.teardown()
dlt = None
if target_config.data_router_config:
dlt = DltReceive(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are missing with. DltReceive is context manager. In other targets as well.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed on 94d6916

Comment on lines 48 to 63
if target_config.data_router_config:
dlt = DltReceive(
target_ip=target_config.ip_address,
protocol=Protocol.UDP,
data_router_config=target_config.data_router_config,
binary_path=test_config.dlt_receive_path,
)
dlt.start_process()

target = TargetQvp(test_config.ecu, test_config.os)
target.register_processors(qvp_process)
yield target
target.teardown()
finally:
if dlt:
dlt.kill_process()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if target_config.data_router_config:
dlt = DltReceive(
target_ip=target_config.ip_address,
protocol=Protocol.UDP,
data_router_config=target_config.data_router_config,
binary_path=test_config.dlt_receive_path,
)
dlt.start_process()
target = TargetQvp(test_config.ecu, test_config.os)
target.register_processors(qvp_process)
yield target
target.teardown()
finally:
if dlt:
dlt.kill_process()
if target_config.data_router_config:
dlt = DltReceive(
target_ip=target_config.ip_address,
protocol=Protocol.UDP,
data_router_config=target_config.data_router_config,
binary_path=test_config.dlt_receive_path,
)
with dlt if dlt else nullcontext():
target = TargetQvp(test_config.ecu, test_config.os)
target.register_processors(qvp_process)
yield target
target.teardown()

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done on e5f27a5

Copy link
Contributor

@draganbjedov draganbjedov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please squash related commits and then I can approve.

@MaciejKaszynski
Copy link
Author

Please squash related commits and then I can approve.

Done

@draganbjedov
Copy link
Contributor

@MaciejKaszynski Did you tested this by running ITF tests from reference_integration?

@MaciejKaszynski
Copy link
Author

@MaciejKaszynski Did you tested this by running ITF tests from reference_integration?

Locally I get a pass for qnx_qemu image. I used bazel test --config=qemu-integration //:test_persistency_qemu //:test_ssh_qemu //:test_scrample_qemu I think those are the only itf ones.

@draganbjedov
Copy link
Contributor

You need to rebase. We have changed ITF structure #30

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants