lib/serial_terminal.pm

add_serial_console

    add_serial_console($console);

Adds $console to /etc/securetty (unless already in file), enables systemd service and start it. It requires selecting root console before.

prepare_serial_console

    prepare_serial_console();

Wrapper for add_serial_console.

get_login_message

   get_login_message();

Get login message printed by OS at the end of the boot. Suitable for testing whether boot has been finished:

wait_serial(get_login_message(), 300);

login

   login($user);

Enters root's name and password to login. Also sets the prompt to something static without ANSI escape sequences (i.e. a single #) and changes the terminal width.

download_file

  download_file($src, $dst [, force => $force][, chunk_size => $cz][, chunk_retry => $cr])

Download a file from worker to SUT using the current serial terminal. The file is split into chunks chunk_size and each chunk is verified with checksum. If a chunk fails, the upload will be retried up to chunk_retry times, before giving up. To overwrite destination use force. This function die on any failure.

upload_file upload_file($src, $dst, [, chunk_size => $cz][, chunk_retry => $cr]);

Upload a file from SUT to the worker using the current serial terminal. The file is parted into chunks chunk_size and each chunk gets is verified with checksum. If a chunk fail we retry it chunk_retry times, before give up. The file is placed in the ulogs/ directory of the worker.

This function die on any failure.