From 0db67e4fb6a0337d44a54fd64d14c00bea6cff3a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?xalbertoisorna=E2=80=9D?= Date: Mon, 17 Jun 2024 09:57:05 +0100 Subject: [PATCH] Update Jenkinsfile and serial_send_receive.py --- Jenkinsfile | 2 +- test/rtos_drivers/usb/serial_send_receive.py | 14 ++++++++------ 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 64336e40..35bcfb38 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -78,7 +78,7 @@ pipeline { expression { !env.GH_LABEL_DOC_ONLY.toBoolean() } } agent { - label 'xcore.ai-explorer-hil-tests' + label 'sw-hw-xcai-exp1' //TODO remove this label to previous one!!! } stages { stage('Checkout') { diff --git a/test/rtos_drivers/usb/serial_send_receive.py b/test/rtos_drivers/usb/serial_send_receive.py index a5e7ddd4..152be83d 100644 --- a/test/rtos_drivers/usb/serial_send_receive.py +++ b/test/rtos_drivers/usb/serial_send_receive.py @@ -35,7 +35,6 @@ def find_ports_by_vid_pid(rq=2, msg="COM ports missing"): all_ports = serial.tools.list_ports.comports() test_ports = [port for port in all_ports if port.vid == vid and port.pid == pid] assert (len(test_ports) >= rq), msg - test_ports=test_ports[0:rq] # TODO needs to be choosen more intelligently return test_ports def transfer_data(input_file, output_file, write_port, read_port, max_read_size): @@ -53,12 +52,15 @@ def main(if0, if1, of0, of1): port0 = None port1 = None - try: - print(f'Opening port 0 ({test_ports[0].device}).') - port0 = serial.Serial(test_ports[0].device) + try: + d0 = test_ports[0].device + d1 = test_ports[1].device + + print(f'Opening port 0 ({d0}).') + port0 = serial.Serial(d0) - print(f'Opening port 1 ({test_ports[1].device}).') - port1 = serial.Serial(test_ports[1].device) + print(f'Opening port 1 ({d1}).') + port1 = serial.Serial(d1) print('Writing CDC test data to port 0, reading from port 1.') transfer_data(if0, of1, port0, port1, max_read_size)