Test harness sync 53/297453/4
authorDavid Steele <david.steele@samsung.com>
Fri, 18 Aug 2023 10:53:46 +0000 (11:53 +0100)
committerDavid Steele <david.steele@samsung.com>
Fri, 25 Aug 2023 09:48:23 +0000 (10:48 +0100)
Change-Id: Ib164fc503b025250fd659785e1870b1f1f4a609d

.gitignore
automated-tests/src/dali-adaptor/dali-test-suite-utils/test-compare-types.h
automated-tests/src/dali-adaptor/dali-test-suite-utils/test-harness.cpp

index ea4dc111bb22bf17fadfb53817e89150fd8e5353..104aa334fcf8550d7a8713ebd048615e679b2b0d 100644 (file)
@@ -40,6 +40,10 @@ install_manifest.txt
 /docs/generated/*
 /build/tizen/doc
 /build/tizen/.cov
+/build/tizen/.ninja_deps
+/build/tizen/.ninja_log
+/build/tizen/build.ninja
+/build/tizen/rules.ninja
 /build/desktop
 /packaging/home*
 compile_commands.json
index fcadd6fa5f65156795822b7e9612ec44ccd19e74..a31f162e0ab43144772efde16aa7e3695a9b92e3 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_TEST_COMPARE_TYPES_H
 
 /*
- * Copyright (c) 2022 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2023 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.
@@ -27,9 +27,9 @@ inline bool CompareType(Type value1, Type value2, float epsilon)
 }
 
 /**
- * A helper for fuzzy-comparing Vector2 objects
- * @param[in] vector1 the first object
- * @param[in] vector2 the second object
+ * A helper for matching floats
+ * @param[in] value1 the first object
+ * @param[in] value2 the second object
  * @param[in] epsilon difference threshold
  * @returns true if difference is smaller than epsilon threshold, false otherwise
  */
@@ -39,6 +39,19 @@ inline bool CompareType<float>(float value1, float value2, float epsilon)
   return fabsf(value1 - value2) < epsilon;
 }
 
+/**
+ * A helper for matching doubles
+ * @param[in] value1 the first object
+ * @param[in] value2 the second object
+ * @param[in] epsilon difference threshold
+ * @returns true if difference is smaller than epsilon threshold, false otherwise
+ */
+template<>
+inline bool CompareType<double>(double value1, double value2, float epsilon)
+{
+  return fabs(value1 - value2) < double(epsilon);
+}
+
 /**
  * A helper for fuzzy-comparing Vector2 objects
  * @param[in] vector1 the first object
index 31080a411aad46fcf4d9eb3a290eef89541005f3..4237327f5dd7a9c417f054c6d856107df9a26308 100644 (file)
@@ -510,7 +510,11 @@ int32_t RunAllInParallel(const char* processName, ::testcase tc_array[], std::st
         std::chrono::steady_clock::duration timeSpan = endTime - tc.second.startTime;
         double                              seconds  = double(timeSpan.count()) * std::chrono::steady_clock::period::num / std::chrono::steady_clock::period::den;
 
-        if(seconds > MAXIMUM_CHILD_LIFETIME)
+        if(4.9999 < seconds && seconds < 5 && !tc.second.finished)
+        {
+          printf("Child process %s is delayed: WCHAN:%s\n", tc.second.name, GetWChan(tc.first).c_str());
+        }
+        else if(seconds > MAXIMUM_CHILD_LIFETIME)
         {
           // Kill the child process. A subsequent call to waitpid will process signal result below.
           if(!tc.second.finished)