2.1.2.1.5. tests.utils.fwu_utils

2.1.2.1.5.1. Attributes

logger

2.1.2.1.5.2. Functions

check_block_device(platform_base_obj, dev)

Verify that a block device exists on target.

check_mount(platform_base_obj, target, source, error_msg)

Verify that a mount exists using findmnt linux command

check_file(platform_base_obj, path, error_msg)

Verify that a file exists on target.

prepare_capsule_environment(platform_base_obj)

Mount boot, verify devices, check capsule, and copy file

check_system_status(platform_base_obj[, timeout])

Verify that systemd reaches running state after FWU flow.

2.1.2.1.5.3. Module Contents

tests.utils.fwu_utils.logger[source]
tests.utils.fwu_utils.check_block_device(platform_base_obj, dev)[source]

Verify that a block device exists on target.

Parameters:
  • platform_base_obj – Platform fixture containing manager

  • dev (str) – Device path

Returns:

None

Return type:

None

tests.utils.fwu_utils.check_mount(platform_base_obj, target, source, error_msg)[source]

Verify that a mount exists using findmnt linux command

Parameters:
  • platform_base_obj – Platform fixture containing manager

  • target (str) – target to mount the device

  • source (str) – Expected device

  • error_msg (str) – Msg in case of failure

Returns:

None

Return type:

None

tests.utils.fwu_utils.check_file(platform_base_obj, path, error_msg)[source]

Verify that a file exists on target.

Parameters:
  • platform_base_obj – Platform fixture containing manager

  • path (str) – File path

  • error_msg (str) – Msg in case of failure

Returns:

None

Return type:

None

tests.utils.fwu_utils.prepare_capsule_environment(platform_base_obj)[source]

Mount boot, verify devices, check capsule, and copy file

tests.utils.fwu_utils.check_system_status(platform_base_obj, timeout=200)[source]

Verify that systemd reaches running state after FWU flow.

If running state is not reached, this helper drains pending console output, collects failed systemd units, and fails the test with diagnostics.

Parameters:
  • platform_base_obj – Platform fixture containing manager

  • timeout (int) – Reserved timeout argument

Returns:

None

Return type:

None