Update common test util
[platform/core/uifw/dali-toolkit.git] / automated-tests / src / dali-toolkit / dali-toolkit-test-utils / test-harness.cpp
index 332ddaa..645d74b 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -52,7 +52,14 @@ int RunTestCase( struct ::testcase_s& testCase )
   {
     testCase.startup();
   }
-  result = testCase.function();
+  try
+  {
+    result = testCase.function();
+  }
+  catch( const char* )
+  {
+    // just catch test fail exception, return is already set to EXIT_STATUS_TESTCASE_FAILED
+  }
   if( testCase.cleanup )
   {
     testCase.cleanup();
@@ -329,8 +336,9 @@ void Usage(const char* program)
   printf("Usage: \n"
          "   %s <testcase name>\t\t Execute a test case\n"
          "   %s \t\t Execute all test cases in parallel\n"
-         "   %s -r\t\t Execute all test cases in parallel, rerunning failed test cases\n",
-         program, program, program);
+         "   %s -r\t\t Execute all test cases in parallel, rerunning failed test cases\n"
+         "   %s -s\t\t Execute all test cases serially\n",
+         program, program, program, program);
 }
 
 } // namespace