Hi, Remi,
I find I could use 'usb_vendor_id': 'xxx', 'usb_product_id': 'xxx' to find the usb serial inside the docker container.
This works perfect!
A side question: if the serial is not "usb serial", just a "non-usb serial", then what's the way to make it accessable inside container?
------------------------------------------------------------------
Sender:cnspring2002 <cnspring2002@aliyun.com>
Sent At:2020 Nov. 24 (Tue.) 16:42
Recipient:Remi Duraffort <remi.duraffort@linaro.org>
Cc:lava-users <lava-users@lists.lavasoftware.org>
Subject:Re: [Lava-users] Can't find serial port when test.
Hi, Remi, thanks for reply.
Then, what could I do to make the serial port accessible inside the docker container? Add any configure or xxx?
Or this is a known issue that "/dev/ttyUSB0 related case won't/never be supported in lava"?
------------------------------------------------------------------
Sender:Remi Duraffort <remi.duraffort@linaro.org>
Sent At:2020 Nov. 24 (Tue.) 01:08
Recipient:cnspring2002 <cnspring2002@aliyun.com>
Cc:lava-users <lava-users@lists.lavasoftware.org>
Subject:Re: [Lava-users] Can't find serial port when test.
Hello,
the test is running inside the docker container where the serial port is not accessible.
Dear all,
I have one issue when use one qualcomn's development board:
- test:
definitions:
- from: inline
name: auto_test
path: inline/auto_test.yaml
repository:
metadata:
description: run
format: Lava-Test
name: run
run:
steps:
- lava-test-case "Android_Serial_Case" --shell "./test.py"
docker:
image: myimage
local: true
timeout:
minutes: 1600
The test.py is from our customer, when run it, it show the error:
Traceback (most recent call last):
File "/usr/local/lib/python3.7/site-packages/serial/serialposix.py", line 265, in open
self.fd = os.open(self.portstr, os.O_RDWR | os.O_NOCTTY | os.O_NONBLOCK)
FileNotFoundError: [Errno 2] No such file or directory: '/dev/ttyUSB0'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python3.7/site-packages/serial/serialutil.py", line 240, in __init__
self.open()
File "/usr/local/lib/python3.7/site-packages/serial/serialposix.py", line 268, in open
raise SerialException(msg.errno, "could not open port {}: {}".format(self._port, msg))
serial.serialutil.SerialException: [Errno 2] could not open port /dev/ttyUSB0: [Errno 2] No such file or directory: '/dev/ttyUSB0'
I have linked the board to pc, and can see the "/dev/ttyUSB0" in my pc, what happened here?
_______________________________________________
Lava-users mailing list
Lava-users@lists.lavasoftware.orghttps://lists.lavasoftware.org/mailman/listinfo/lava-users
--
Rémi Duraffort
LAVA Architect
Linaro