From 67a3184bb307d52c76aa255ac69a23fb6e4fa5c3 Mon Sep 17 00:00:00 2001
From: Raphael Defosseux <raphael.defosseux@eurecom.fr>
Date: Fri, 1 Sep 2023 14:30:04 +0200
Subject: [PATCH] fix(ci): in case of T1 board defect, no statistics, exit
 nicely

Signed-off-by: Raphael Defosseux <raphael.defosseux@eurecom.fr>
---
 ci-scripts/cls_physim.py | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/ci-scripts/cls_physim.py b/ci-scripts/cls_physim.py
index a0264ac7c84..2e1bff7970d 100644
--- a/ci-scripts/cls_physim.py
+++ b/ci-scripts/cls_physim.py
@@ -98,6 +98,15 @@ class PhySim:
 			for line in g:
 				if 'decoding time' in line:
 					runResultsT1.append(line)
+
+		# In case the T1 board does work properly, there is no statistics
+		if len(runResultsT1) == 0:
+			logging.error('no statistics')
+			HTML.CreateHtmlTestRowQueue(self.runargs, 'KO', ['no statistics'])
+			self.exitStatus = 1
+			os.system('mv '+self.__runLogFile+' '+ self.__runLogPath+'/.')
+			return HTML
+
 		info = runResultsT1[0][15:-13]
 		result = int(''.join(filter(str.isdigit, info)))/100
 		#once parsed move the local logfile to its folder for tidiness
-- 
GitLab