From 86e15cf4a78afee785b72c40bb51ea0870f28863 Mon Sep 17 00:00:00 2001
From: Terraneo Federico <fede.tft@miosix.org>
Date: Mon, 25 Jul 2016 13:59:49 +0200
Subject: [PATCH] Fixed a bug in the testsuite

---
 miosix/_tools/testsuite/testsuite.cpp | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/miosix/_tools/testsuite/testsuite.cpp b/miosix/_tools/testsuite/testsuite.cpp
index 061470b5..2060aa17 100644
--- a/miosix/_tools/testsuite/testsuite.cpp
+++ b/miosix/_tools/testsuite/testsuite.cpp
@@ -2026,9 +2026,11 @@ void t10_p1(void *argv)
 void test_10()
 {
     test_name("Exception handling");
-    Thread::sleep(10);
     Thread *t=Thread::create(t10_p1,1024+512,0,NULL);
-    Thread::sleep(80);
+    //This sleep needs to be long enough to let the other thread print the
+    //"An exception propagated ..." string on the serial port, otherwise the
+    //test fails because the other thread still exists because it is printing.
+    Thread::sleep(100);
     if(Thread::exists(t)) fail("Thread not deleted");
     pass();
 }
-- 
GitLab