Multiservo operation support for dut-control

This change makes use of the earlier introduced multiservo
configuration options. A configuration file describing existing servo
boards can be used to direct dut-control to the desired servo device.

BUG=none
TEST=manual

    copy the example configuration file (servo/data/servodrc.example)
    into ~/.servodrc and then run the following commands

    $ SERVOD_NAME=pit-4gb servo/dut_control.py cpu_uart_pty
    cpu_uart_pty:/dev/pts/15
    $ SERVOD_NAME=pit-2gb servo/dut_control.py cpu_uart_pty
    cpu_uart_pty:/dev/pts/20
    $ SERVOD_NAME=pit-3gb servo/dut_control.py cpu_uart_pty
    pit-3gb not in the config file
    $ SERVOD_PORT=9900 servo/dut_control.py cpu_uart_pty
    cpu_uart_pty:/dev/pts/2^
    $ SERVOD_PORT=9901 servo/dut_control.py cpu_uart_pty
    cpu_uart_pty:/dev/pts/15
    $ SERVOD_PORT=9902 servo/dut_control.py cpu_uart_pty
    Connection refused
    $ servo/dut_control.py -n pit-4gb  cpu_uart_pty
    cpu_uart_pty:/dev/pts/15
    $ servo/dut_control.py -n pit-2gb  cpu_uart_pty
    cpu_uart_pty:/dev/pts/20
    $ servo/dut_control.py -n pit-3gb  cpu_uart_pty
    pit-3gb not in the config file
    $ servo/dut_control.py -p 9900  cpu_uart_pty
    cpu_uart_pty:/dev/pts/20
    $ servo/dut_control.py -p 9901  cpu_uart_pty
    cpu_uart_pty:/dev/pts/15
    $ servo/dut_control.py -p 9902  cpu_uart_pty
    Connection refused

Change-Id: Icd368a9d8d37eb8efdab9f86ba87c15ab7e33765
Signed-off-by: Vadim Bendebury <vbendeb@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/185712
Reviewed-by: Todd Broch <tbroch@chromium.org>
1 file changed