From e2fbe8be31057e8a4dbbc3b7e7b41f3995277314 Mon Sep 17 00:00:00 2001
From: Rohit Gupta <rohit.gupta@eurecom.fr>
Date: Fri, 8 Jul 2016 17:21:26 +0200
Subject: [PATCH] Gitlab CI: minor logging related to thread busy errors

---
 cmake_targets/autotests/run_exec_lte-softmodem_tests.py | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/cmake_targets/autotests/run_exec_lte-softmodem_tests.py b/cmake_targets/autotests/run_exec_lte-softmodem_tests.py
index 19af648fbd..f7b09598d1 100755
--- a/cmake_targets/autotests/run_exec_lte-softmodem_tests.py
+++ b/cmake_targets/autotests/run_exec_lte-softmodem_tests.py
@@ -1013,6 +1013,13 @@ def handle_testcaseclass_softmodem (testcase, oldprogramList, logdirOAI5GRepo ,
       run_result=0
       run_result_string = ' RUN_'+str(run) + ' = FAIL(Assert)'
 
+    #If there is thread busy error, we mark the test case as failure as most likely eNB crashed
+    cmd = "grep -ilr \"thread busy\" " + logdir_local_testcase + " | cat "
+    cmd_out = subprocess.check_output ([cmd], shell=True)
+    if not cmd_out:
+      run_result=0
+      run_result_string = ' RUN_'+str(run) + ' = FAIL(Thread_Busy)'
+
     run_result_string = run_result_string + tput_run_string
 
     test_result=test_result & run_result
-- 
GitLab