| ============================= test session starts ==============================
|
| platform linux -- Python 3.12.3, pytest-8.4.0, pluggy-1.6.0 -- /root/builds/osaKnfEQQ/0/sine-bureau/link/venv/bin/python3
|
| cachedir: .pytest_cache
|
| rootdir: /root/builds/osaKnfEQQ/0/sine-bureau/link
|
| plugins: order-1.3.0
|
| collecting ... collected 3 items
|
|
|
| test/functional/simple_test.py::test_program_2_devices[0052005a464d500a20333836] PASSED [ 33%]
|
| test/functional/simple_test.py::test_program_2_devices[002100554241500820323735] PASSED [ 66%]
|
| test/functional/simple_test.py::test_connect_links FAILED [100%]
|
|
|
| =================================== FAILURES ===================================
|
| ______________________________ test_connect_links ______________________________
|
|
|
| def test_connect_links():
|
| # 0. Get Device IDs
|
| device_id_1 = config_file["device_id_1"]
|
| device_id_2 = config_file["device_id_2"]
|
| device_1 = discover_device(device_id_1)
|
| device_2 = discover_device(device_id_2)
|
| assert device_1, f"Device with ID {device_id_1} not found"
|
| assert device_2, f"Device with ID {device_id_2} not found"
|
|
|
| # 1. Reset the devices
|
| reset_device(device_1)
|
| reset_device(device_2)
|
|
|
| # 2. Make 1 device as slave another is master by default
|
| # Wait for device renumeration. Don't have idea how to do it in a better way (TBD?)
|
| time.sleep(5)
|
| device_1 = discover_device(device_id_1)
|
| device_2 = discover_device(device_id_2)
|
|
|
| # 3. Cover negative scenario rssi should equal -127 in no connection
|
| rssi = get_rssi(device_1)
|
| print(f"RSSI: {rssi}")
|
| > assert -127 == rssi, f"Device {device_id_1}: Actual RSSI is: {rssi}. Expected is -127."
|
| E AssertionError: Device 0052005a464d500a20333836: Actual RSSI is: 0. Expected is -127.
|
| E assert -127 == 0
|
|
|
| test/functional/simple_test.py:34: AssertionError
|
| ----------------------------- Captured stdout call -----------------------------
|
| Retrying to find device...
|
| Retrying to find device...
|
| Retrying to find device...
|
| Retrying to find device...
|
| Retrying to find device...
|
| Retrying to find device...
|
| Retrying to find device...
|
| Retrying to find device...
|
| Retrying to find device...
|
| Retrying to find device...
|
| RSSI: 0
|
| =============================== warnings summary ===============================
|
| test/functional/simple_test.py::test_program_2_devices[0052005a464d500a20333836]
|
| test/functional/simple_test.py::test_program_2_devices[002100554241500820323735]
|
| <frozen _collections_abc>:813: DeprecationWarning: Will be removed in 1.0. Access properties with Device.properties.
|
|
|
| test/functional/simple_test.py::test_program_2_devices[0052005a464d500a20333836]
|
| test/functional/simple_test.py::test_program_2_devices[0052005a464d500a20333836]
|
| test/functional/simple_test.py::test_program_2_devices[0052005a464d500a20333836]
|
| test/functional/simple_test.py::test_program_2_devices[0052005a464d500a20333836]
|
| test/functional/simple_test.py::test_program_2_devices[002100554241500820323735]
|
| test/functional/simple_test.py::test_program_2_devices[002100554241500820323735]
|
| test/functional/simple_test.py::test_program_2_devices[002100554241500820323735]
|
| test/functional/simple_test.py::test_program_2_devices[002100554241500820323735]
|
| <frozen _collections_abc>:807: DeprecationWarning: Will be removed in 1.0. Access properties with Device.properties.
|
|
|
| -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
|
| ==================================== PASSES ====================================
|
| _______________ test_program_2_devices[0052005a464d500a20333836] _______________
|
| ----------------------------- Captured stdout call -----------------------------
|
| Device found: DEVICE ID 1939:1945 on Bus 005 Address 014 =================
|
| bLength : 0x12 (18 bytes)
|
| bDescriptorType : 0x1 Device
|
| bcdUSB : 0x210 USB 2.1
|
| bDeviceClass : 0xef Miscellaneous
|
| bDeviceSubClass : 0x2
|
| bDeviceProtocol : 0x1
|
| bMaxPacketSize0 : 0x40 (64 bytes)
|
| idVendor : 0x1939
|
| idProduct : 0x1945
|
| bcdDevice : 0x1 Device 0.01
|
| iManufacturer : 0x1 sine.engineering
|
| iProduct : 0x2 sine.link
|
| iSerialNumber : 0x6 0/0052005a464d500a20333836
|
| bNumConfigurations : 0x1
|
| CONFIGURATION 1: 400 mA ==================================
|
| bLength : 0x9 (9 bytes)
|
| bDescriptorType : 0x2 Configuration
|
| wTotalLength : 0xa4 (164 bytes)
|
| bNumInterfaces : 0x5
|
| bConfigurationValue : 0x1
|
| iConfiguration : 0x0
|
| bmAttributes : 0x80 Bus Powered
|
| bMaxPower : 0xc8 (400 mA)
|
| INTERFACE 0: Vendor Specific ===========================
|
| bLength : 0x9 (9 bytes)
|
| bDescriptorType : 0x4 Interface
|
| bInterfaceNumber : 0x0
|
| bAlternateSetting : 0x0
|
| bNumEndpoints : 0x2
|
| bInterfaceClass : 0xff Vendor Specific
|
| bInterfaceSubClass : 0x0
|
| bInterfaceProtocol : 0x0
|
| iInterface : 0x3 sine.link BULK
|
| ENDPOINT 0x1: Bulk OUT ===============================
|
| bLength : 0x7 (7 bytes)
|
| bDescriptorType : 0x5 Endpoint
|
| bEndpointAddress : 0x1 OUT
|
| bmAttributes : 0x2 Bulk
|
| wMaxPacketSize : 0x40 (64 bytes)
|
| bInterval : 0x0
|
| ENDPOINT 0x82: Bulk IN ===============================
|
| bLength : 0x7 (7 bytes)
|
| bDescriptorType : 0x5 Endpoint
|
| bEndpointAddress : 0x82 IN
|
| bmAttributes : 0x2 Bulk
|
| wMaxPacketSize : 0x40 (64 bytes)
|
| bInterval : 0x0
|
| INTERFACE 1: CDC Communication =========================
|
| bLength : 0x9 (9 bytes)
|
| bDescriptorType : 0x4 Interface
|
| bInterfaceNumber : 0x1
|
| bAlternateSetting : 0x0
|
| bNumEndpoints : 0x1
|
| bInterfaceClass : 0x2 CDC Communication
|
| bInterfaceSubClass : 0x2
|
| bInterfaceProtocol : 0x0
|
| iInterface : 0x4 sine.link CDC1
|
| ENDPOINT 0x83: Interrupt IN ==========================
|
| bLength : 0x7 (7 bytes)
|
| bDescriptorType : 0x5 Endpoint
|
| bEndpointAddress : 0x83 IN
|
| bmAttributes : 0x3 Interrupt
|
| wMaxPacketSize : 0x8 (8 bytes)
|
| bInterval : 0x10
|
| INTERFACE 2: CDC Data ==================================
|
| bLength : 0x9 (9 bytes)
|
| bDescriptorType : 0x4 Interface
|
| bInterfaceNumber : 0x2
|
| bAlternateSetting : 0x0
|
| bNumEndpoints : 0x2
|
| bInterfaceClass : 0xa CDC Data
|
| bInterfaceSubClass : 0x0
|
| bInterfaceProtocol : 0x0
|
| iInterface : 0x0
|
| ENDPOINT 0x4: Bulk OUT ===============================
|
| bLength : 0x7 (7 bytes)
|
| bDescriptorType : 0x5 Endpoint
|
| bEndpointAddress : 0x4 OUT
|
| bmAttributes : 0x2 Bulk
|
| wMaxPacketSize : 0x40 (64 bytes)
|
| bInterval : 0x0
|
| ENDPOINT 0x84: Bulk IN ===============================
|
| bLength : 0x7 (7 bytes)
|
| bDescriptorType : 0x5 Endpoint
|
| bEndpointAddress : 0x84 IN
|
| bmAttributes : 0x2 Bulk
|
| wMaxPacketSize : 0x40 (64 bytes)
|
| bInterval : 0x0
|
| INTERFACE 3: CDC Communication =========================
|
| bLength : 0x9 (9 bytes)
|
| bDescriptorType : 0x4 Interface
|
| bInterfaceNumber : 0x3
|
| bAlternateSetting : 0x0
|
| bNumEndpoints : 0x1
|
| bInterfaceClass : 0x2 CDC Communication
|
| bInterfaceSubClass : 0x2
|
| bInterfaceProtocol : 0x0
|
| iInterface : 0x5 sine.link CDC2
|
| ENDPOINT 0x85: Interrupt IN ==========================
|
| bLength : 0x7 (7 bytes)
|
| bDescriptorType : 0x5 Endpoint
|
| bEndpointAddress : 0x85 IN
|
| bmAttributes : 0x3 Interrupt
|
| wMaxPacketSize : 0x8 (8 bytes)
|
| bInterval : 0x10
|
| INTERFACE 4: CDC Data ==================================
|
| bLength : 0x9 (9 bytes)
|
| bDescriptorType : 0x4 Interface
|
| bInterfaceNumber : 0x4
|
| bAlternateSetting : 0x0
|
| bNumEndpoints : 0x2
|
| bInterfaceClass : 0xa CDC Data
|
| bInterfaceSubClass : 0x0
|
| bInterfaceProtocol : 0x0
|
| iInterface : 0x0
|
| ENDPOINT 0x6: Bulk OUT ===============================
|
| bLength : 0x7 (7 bytes)
|
| bDescriptorType : 0x5 Endpoint
|
| bEndpointAddress : 0x6 OUT
|
| bmAttributes : 0x2 Bulk
|
| wMaxPacketSize : 0x40 (64 bytes)
|
| bInterval : 0x0
|
| ENDPOINT 0x86: Bulk IN ===============================
|
| bLength : 0x7 (7 bytes)
|
| bDescriptorType : 0x5 Endpoint
|
| bEndpointAddress : 0x86 IN
|
| bmAttributes : 0x2 Bulk
|
| wMaxPacketSize : 0x40 (64 bytes)
|
| bInterval : 0x0
|
| rebooting device...
|
| waiting for the bootloader...
|
| New device detected: node=/dev/sda vendor=dead model=4002 serial=1234567890
|
| Device is mounted at: /media/byaremkiv/C926-4671
|
| Removable storage detected: /media/byaremkiv/C926-4671
|
| Firmware successfully copied to: /media/byaremkiv/C926-4671/RadioLink.encbin
|
| _______________ test_program_2_devices[002100554241500820323735] _______________
|
| ----------------------------- Captured stdout call -----------------------------
|
| Device found: DEVICE ID 1939:1945 on Bus 005 Address 015 =================
|
| bLength : 0x12 (18 bytes)
|
| bDescriptorType : 0x1 Device
|
| bcdUSB : 0x210 USB 2.1
|
| bDeviceClass : 0xef Miscellaneous
|
| bDeviceSubClass : 0x2
|
| bDeviceProtocol : 0x1
|
| bMaxPacketSize0 : 0x40 (64 bytes)
|
| idVendor : 0x1939
|
| idProduct : 0x1945
|
| bcdDevice : 0x1 Device 0.01
|
| iManufacturer : 0x1 sine.engineering
|
| iProduct : 0x2 sine.link
|
| iSerialNumber : 0x6 0/002100554241500820323735
|
| bNumConfigurations : 0x1
|
| CONFIGURATION 1: 400 mA ==================================
|
| bLength : 0x9 (9 bytes)
|
| bDescriptorType : 0x2 Configuration
|
| wTotalLength : 0xa4 (164 bytes)
|
| bNumInterfaces : 0x5
|
| bConfigurationValue : 0x1
|
| iConfiguration : 0x0
|
| bmAttributes : 0x80 Bus Powered
|
| bMaxPower : 0xc8 (400 mA)
|
| INTERFACE 0: Vendor Specific ===========================
|
| bLength : 0x9 (9 bytes)
|
| bDescriptorType : 0x4 Interface
|
| bInterfaceNumber : 0x0
|
| bAlternateSetting : 0x0
|
| bNumEndpoints : 0x2
|
| bInterfaceClass : 0xff Vendor Specific
|
| bInterfaceSubClass : 0x0
|
| bInterfaceProtocol : 0x0
|
| iInterface : 0x3 sine.link BULK
|
| ENDPOINT 0x1: Bulk OUT ===============================
|
| bLength : 0x7 (7 bytes)
|
| bDescriptorType : 0x5 Endpoint
|
| bEndpointAddress : 0x1 OUT
|
| bmAttributes : 0x2 Bulk
|
| wMaxPacketSize : 0x40 (64 bytes)
|
| bInterval : 0x0
|
| ENDPOINT 0x82: Bulk IN ===============================
|
| bLength : 0x7 (7 bytes)
|
| bDescriptorType : 0x5 Endpoint
|
| bEndpointAddress : 0x82 IN
|
| bmAttributes : 0x2 Bulk
|
| wMaxPacketSize : 0x40 (64 bytes)
|
| bInterval : 0x0
|
| INTERFACE 1: CDC Communication =========================
|
| bLength : 0x9 (9 bytes)
|
| bDescriptorType : 0x4 Interface
|
| bInterfaceNumber : 0x1
|
| bAlternateSetting : 0x0
|
| bNumEndpoints : 0x1
|
| bInterfaceClass : 0x2 CDC Communication
|
| bInterfaceSubClass : 0x2
|
| bInterfaceProtocol : 0x0
|
| iInterface : 0x4 sine.link CDC1
|
| ENDPOINT 0x83: Interrupt IN ==========================
|
| bLength : 0x7 (7 bytes)
|
| bDescriptorType : 0x5 Endpoint
|
| bEndpointAddress : 0x83 IN
|
| bmAttributes : 0x3 Interrupt
|
| wMaxPacketSize : 0x8 (8 bytes)
|
| bInterval : 0x10
|
| INTERFACE 2: CDC Data ==================================
|
| bLength : 0x9 (9 bytes)
|
| bDescriptorType : 0x4 Interface
|
| bInterfaceNumber : 0x2
|
| bAlternateSetting : 0x0
|
| bNumEndpoints : 0x2
|
| bInterfaceClass : 0xa CDC Data
|
| bInterfaceSubClass : 0x0
|
| bInterfaceProtocol : 0x0
|
| iInterface : 0x0
|
| ENDPOINT 0x4: Bulk OUT ===============================
|
| bLength : 0x7 (7 bytes)
|
| bDescriptorType : 0x5 Endpoint
|
| bEndpointAddress : 0x4 OUT
|
| bmAttributes : 0x2 Bulk
|
| wMaxPacketSize : 0x40 (64 bytes)
|
| bInterval : 0x0
|
| ENDPOINT 0x84: Bulk IN ===============================
|
| bLength : 0x7 (7 bytes)
|
| bDescriptorType : 0x5 Endpoint
|
| bEndpointAddress : 0x84 IN
|
| bmAttributes : 0x2 Bulk
|
| wMaxPacketSize : 0x40 (64 bytes)
|
| bInterval : 0x0
|
| INTERFACE 3: CDC Communication =========================
|
| bLength : 0x9 (9 bytes)
|
| bDescriptorType : 0x4 Interface
|
| bInterfaceNumber : 0x3
|
| bAlternateSetting : 0x0
|
| bNumEndpoints : 0x1
|
| bInterfaceClass : 0x2 CDC Communication
|
| bInterfaceSubClass : 0x2
|
| bInterfaceProtocol : 0x0
|
| iInterface : 0x5 sine.link CDC2
|
| ENDPOINT 0x85: Interrupt IN ==========================
|
| bLength : 0x7 (7 bytes)
|
| bDescriptorType : 0x5 Endpoint
|
| bEndpointAddress : 0x85 IN
|
| bmAttributes : 0x3 Interrupt
|
| wMaxPacketSize : 0x8 (8 bytes)
|
| bInterval : 0x10
|
| INTERFACE 4: CDC Data ==================================
|
| bLength : 0x9 (9 bytes)
|
| bDescriptorType : 0x4 Interface
|
| bInterfaceNumber : 0x4
|
| bAlternateSetting : 0x0
|
| bNumEndpoints : 0x2
|
| bInterfaceClass : 0xa CDC Data
|
| bInterfaceSubClass : 0x0
|
| bInterfaceProtocol : 0x0
|
| iInterface : 0x0
|
| ENDPOINT 0x6: Bulk OUT ===============================
|
| bLength : 0x7 (7 bytes)
|
| bDescriptorType : 0x5 Endpoint
|
| bEndpointAddress : 0x6 OUT
|
| bmAttributes : 0x2 Bulk
|
| wMaxPacketSize : 0x40 (64 bytes)
|
| bInterval : 0x0
|
| ENDPOINT 0x86: Bulk IN ===============================
|
| bLength : 0x7 (7 bytes)
|
| bDescriptorType : 0x5 Endpoint
|
| bEndpointAddress : 0x86 IN
|
| bmAttributes : 0x2 Bulk
|
| wMaxPacketSize : 0x40 (64 bytes)
|
| bInterval : 0x0
|
| rebooting device...
|
| waiting for the bootloader...
|
| New device detected: node=/dev/sda vendor=dead model=4002 serial=1234567890
|
| Device is mounted at: /media/byaremkiv/C926-4671
|
| Removable storage detected: /media/byaremkiv/C926-4671
|
| Firmware successfully copied to: /media/byaremkiv/C926-4671/RadioLink.encbin
|
| - generated xml file: /root/builds/osaKnfEQQ/0/sine-bureau/link/output/test_report.xml -
|
| ================== 1 failed, 2 passed, 10 warnings in 20.17s ===================
|